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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -