data management
2015-10-14 22:52:02 4 举报
AI智能生成
R basic data management
作者其他创作
大纲/内容
Date Management
Missing Values
Check Missing values
is.na()
Recoding values to missing
leadership$age[leadership$age == 99] - NA
Excluding missing values from analyses
na.omit(leadership)
Date Values
Convert Date
strDates - c(\"01/05/1965\
Util
Type Conversions
Test Type
is.numeric()is.character()is.vector()is.matrix()is.data.frame()is.factor()is.logical()
Convert Type
as.numeric()as.character()as.vector()as.matrix()as.data.frame()as.factor()as.logical()
Sorting Data
Merging datasets
Adding columns
Join By Key(s)
Without Common Key
Adding rows
Subsetting datasets
Selecting (keeping) variables
myvars - c(\"q1\
myvars - paste(\"q\
Excluding (dropping) variables
myvars - names(leadership) %in% c(\"q3\
leadership$q3 - leadership$q4 - NULL
Selecting observations
The subset() function
Random samples
Using SQL statements to manipulate data frames
\
0 条评论
下一页