search for: varsign

Displaying 4 results from an estimated 4 matches for "varsign".

Did you mean: assign
2004 Sep 24
0
Function sort.data.frame
...the formula vars <- unlist(strsplit(formc, "[\\+\\-]")) vars <- vars[vars!=""] # Remove spurious "" terms # Build a list of arguments to pass to "order" function calllist <- list() pos=1 # Position of + or - for(i in 1:length(vars)){ varsign <- substring(formc,pos,pos) pos <- pos+1+nchar(vars[i]) if(is.factor(dat[,vars[i]])){ if(varsign=="-") calllist[[i]] <- -rank(dat[,vars[i]]) else calllist[[i]] <- rank(dat[,vars[i]]) } else { if(varsign=="-")...
2011 Oct 05
3
R CMD check
Dear R-Group, I have a function that sorts a data frame and oneo of the lines in the function is: vars <- unlist(strsplit(formc, "[\\+\\-]")) The function works fine and the above line is always reached. However, when I include the function in a package and run "R CMD check pkgname" it gives this error message: '\+' is an unrecognized escape in character
2009 Oct 13
2
General means of matching a color specification to an official R color name
...- unlist(strsplit(formc, "[\\+\\-]")) vars <- vars[vars != ""] # Remove any extra "" terms # Build a list of arguments to pass to "order" function calllist <- list() pos <- 1 # Position of + or - for(i in 1:length(vars)){ varsign <- substring(formc, pos, pos) pos <- pos + 1 + nchar(vars[i]) if(is.factor(x[, vars[i]])){ if(varsign == "-") { calllist[[i]] <- -rank(x[, vars[i]]) } else { calllist[[i]] <- rank(x[, vars[i]])...
2007 Apr 20
2
sorting data in R
hello, I'd like know how to sort a data frame in R for example how I should do to sort by Catholic with swiss data frame like below thanks Fertility Agriculture Examination Education Catholic Infant.Mortality Courtelary 80.2 17.0 15 12 9.96 22.2 Delemont 83.1 45.1 6 9 84.84 22.2