How do you delete the header in a dataframe?

前端 未结 7 652
故里飘歌
故里飘歌 2021-01-04 19:40

I want to delete the header from a dataframe that I have. I read in the data from a csv file then I transposed it, but it created a new header that is the name of the file a

7条回答
  •  梦毁少年i
    2021-01-04 20:06

    A function that I use in one of my R scripts:

    read_matrix <- function (csvfile) {
        a <- read.csv(csvfile, header=FALSE)
        matrix(as.matrix(a), ncol=ncol(a), dimnames=NULL)
    }
    

    How to call this:

    iops_even <-  read_matrix('even_iops_Jan15.csv')
    iops_odd  <-  read_matrix('odd_iops_Jan15.csv')
    

提交回复
热议问题