R is not reading my csv file properly? -
i new r programming language. can able load csv file r. semicolon separated csv file. there totally 33 attributes. r reads 1 column, link dataset
https://archive.ics.uci.edu/ml/datasets/student+performance#
i had tried using sep(";") while reading csv file in r. had tried convert various formats csv text,dif, , nothing works.
your appreciated.
df1 <- read.csv('student-mat.csv', sep=";") df2 <- read.csv('student-por.csv', sep=";")
works without problem. maybe had forgotten put equal sign between sep
, ";"
.
> str(df1) 'data.frame': 395 obs. of 33 variables: $ school : factor w/ 2 levels "gp","ms": 1 1 1 1 1 1 1 1 1 1 ... $ sex : factor w/ 2 levels "f","m": 1 1 1 1 1 2 2 1 2 2 ... $ age : int 18 17 15 15 16 16 16 17 15 15 ... $ address : factor w/ 2 levels "r","u": 2 2 2 2 2 2 2 2 2 2 ... $ famsize : factor w/ 2 levels "gt3","le3": 1 1 2 1 1 2 2 1 2 1 . ....
Comments
Post a Comment