similar to: Why Numeric Values Become Factors in Data Frame

Displaying 20 results from an estimated 100 matches similar to: "Why Numeric Values Become Factors in Data Frame"

2012 Jul 05
1
reshape2 errors on data frame
I've successfully reformatted data frames from long to wide with reshape2, but this time I'm getting errors that I want to understand and resolve. Here's the data frame structure and the results of the melt() and dcast() functions: str(waterchem) 'data.frame': 128412 obs. of 8 variables: $ site : Factor w/ 64 levels "D-1","D-2","D-3",..: 1 1
2012 May 17
3
New Eyes Needed to See Syntax Error
One of many scripts to produce 4 lattice plots on one page keeps throwing an error. I've tried manipulating the file to eliminate the error, but have not been able to do so. The error is: > source('bicarb.R') Error in source("bicarb.R") : bicarb.R:15:1: unexpected symbol 14: 15: hco33 ^ The 'h' is in column 0 so the caret would be column -1, but it's
2008 Oct 03
1
3D scatter, groups, RdbiPgSQL...
hello, I wish to create some 3d scatter diagrams visualising different grouped data set by a given field in the database. I tried the scatterplot3d package, as well as the plot3d and scatter3d functions (both within the rgl resp. Rcmdr package). My first question is, whether is it possibe to group data in the scatterplot3d and plot3d, because I did not succeed to use the groups = ...
2006 Jan 20
1
Teliax Down?
Is anyone else experiencing trouble with Teliax? I can only intermittently register to, and am not able to place any outgoing calls through my assigned gateway; voip-co3.teliax.com. -Rusty -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060120/aa8ab017/attachment.htm
2007 Apr 16
2
Simplify simple code
Dear expeRts, I would simplify following code. --------------------------------------------- youtput <- function(x1, x2){ n <- length(x1) y <- vector(mode="numeric", length=n) for(i in 1:n){ if(x1[i] >=5 & x1[i] <= 10 & x2[i] >=5 & x2[i] <=10) y[i] <- 0.631 * x1[i]^0.55 * x2[i]^0.65 if(x1[i] >=10 & x1[i] <= 15 &
2006 Aug 24
1
Lattice symbol size and legend margins
Hi: I am using the following command: xyplot(dat6$CO3*1e6 ~ dat6$irradiance, data=dat6, group=ref, xlab=list(label=expression(paste("Irradiance (", mu, "mol photons", m^"-2", " ", s^"-1", ")")), cex=1.3), ylab=list(label=expression(paste("Carbonate concentration (x ", 10^"6", " ", kg^"-1",
2024 Feb 02
1
gathering denominator under frac
Hi friends - I'm plotting a ratio of bicarbonates i ggplot2 and ylab(expression(paste(frac("additive BIC","true BIC")))) worked OK - but now I have been asked to put the chemistry instead - so I wrote ?ylab(expression(paste(frac("additive",HCO[3]^"-","true",HCO[3]^"-")))) - and frac saw that as additive = numerator and HCO3- =
2024 Feb 02
1
gathering denominator under frac
?s 10:01 de 02/02/2024, Troels Ring escreveu: > Hi friends - I'm plotting a ratio of bicarbonates i ggplot2 and > > ylab(expression(paste(frac("additive BIC","true BIC")))) worked OK - but > now I have been asked to put the chemistry instead - so I wrote > >
2024 Feb 02
1
gathering denominator under frac
... or if I understand correctly, simply expression(frac(additive ~ HCO[3]^"-", true ~ HCO[3]^"-" ))) Cheers, Bert On Fri, Feb 2, 2024 at 3:06?AM Rui Barradas <ruipbarradas at sapo.pt> wrote: > ?s 10:01 de 02/02/2024, Troels Ring escreveu: > > Hi friends - I'm plotting a ratio of bicarbonates i ggplot2 and > > > >
2011 Nov 02
2
Proper Syntax for Logical Subset in Subset()
I have measured values for 47 chemicals in a stream. After processing the original data frame through reshape2, the recast data frame has this structure: 'data.frame': 256 obs. of 47 variables: $ site : Factor w/ 143 levels "BC-0.5","BC-1",..: 1 1 1 2 2 2 2 2 2 2 ... $ sampdate : Date, format: "1996-04-19" "1996-05-21" ... $ Acid :
2013 Feb 21
2
Arimax with intervention dummy and multiple covariates
Hi I'm trying to measure the effect of a policy intervention (Box and Tiao, 1975). This query has to do with the coding of the model rather than with the particulars of my dataset, so I'm not providing the actual dataset (or a simulated one) in this case, apart from some general description. The time series are of length n=34 (annual observations between 1977 and 2010). The policy
2013 Apr 26
2
Remove reciprocal data from a grouped animal social contact dataset
Hi r-help forum, I have been collecting contact data (with proximity logger collars) between a few different species of animal. All animals wear the collars, and any contact between the animals should be detected and recorded by both collars. However, this isn't always the case and more contacts may be recorded on one collar of the two. This is fine, it depends on battery life and other
2001 Jun 25
1
Macromedia Flash
Hi everybody, do you know if is possible to run the Macromedia Flash environment under wine? Thanks you in advance T.E.D.
2012 Jun 05
0
NADA Applied to my Data
I need a nudge in the right direction to get started using NADA. I bought Helsel's second addition and am currently reading it; NADA is installed in R. My data has been restructured with a couple of awk scripts. The data frame structure now has a flag if the quantity is censored (ceneq1 column) as well as a lower and upper limit for censored data. For present purposes, interval censoring
2012 Jun 06
0
R-help Digest, Vol 112, Issue 6
Rich, The documentation for cenboxplot states that the second argument must be logical and not integer. the function cenboxplot substitutes synthetic values for censored values using ros, hence the error message from the ros method. I also do not understand how you expect group = 'SO4' to work. It is not clear that the function will replicate 'SO4' to make a single group.
2013 Mar 29
1
Create values based on a table of conditions
Hi R help forum, I have a simple data frame of four columns - one of numbers (really a categorical variable), one of dates and one of data. I have over 500,000 data points to work with, spread over 40 files, each named after a different animal. These are contact data recorded by proximity loggers over two years between the animals of the file name and collars being worn by other animals. The
2015 Jun 19
2
Sobre data.table
Mª Luz, si el comando de Carlos te devuelve 0 es que no hay NA's. Da igual que tus columnas sean caracteres o número. Lo que intuyo es que tienes celdas con la frase "NA" que interpretas como NA. Mandanos el summary de tu data.table y lo vemos... ----- Mensaje original ----- De: "MªLuz Morales" <mlzmrls en gmail.com> Para: "Carlos J. Gil Bellosta"
2012 Jan 02
1
Creating ZOO Matrix from Data Frame
I believe that I have a basic understanding of zoo and how to use read.zoo on a text file, What I have not seen in the zoo help files and vignettes is how to convert a data frame to a zoo matrix for irregular time series analyses. An example data frame is structured like this: str(burns.cast) 'data.frame': 256 obs. of 47 variables: $ site : Factor w/ 143 levels
2001 Nov 05
1
Problem to transfer Splus functions
Hello I would like to transfer some Splus functions in R. But I have a problem first about this assignation in Splus : xnom <- deparse(substitute(x)) I am a bad programmer : I don't understand the R help How to modify these functions ? Thank you very much for your help Here are the four functions and a data test
2009 Apr 13
2
weighted mean and by() with two index
Hi expeRts, I would like to calculate weighted mean by two factors. My code is as follows: R> tmp <- by(re$meta.sales.lkm[, c("pc", "sales")], re$meta.sales.lkm[, c("size", "yr")], function(x) weighted.mean(x[,1], x[,2])) The result is as follows: R> tmp size: micro yr: 1994 [1] 1.090