How do I import data in SensoMineR?
-
Once your SensoMineR session is opened, importing data is very simple. You just have to copy and paste the following line code:
mydata <-read.table("C:/Mon_R/myfile.txt", header=T, sep="\t", quote="", dec=".")
-
Here, mydata refers to the name of the data set to be used in your SensoMineR session and myfile.txt refers to the name of the data set to be imported.
-
Notice that the data set you want to import must be saved as a .txt with separator tabulation, the names of the descriptors are written on the first row, the character used in the file for decimal points is ".".
-
For some functions you may need to identify your individuals, to do so just add the row.names option (here row.names=1 means that the individuals' names are in the first column):
mydata <-read.table("C:/Mon_R/myfile.txt", header=T, sep="\t", quote="", dec=".", row.names=1)
-
If you want more information just type "?read.table" in your R session.
- Example: choc_etu.xls