小時候讀過「界門綱目科屬種」,是林奈體系(Linnaeu's System)的生物分類法(Taxonomic rank),對照英文,原來是這樣:
界 (Kingdom)
門(動物 Phylum/ 植物 Division)
綱(Class)
目(Order)
科(Family)
屬(Genus)
種(Species)
小時候讀過「界門綱目科屬種」,是林奈體系(Linnaeu's System)的生物分類法(Taxonomic rank),對照英文,原來是這樣:
界 (Kingdom)
門(動物 Phylum/ 植物 Division)
綱(Class)
目(Order)
科(Family)
屬(Genus)
種(Species)
To run R script, install RStudio.
Add a new R script file and save it as a *.R file.
The code in the new script file can be:
a = 1
b = 2
a+b
When executing the script file, move the cursor to the first line of the script.
Press the run button, one line is run and the cursor is moved to the next line.
In the above example, press the run button three time for the three lines as below:
Related Information:
This article explains the commands to load and save R data.
Firstly, declare data x:
x = c(1,2,3,4,5,6)
Get the local path: getwd()
path = getwd()
Change path:
pathnew = file.path(path,"Desktop")
Set the local path: setwd()
setwd(pathnew)
Save
filename = file.path(pathnew,"test.RData")
save(x,file=filename)
Clear workplace
rm(list=ls())
Load
filename = file.path(getwd(),"test.RData")
load(filename)
> x
[1] 1 2 3 4 5 6
Related Information:
The R Project for Statistical Computing software is available with multiple operating systems such as Windows, MacOS.
It may be downloaded here:
https://www.r-project.org
After installation, try declare values with '=' or '<-' and see the average result with 'mean' function.
> x<-c(1,2,3,4,5)
> mean(x)
[1] 3
> y<-c(2,3,4,5,6,7,8)
> mean(y)
[1] 5
> z=c(5,6,7)
> mean(z)
[1] 6
>
Result:
To remove the above warning messages, open terminal and type:
defaults write org.R-project.R force.LANG en_US.UTF-8
Reference:
[記宅] 在 Mac 上安裝 R 語言 (R Studio, R) 新手介紹
Related Information: