Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary Computational Methods and Data Analysis 3- Data Entry and Importation to R

Rating
-
Sold
-
Pages
50
Uploaded on
14-10-2023
Written in
2023/2024

1.Data Frames -Creating data frames -Properties -Creating data frames from other objects. -Creating data frames using c-bind and r-bind. 2 Adding new columns or rows to a data frame -Adding a new column -Adding a new row 3 Indexing/sub-setting data frames 4 Importing Data from Excel (Comma Separated Value) 5 Importing data from the web 6 Descriptive Statistics 7 Visualizing the Results

Show more Read less
Institution
Course

Content preview

Data Frames
Adding new columns or rows to a data frame
Indexing/ sub-setting data frames
Importing Data from Excel (Comma Separated Value)
Importing data from the web
Descriptive Statistics
Visualizing the Results




DATA ENTRY AND IMPORTATION INTO R


Course: ACTM 311 - Computational Methods and Data Analysis III

School of Mathematics


Group: Bachelor of Science in Actuarial Science - Y3S1



October 11, 2022




Onsoti Alex N. COMPUTATIONAL METHODS AND DATA ANALYSIS III 1/50

, Data Frames
Adding new columns or rows to a data frame
Indexing/ sub-setting data frames
Importing Data from Excel (Comma Separated Value)
Importing data from the web
Descriptive Statistics
Visualizing the Results
General Outline



1 Data Frames
Creating data frames
Properties
Creating data frames from other objects
Creating data frames using cbind and rbind

2 Adding new columns or rows to a data frame
Adding a new column
Adding a new row

3 Indexing/ sub-setting data frames

4 Importing Data from Excel (Comma Separated Value)

5 Importing data from the web

6 Descriptive Statistics

7 Visualizing the Results


Onsoti Alex N. COMPUTATIONAL METHODS AND DATA ANALYSIS III 2/50

, Data Frames
Adding new columns or rows to a data frame
Creating data frames
Indexing/ sub-setting data frames
Properties
Importing Data from Excel (Comma Separated Value)
Creating data frames from other objects
Importing data from the web
Creating data frames using cbind and rbind
Descriptive Statistics
Visualizing the Results
Creating data frames



A data frame is a collection of column vectors/factors of the same length.
The columns are the vectors/factors which contain data for a single variable (e.g
policyholder’s names, ages and smoker status)
The rows represent a single observation (e.g a single policyholder)




Note that whilst each column (i.e vector/factor) contains data of the same type,
the different columns (i.e vectors/factors) can be different data types.
In the example above we have character data for the first column, numeric data
for the second column and logical data for the third column.


Onsoti Alex N. COMPUTATIONAL METHODS AND DATA ANALYSIS III 3/50

, Data Frames
Adding new columns or rows to a data frame
Creating data frames
Indexing/ sub-setting data frames
Properties
Importing Data from Excel (Comma Separated Value)
Creating data frames from other objects
Importing data from the web
Creating data frames using cbind and rbind
Descriptive Statistics
Visualizing the Results
Creating data frames




You can check out whether an object is a data frame by using is.data.frame().
The dimensions are called rows and columns and the numbers of each can be
found by using the nrow() and ncol() commands respectively.
Alternatively, you could use the dimensions command dim() to get both the
number of rows and columns.
To create a data frame from scratch we use the data.frame( ) command.
This will create a data frame out of a list of vectors (or other data frames):
d a t a . frame (< v e c t o r 1 >, <v e c t o r 2 > , . . . )




Onsoti Alex N. COMPUTATIONAL METHODS AND DATA ANALYSIS III 4/50

Written for

Course

Document information

Uploaded on
October 14, 2023
Number of pages
50
Written in
2023/2024
Type
SUMMARY

Subjects

$10.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
Yurioman

Get to know the seller

Seller avatar
Yurioman Kenyatta University
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
4 year
Number of followers
0
Documents
8
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions