search for: mycolnames

Displaying 2 results from an estimated 2 matches for "mycolnames".

Did you mean: colnames
2004 Mar 23
1
help on data.frames/data.entry
Dear R-help, I have a matrix D of dimensions 200 x 26; rows are my cases and columns are my variables. I would like to create a data.frame "DF" with row.names= myrownames (this is a vector of characters of length 200) and column names "mycolnames" (a vector of characters of length 26). I could find the option in data.frame for naming rows, but not for naming columns. So I did: > data.entry(D, Names= mycolnames) > DF <- data.frame(D,row.names=myrownames) but after the first command (i.e. > data.entry(D, Names= mycolnames)...
2007 Nov 25
1
Constructin a call of function including permutation of column names - how to escape parentheses?
...ot;), item2=c("B","C")), item3=...): The individual vectors in the list are permutations of colnames of a dataframe. The trouble is that I am not able to handle escaping of parentheses correctly. I was trying the following: library(gregmisc) combinations.2<-combinations(12,2,mycolnames) combinations.2.call<-apply(combinations.2,1,function(x){do.call(paste,c( as.list(x),sep="\",\""))}) combinations.2.call<-paste("c(\"",combinations.2.call,"\")",sep="") but now calling call("list",combinations.2.list) does...