search for: varlab

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

Did you mean: variab
2005 Nov 21
4
attributes of a data.frame
...able.labels While one can use the first three (i.e. names(foo) or class(foo)), the fourth one can only be used via: attributes(foo)$variable.labels (which is kind of a tedious thing to type) Is it or would be possible to simply use: variable.labels(foo) like the first three attributes? I tried: varlab <- function(x) attributes(x)$variable.labels but then I cannot use this to assign a specific label: > varlab(foo)[1] <- "some string" Error: couldn't find function "varlab<-" Thank you, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd...
2005 Oct 07
1
returning a modified fix()-ed dataframe
...28), gender=c("Male", "Female", "Male")) require(Hmisc) label(my.data$age) <- "Respondent's age" label(my.data$gender) <- "Responent's gender" variables <- function(x) { dataf <- data.frame(variable=NA, label=NA) varlab <- NA for (i in 1:length(names(x))) { dataf[i,1] <- names(x)[i] dataf[i,2] <- label(x[,i]) varlab[i] <- label(x[,i]) } fix(dataf) # I assume this would return a modified dataf for (i in which(varlab...
2010 May 26
1
Custom axis function in lattice:::xyplot
...except get the correct label. How do I get access to the factor level being plotted in each panel within my custom axis function? It may be easier to illustrate than explain, so here is a dummy example, including a version of my custom axis function. require(lattice) ## custom axis function axis.VarLabs <- function(side, ...) { if(isTRUE(all.equal(side, "top"))) { M <- function(lims) min(lims) + (diff(lims) / 2) xlim <- current.panel.limits()$xlim panel.axis(side = side, outside = TRUE, at = M(xlim), tck = 1, line.col = "black...
2014 Aug 27
1
Re R CMD check checking in development version of R
...bal variables for data sets in a package". I went to look at the Check results for one of my packages (analogue) on CRAN: http://cran.r-project.org/web/checks/check_results_analogue.html Under the r-devel build machines I'm seeing a lot of things like this: Stratiplot.default : axis.VarLabs: no visible global function definition for ?current.panel.limits? Stratiplot.default : axis.VarLabs: no visible global function definition for ?panel.axis? Stratiplot.default : axis.VarLabs: no visible global function definition for ?which.packet? Stratiplot.default : ax...