Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Basic Programming
# Create a vector. apple_colors <- c('red','green',"yellow",'red','red') print(apple_colors) # Create a List and Matrix list1 <- list(c(2,5,3),21.3,sin) print(list1) #Create a Matrix M=matrix(c('a','a','b','e','f','g'),nrow=2,ncol=3,byrow=TRUE) print(M) #Create an Array - Creates two 3X3 matrices a <-array(c('green','yellow'),dim=c(3,3,2)) print(a) # Create a factor object. factor_apple <- factor(apple_colors) # Print the factor. print(factor_apple) mystring<- "applying the nlevels function we can know the number of distinct values" print(mystring) print(nlevels(factor_apple)) # Create the data frame. BMI <- data.frame( gender = c("Male", "Male","Female"), height = c(152, 171.5, 165), weight = c(81,93, 78), Age =c(42,38,26) ) print(BMI)
run
|
edit
|
history
|
help
0
Ex21-01-21
untitled
Chi Square Tests - Goodness of Fit Test [Coffee drinkers]
Mandelbrotset
Linear regression Model [Empirical Models]
recursive function
Are the items of a vector in a given data frame? (Filtering basics)
error de redondeo
24-09-2020Def-função
Delete True Values