R Data type - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

R Data type

Description:

Index. (Matrix) (array) (dataFrame) . – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 28
Provided by: tist184
Category:
Tags: array | data | type

less

Transcript and Presenter's Notes

Title: R Data type


1
R Data type
  • ???

2
Index
  • ??(Matrix)
  • ??(array)
  • ??? ???(data Frame)
  • ?? ??
  • ?? ??

3
??(Matrix)
  • ??? matrix() ??
  • nrow - ??? ??
  • ncol - ??? ??
  • byrow ???? ????
  • ??,?? ?? dimnames()
  • ??? ??? ??
  • ??? ??

4
nrow - ??? ??
5
ncol - ??? ??
6
byrow ???? ????
7
??,?? ?? dimnames()
8
??? ??? ??
9
??? ??? ??
  • ?? ???? ? ??? ? ?? ?? ???

10
??? ??
11
?? ??
  • byrow ??? ???

12
??(array)
13
??? ???(data Frame)
  • ??? ???? ??? ????? ??? ?? ??? ??? ?? ??? ??, ???,
    ?? ?? ???? ?? ???
  • ??? ???? data.frame() ??
  • Table? ???

14
??? ?? ???
15
??? ?? ???
  • ??? lt- data values ? ?? ?? ? data ???
  • ??? ? ??? data ??? ???

16
str() ??
  • Str()?? R ??? ?? ??? ??? ???? ??

17
head() ??
  • ???? ??? ??? ???? ????? head() ??

18
head() ??

19
?,? ?? ?? ??? ??
20
?,? ?? ?? ??? ??
  • Colnames() ? ? ??? ?? ?? ??
  • Rownames() ? ? ??? ?? ?? ??

21
?? ??
  • ???? ???? ?? ?? ??? ?????? ??? ??? ??? ???? ????
    ??? class() ??

22
?? ?? class()
23
?? ?? colnames(),data.frame
24
?? ?? colnames(),data.frame
  • Colnames() ??? ? ??? ???? ??
  • Data.frame(list ??? ???? ???? ??
    num,char(varchar2) ???? ?? ??

25
as.factor()
26
as.factor()
  • x lt- c(m,f)
  • as.factor(x) ? ??? ??? F,M ??
  • as.numeric(as.factor(x)) ? levels ??? ?? 2,1 ??
  • Factor(c(m,f), levelsc(m,f)) ? ???
  • ??? ?? ?? M,F ???

27
Thank you
Write a Comment
User Comments (0)
About PowerShow.com