How to read in column vectors from a .csv file in R -


so have data being processed in python i'm outputting .csv file. r able read .csv file in such way turns dataframe in of columns vectors.

is possible , how format .csv happen? thanks!

first, vectors sequence of data elements. , data frames lists of equal length vectors.

hence, can reference each column of data frame vector.

df <- read.csv('c:\\path\\to\\datafile.csv')  v1 <- df[[1]]  # column number v2 <- df[["col1"]]  # column name v3 <- df$col1  # column name 

Comments