0

I have a folder Bad with "bad" samples in form of several csv-Files with numerical values. The idea is to parse to them and use the matrices with the correct column names. The matrices should then be in the list bad_list.

  setwd("Bad")
  bad <- list.files(pattern="*.csv")
  bad_list = lapply(bad, read.csv, sep = ";", stringsAsFactors=FALSE, header=TRUE)

The result of

bad_list[1]

is a nice matrix. However, the result for the following

colnames(bad_list[1])
ncol(bad_list[1])

is NULL for both commands. Any ideas?

Joachim
  • 3,210
  • 4
  • 28
  • 43

1 Answers1

0

Using bad_list[[1]] does it. [[ ]] is the index-operator for lists.

Joachim
  • 3,210
  • 4
  • 28
  • 43