R for healthscience
type of variables:
integer: definite numbers with no .5 .6 examples: 1 ,2 ,3
charecter: u should put it between " "
u put things and give them values
r<- 1
p <- portugal
# 5 big mistakes
1- a is not A " capital is different"
2- when combining different values use c() to make a vector: c(1,2,3) not (1,2,3)
3- "a==b" means "is a equal to b?" while "a=b" means make a equal to b: BIG DIFFERENCE
4- Be aware of NA ( non existing data " data: they can ruin everything
" to name a vector"
vec_aux<-c(3,4)
List: is a collection of vectors that can be of different length or type, e.g. make a list
then name it :
Comments
Post a Comment