Alex
2018/03/22
install.packages('readxl',repos="http://cran.rstudio.com/")
library(readxl)
write.csv(df, file = file_name)
Sys.setenv(JAVA_HOME='C:\\Program Files\\Java\\jre7') # for 64-bit version
Sys.setenv(JAVA_HOME='C:\\Program Files (x86)\\Java\\jre7') # for 32-bit version
library(xlsx)
write.xlsx(df, file = file_name)
if (condition) {
# do something ...
}
if (cond.) {
# do something ...
} else {
# do the other ...
}
if (cond.) {
# do something ...
} else if (cond. 2) {
# do another ...
} else if (cond. 3) {
# do another ...
} else {
# do another ...
}
if (condition) { ... } [ else if ] ... [ else ]
while (condition) {
# do something ...
}
while (condition) {
# do something ...
...
break
}
while (condition) { ... }
my_vec <- c(1,2,3,4,5)
for (temp_var in vec){
print(temp_var)
}
for (i in 1:length(vec)){
print(vec[i])
}
for ( ... ) {
...
break
...
next
}
for (temporary_variable in object) { ... }