similar to: Proper Syntax for Logical Subset in Subset()

Displaying 20 results from an estimated 6000 matches similar to: "Proper Syntax for Logical Subset in Subset()"

2011 Nov 29
5
Why Numeric Values Become Factors in Data Frame
I have a data frame with 1 factor, one date, and 37 numeric values: str(waterchem) 'data.frame': 3525 obs. of 39 variables: site : Factor w/ 64 levels "D-1","D-2","D-3",..: 1 1 1 1 1 ... $ sampdate : Date, format: "2007-12-12" "2008-03-15" ... $ CO3 : num 1 1 6.7 1 1 1 1 1 1 1 ... $ HCO3 : num 231 228 118 246
2011 Oct 27
2
Syntax Check: rshape2 melt()
This is my first excursion into using reshape2 and I want to ensure that the melt() function call is syntactically correct. The unmodifed data frame is organized this way: head(tds.anal) site sampdate param quant 1 UDS-O 2006-12-06 TDS 10800 4 STC-FS 1996-06-14 Cond 280 7 UDS-O 2007-10-04 Mg 1620 9 UDS-O 2007-10-04 SO4 7580 19 JCM-10B 2007-06-21 Ca 79 20
2011 Oct 24
2
Syntax Help for xyplot()
Thanks to David's help I subset my large data set and produced a smaller one for a single stream and 7 factors of interest. The structure of this data frame is: str(burns.tds.anal) 'data.frame': 718 obs. of 4 variables: $ site : Factor w/ 143 levels "BC-0.5","BC-1",..: 1 1 4 6 4 4 4 5 5 5 $ sampdate: Date, format: "1996-06-02"
2011 Oct 31
1
reshape2: Lost Values Between melt() and dcast()
Working with 5 subset streams from my source data frame, three of them successfully call dcast(), but two fail: jerritt.cast <- dcast(jerritt.melt, site + sampdate ~ param) Aggregation function missing: defaulting to length and winters.cast <- dcast(winters.melt, site + sampdate ~ param) Aggregation function missing: defaulting to length Yet both data frames have the values in their
2011 Nov 09
4
Interpreting Multiple Linear Regression Summary
I would appreciate pointers on what I should read to understand this output: summary(lm(TDS ~ Cond + Ca + Cl + Mg + Na + SO4)) Call: lm(formula = TDS ~ Cond + Ca + Cl + Mg + Na + SO4) Residuals: ALL 1 residuals are 0: no residual degrees of freedom! Coefficients: (6 not defined because of singularities) Estimate Std. Error t value Pr(>|t|) (Intercept) 125 NA
2012 Jan 09
1
Different lm() Residuals Output
All but one of the summaries of multiple linear regressions in this analysis set present the residuals by min, 1Q, median, 3Q, and max. Example: lm(formula = TDS ~ Cond + Ca + Cl + Mg + Na + SO4, data = snow.cast) Residuals: Min 1Q Median 3Q Max -277.351 -32.551 -2.621 40.812 245.272 The one that doesn't has only a small number of rows (23) and presents the
2011 Jan 10
3
Help with Data Transformation
Greetings, I am new to R and am having trouble with parsing a file with the following characteristics: * Individual results for a single sample are written to multiple lines. * First 16 columns are constant from sample to sample. * Remaining 10 need to be matched up (cross-tabbed?) o (the exact contents for the remaining 10 vary from sample to sample, as indicated in
2009 Apr 20
7
Fitting linear models
I am not sure if this is an R-users question, but since most of you here are statisticians, I decided to give it a shot. I am using the lm() function in R to fit a dependent variable to a set of 3 to 5 independent variables. For this, I used the following commands: >model1<-lm(function=PBW~SO4+NO3+NH4) Coefficients: (Intercept) SO4 NO3 NH4 0.01323 0.01968
2011 Jan 13
0
Help with Data Transformation - RESOLVED
Hi Dennis, SOLVED!!! My thanks to both you, John, and others who chimed in. Took a little more digging before finally working, but it is working! Here's a little more of what I did and the ultimate resolutions: I installed the reshape2 library from CRAN. Executed > (.packages()) [1] "reshape2" "stats" "graphics" "grDevices"
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
2012 Jan 01
2
Lattice: Understanding How Points Connected by Lines
A data frame has one factor, one date, and one numeric column. When I plot these using the default pch of the open circle (first attachment), xyplot(TDS ~ sampdate | she.s, data = sheep.cast, main = 'TDS in Sheep Creek', ylab = 'Concentration (mg/L)', xlab = 'Time') I see the higher concentration points toward the right on several panels. But, when I change to using a
2011 Sep 13
1
ZOO: Learning to apply it to my data
I have read ?zoo but am not sure how to relate the parameters (x, order.by, frequency, and style) to my data.frame. The structure of the data.frame is 'data.frame': 11169 obs. of 4 variables: $ stream : Factor w/ 37 levels "Burns","CIL",..: 1 1 1 1 1 1 1 1 1 1 ... $ sampdate: Date, format: "1987-07-23" "1987-09-17" ... $ param : Factor w/
2010 Jul 12
0
Error in storage.mode(test) <- "logical"
Hi There, I get the following error from the code pasted below: Error in storage.mode(test) <- "logical" : object 'HGBmt12_Natl_Ave_or_Facility' not found library(RODBC) library(car) setwd("c://temp//cms") a07.connect <- odbcConnectAccess2007("DFC.accdb") sqlTables(a07.connect) ##provides list of tables## dataset <-
2009 Sep 11
1
format (?) problems with data imported from postgres
Good day, I read some data from a PostgreSQL database by a following script: library(Rdbi) library(RdbiPgSQL) # conn becomes an object which contains the DB connection: conn <- dbConnect(PgSQL(), host="localhost", dbname="BVS", user="postgres", password = "*******") query_duj_kal <- dbSendQuery(conn, "select zdroj as well, cas as date, fe2,
2005 Dec 08
2
'mean' and 'sd' calculations do not match
Dear list, I am using R 2.1.1 on a Fedora 3 Linux, 32 bit PC. If I compute the aggregated mean and the standard deviation I get standard deviation values for factors where the mean was not computed. It seems to me that this is somehow related to the NA values. But I don't quite understand what is going wrong? Could it be related to the data import already? Some of the imported data got the
2009 Sep 13
2
zoo plot: yearly marks on X-Axis
On Sun, 2009-07-26 at 13:17 +0200, Poersching wrote: > stvienna wiener schrieb: > > Hi all, > > > > I am plotting a financial time series, but I need a more detailed X-Axis. > > > > Example: > > x <- zoo(rnorm(1:6000), as.Date("1992-11-11")+c(1:6000)) > > plot(x) > > > > The X-Axis is labeled "1995", "2000"
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.
2002 Jan 22
1
glm.predict?
I've been attempting to calculate the predictions from a poisson glm object, along these lines: predict(foo.glm, type = "response") and predict(foo.glm, type = "response", se.fit = TRUE) foo.glm is arrived at this way: foo.glm <- glm(Insects ~ Dad * Mum + Location, offset = log(MM), family = "poisson", data = model.df) There are two
2018 May 18
0
Gluster failure disk is full
Hi, I have a 3 way gluster 4 setup. I had a "mishap" of some sort and I lost node no2. There was and is 660gb spare on no1 and no3 but no2 is so full I cannot mount it at boot, nor manually. I was making a 80gb VM so no idea what happened, nor how to fix it? -------------- next part -------------- An HTML attachment was scrubbed... URL:
2013 Jan 08
0
bagging SVM Ensemble
Dear Sir, I got a problem with my program. I would like to classify my data using bagging support vector machine ensemble. I split my data into training data and test data. For a given data sets TR(X), K replicated training data sets are first randomly generated by bootstrapping technique with replacement. Next, Support Vector Mechine (SVM) is applied for each bootstrap data sets. Finally, the