Tìm lời bài hát - Search Lyric

2013/12/13

Sổ tay R

Kể từ thứ 6 ngày 13 tháng 12 năm 2013 .
Ghi chép quá trình tìm hiểu R.

Thư mục làm việc hiện hành: 
getwd()
File > Change Dir
dir()
setwd(path)

Chạy

source("mycode.R")


1L - số nguyên
1/Inf = 0
NaN

attributes(object)

Vector
c(..) ~ vector(..)

as.numeric(x)
as.complex(y)
as.logical(z)
as.character(s)
as.integer(d)

Matrix

 m <- 1:10="" font="">
dim(m) <- c="" font="">

x <- 1:3="" font="">
y <- 10:12="" font="">

cbind(x,y) # Gộp theo cột
rbind(x,y) # Gộp theo dòng

List
[[]]

Factor


is.na
is.nan

Data Frame

read.table()
read.csv()
row.names


Names

names(x) <- b="" c="">
x <- a="1,b=2,c=3)</b" list="">

m <- matrix="" nrow="2,ncol=2)</b">
dimnames(m) <- a="" b="" c="" d="" list="">


No comments:

Post a Comment