Displaying 1 result from an estimated 1 matches for "dfintron".
Did you mean:
defintion
2011 Sep 20
2
How to transfer variable names to column names?
...am tallying row numbers, as shown below.
> nrow(mC_Explant)
[1] 14480
> nrow(mC_Callus)
[1] 23320
> nrow(mC_RegenPlant)
[1] 8108
etc.
I want to create a new data frame which has the variable names as column headings, and then a single row with the nrow tallies. My first step was this:
dfIntron <- c(nrow(mC_Explant), nrow(mC_Callus), nrow(mC_RegenPlant))
Then, to set the column names, I tried this, and got the following error:
colnames(dfIntron) <- c("mC_Explant", "mC_Callus", "mC_RegenPlant")
Error in `colnames<-`(`*tmp*`, value = c("mC_Expl...