input/output
part1
sink()
cat()
scan()
default separator: white space
print()
part2
readClipboard()
read.table()/write.table()
read.csv()/write.csv()
part3
xlsx packages
Adrian Dragulescu
read.xlsx()/write.xlsx()
XLConnect
Martin Studer
readWorksheetFromFile()
writeWorksheetToFile()
readxl
Hadley Wickham
read_excel()
excel_sheets()
part4
file_type
SAS
SPSS
Stata
Matlab
MySQL
package
foreign
foreign
foreign
R.matlab
RMySQL
file
read.ssd()/write.foreign()
read.spss()/write.foreign()
read.dta()/write.foreign()
readMat()/writeMat()
dbConnect()/dbReadTable()/dbWiteTable()
ref.
R Data Import/Export
This R Data Import Tutorial Is Everything You Need
check data
str()/class()/head()/tail()/identical()/all.equal()
special values
missing value
NA
is.na()/complete.cases()
na.fail()/na.omit()/na.exclude()/na.pass()
na.rm=TRUE
Inf, -Inf(positive and negative infinity)
NaN(Not a Number)
graphic
boxplot
outlier
histogrm
distribution
etc.
sort
sort()
rank()
ties.method
order()
how to break ties?
basic manipulate
data type
vector
matrix
array
factor
data.frame
list
判別/轉換
is.datatype()
as.datatype()
what
(ref. check data)
how
create
add
rbind()/cbind()
remove
factor level
functions
all()/any()
duplicated()/unique()
set operations
union()
intersect()
setdiff()
setequal()
is.element()
etc.
Operators
Arithmetic
?'*'
Logical
?'&'
Relational
?'>'
Assignment
?'='
select
indices
[]
[[]]
$
functions
which
subset
match, %in%
merge
cut
sample
etc.
apply family
apply
lapply
sapply
vapply
mapply
rapply
tapply
etc.