What do you want to save?
Add Code snippet
New code examples in category R
-
Arif Billah 2021-09-19 07:51:02
for in r
for (val in x) { if(val %% 2 == 0) count = count+1 } Add solution -
August Mohr 2021-09-18 07:48:02
how to do linear regression in r
lm(y ~ . , data = ...) Add solution -
-
Vijay Likhite 2021-09-17 17:59:03
reorder columns in r
col_order <- c("Species", "Petal.Width", "Sepal.Length", "Sepal.Width", "Petal.Length") my_data2 <- my_data[, col_order] my_data2 # or my_data2 <- my_data[, c(5, 4, 1, 2, 3)] Add solution -
LooooN 2021-09-17 12:09:03
print in r
cat(c("hello", "world", "\n")) Add solution -