similar to: ggplot's aes_ doesn't work as expected for x=factor()

Displaying 20 results from an estimated 3000 matches similar to: "ggplot's aes_ doesn't work as expected for x=factor()"

2006 Jul 13
1
writeForeignSAS and potential extensions
Dear R-devel, I've made some potential extensions to writeForeignSAS in 'foreign' that I wanted to pass along if anyone is interested. I've attached the diff -u output against the version found in foreign_0.8-15 and an .R file with my changes. (In this .R file, the function is named writeForeignSAS7 to simplify testing/comparisons.) I've tried to alter the current
2019 Feb 16
4
Duda error sintaxis
Buenas tardes chicos, estoy intentando hacer un gráfico que resuma para cada dia de la semana la información de algunos distritos específicos de los que contiene mi variable, ejecuto esta sintaxis pero me da un error Error: Mapping should be created with `aes() or `aes_()`. Alguien me puede orientar sobre que estoy haciendo mal, llevo mucho rato atascada. Muchas gracias df_nuevofinal %>%
2008 Oct 12
1
Conditionally skip over "for(..){" and "}"??
Hi Folks, I'm wondering if there's a secret trick to achieve the following. I have some big code for analysis related to a named variable, which will be one of several in the columns of a dataframe, and I would like to be able to choose between a run for just one of these variables, or a run which loops over them all. So, for a single run, I could have the following kind of thing in a
2003 Nov 10
3
Reading an upper triangular matrix
Hola! I have data in the form of a symmetric distance matrix, in the file I have recorded only the upper triangular part, with diagonal. The matrix is 21x21, and the file have row and col names, and some other information. I am trying to read with the following code (I tried many variations on it, but all give the same error). The items in the data file is delimited by white space. (Part
2010 Aug 11
2
assignment functions with inherited class error
# Two test for a class like this: setClass("XXX", representation=representation( "matrix" ) ) i<-new("XXX"); m=matrix(); colnames(m)<-c("colA"); i at .Data=m; # >i # An object of class ?XXX? # colA #[1,] NA #________________________________________________________________________ #First Test "varnames<-" <- function(x,value){
2009 Oct 02
3
help with regexp mass substitution
Hello * i have to rename a lot of variables, and, given that they have regular name constructs, I would like to use regexps. Here's a dump of my head(names(df)) varnames <- c("id.quest", "txt.1.3", "col1.1.3", "col2.1.3", "col3.1.3", "col4.1.3", "col5.1.3", "txt.2.3", "col1.2.3",
2006 Sep 15
1
Formula aruguments with NLS and model.frame()
I could use some help understanding how nls parses the formula argument to a model.frame and estimates the model. I am trying to utilize the functionality of the nls formula argument to modify garchFit() to handle other variables in the mean equation besides just an arma(u,v) specification. My nonlinear model is y<-nls(t~a*sin(w*2*pi/365*id+p)+b*id+int,data=t1,
2006 Feb 12
1
lme, nlsList, nlsList.selfStart
Dear listers, I am trying to fit a model using nlsList() using alternately a SSfol() selfstart function or its developped equivalent formulae. This preliminary trial works well mydata<-groupedData(Conc~Tps|Organ,data=mydata) mymod1<-nls(Conc~SSfol(Dose,Tps,lKe,lKa,lCl),data=mydata) as well as a developped form: mymod2<-nls(Conc~Dose * exp(lKe+lKa-lCl) *
2010 Feb 11
4
Access variables by string
Dear all, I have two probably very easy questions: (1) Is there a way to access certain variables by their string-based name representation? Example: numbers <- c("one", "two", "three") varname <- "numbers" print(varname[2]) (2) I need this functionality for a customized na.exclude() function that I am building, which should only exclude rows
2013 Jan 11
2
[LLVMdev] Make a comparation with IR builder
Hi Justin, my class is a visitor pattern and I use accept method to go recursive in suboject in my AST. In locals I store AllocaInst pointer. void *visit(var1_init_decl_c *symbol) { llvm::Type *lType; varNames.clear(); varType = ""; symbol->var1_list->accept(*this); /* get a vector contains variable names */ symbol->spec_init->accept(*this); /* Store in
2006 Aug 16
1
bwplot in loop doesn't produce any output
Hi, running the following code by itself runs as expected. ---------------------------------------------------------------------------- k <- 1 i <- 2 j <- 3 NumName <- varnames[num.cols[k]] FacNames <- varnames[fac.cols[c(i,j)]] tmp <- paste(FacNames[1],NumName,sep="~") fml <- formula(paste(tmp,FacNames[2],sep="|")) bwplot(fml, data
2012 Feb 07
2
predict.naiveBayes() bug in e1071 package
Hi, I'm currently using the R package e1071 to train naive bayes classifiers and came across a bug: When the posterior probabilities of all classes are small, the result from the predict.naiveBayes function become NaNs. This is an issue with the treatment of the log-transformed probabilities inside the predict.naiveBayes function. Here is an example to demonstrate the problem (you might need
2010 Jun 28
1
mathematical expression in varnames of lattice parallel plot
How can I insert mathematical expressions for variable names in a lattice parallel plot? I tried to implement mathematical expressions in varnames, however, without success. For example, neither parallel(~iris[1:4] | Species, iris, varnames=c("P[Width]", "Petal[length]", "alpha[Width]", "Sepal[Length]")) nor parallel(~iris[1:4] | Species,
2013 Apr 18
2
trouble with write.foreign
I am trying to write a 10000x8 matrix into a text file so I can read it into SAS. When I tried using write.table I could not get just 8 columns and 10000 rows it would just write all the data in a line until it hit the end and went to the next line. I tried instead using write.foreign and I got an error message: Error in if (varnames[v] != names(varnames)[v]) cat("LABEL ", varnames[v],
2013 Jan 11
0
[LLVMdev] Make a comparation with IR builder
On Fri, Jan 11, 2013 at 8:20 AM, Manuele Conti <manuele.conti at sirius-es.it>wrote: > Hi Justin, > my class is a visitor pattern and I use accept method to go recursive in > suboject in my AST. > In locals I store AllocaInst pointer. > > > void *visit(var1_init_decl_c *symbol) { > llvm::Type *lType; > > varNames.clear(); > varType = "";
2003 Apr 04
3
trellis.graphic in for-loop
Hi list, I am unsuccessfully trying to produce a serious of trellis barcharts from within a for-loop. The barcharts work outside the loop. What am I missing? Example attached. Thanks Herry #XXXXXXXXXXXXXXXXXXXXXX trellis.device(bg="white") trellis.par.get("fontsize")->fontsize fontsize$default<-16 trellis.par.set("fontsize",fontsize)
2013 Jul 04
1
Modificar una función de un paquete
Muchas gracias Javier, Lo que yo quiero es cambiar el título de la leyenda que dice "Pearson residuals" a español "Residuales de Pearson", pero no me doy cuenta como. También en lugar de "p-value", que diga "Valor de P". Es posible? Manuel 2013/7/4 Marcuzzi, Javier Rubén <javier.ruben.marcuzzi@gmail.com> > Estimado Manuel Spíndola > >
2007 Oct 16
1
Adding axis lines to splom plots
Hi, I am trying to produce a 30x30 lattice grid. The 30 variables naturally fall into three groups of ten and I would like to add thicker axis lines around these to highlight this. However, I can only do this separately, so far, and I don't know how to superimpose the grid with the thicker lines (separating the 10x10 groups) onto the overall grid of all 30x30 plots. I enclose a
2011 Aug 21
1
Multiple R linear models into one Latex table
Dear community, I had been looking for an easy way to produce latex tables from R output. xtable() and the package apsrtable produce good outputs but they are not exactly what I was looking for. I wrote this code that generates regression tables from multiple R linear models. I want to share it because it might be useful for someone else, and because I would appreciate comments on how to
2003 Feb 01
3
Read.table problem
Hi ! I am new to R, and using the MAC version onto Mac OS 9.1. My question concerns the problem I encounter when I try to read some data I have using the read.table function. I always get an error of type : Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : line 1 did not have 9 elements Here is my code: varnames <- c("names", "symbol",