-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rhistory
110 lines (110 loc) · 1.98 KB
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
3+5
798+4875298+6372916548
89+153+30
272/3
90.66667*12
internet <- 89
internet
power <- 153
bills <- 30
bills+internet+power
total <- bills+internet+power
total
total/3
total*12
internet <- 89
power <- 153
bills <- 30
read.csv('~/Desktop/r-data/vandevijver-CLIN-STAT435.csv')
dat <- read.csv('~/Desktop/r-data/vandevijver-CLIN-STAT435.csv')
dat[1:10,1:10]
dat[1:10,1]
dat[:10,1]
dat[290:295,1]
dat[290:,1]
install.packages('RColorbrewer')
install.packages('RColorBrewer')
?RColorBrewer
??RColorBrewer
display.brewer.pal.all()
display.brewer.all()
library(RColorBrewer)
display.brewer.all()
3+5
3+5
setwd('Desktop/r-data/')
getwd()
setwd("~/Desktop/r-data")
getwd()
list.files()
read.csv('vandevijver-CLIN-STAT435.csv')
height <- 164
height
height <- height + 10
height
new <- 155
total <- height+new
total
evens <- c(2,4,6,8)
odds <- evens + 1
odds
dat <- read.csv('vandevijver-CLIN-STAT435.csv')
View(dat)
# hello I am Elsie
dat
head(dat)
dim(dat)
dat[1,1]
dat[0,0]
dat[1,]
dat[,1]
dat[1:10,]
dat[1:10,3:5]
dat[1:10,2] # b)
dat[2,1:10] # c)
dat[c(1,3,5,9),]
dat[1:5,'Age']
dat[1:5,'age']
colnames(dat)
dat[1:5,c('Age', "ER", "Grade")]
dat$Intrinsic.Subtype
newage <- dat$Age+1
dat[1:5,'Age']
newage[1:5]
mean(dat$Age)
min(dat$Age)
sd(dat$Age)
dat$newage <- dat$Age + 1
dim(dat)
dat[1:5, c('Age', 'newage')]
?mean
??read
plot(dat$Age)
sort(dat$Age)
plot(sort(dat$Age))
hist(dat$Age)
colnames(dat)
plot(dat$Age, dat$RFS.months)
plot(dat$Age, dat$newage)
plot(dat[,10], dat[,13])
plot(dat[,10], dat[,12])
str(dat)
plot(dat$Intrinsic.Subtype)
plot(dat$Grade)
table(dat$Grade)
as.factor(dat$Grade)
dat$Grade
plot(dat$Grade)
plot(as.factor(dat$Grade))
dat$Grade <- as.factor(dat$Grade)
str(dat)
plot(dat$Grade)
plot(dat$Grade, main = 'Intrinsic Subtype Histogram')
plot(dat$Grade, main = 'Grade Histogram')
plot(dat$Grade, main = 'Grade Histogram', xlab='Grade')
plot(dat$Grade, main = 'Grade Histogram', xlab='Grade', ylab='Number of patients')
?plot
install.packages('RColorBrewer')
dat[1,1]
setwd('Desktop/r-data/')
34 190 # b)