similar to: lme4: Error in getResponseFormula(form) : "Form" must be a two sided formula

Displaying 20 results from an estimated 2000 matches similar to: "lme4: Error in getResponseFormula(form) : "Form" must be a two sided formula"

2012 Jul 02
2
using "na.locf" from package zoo to fill NA gaps
Hi everybody, I have a small question about the function "na.locf" from the package "zoo". I saw in the help that this function is able to fill NA gaps with the last value before the NA gap (or with the next value). But it is possible to fill my NA gaps according to the last AND the next value at the same time? Actually, I want R to fill my gaps with the method of
2011 Sep 30
1
last observation carried forward +1
Hi R-helpers I'm looking for a vectorised function which does missing value replacement as in last observation carried forward in the zoo package but instead of a locf, I would like the locf function to add +1 to each time a missing value occurred. See below for an example. > require(zoo) > x <- 5:15 > x[4:7] <- NA > coredata(na.locf(zoo(x))) [1] 5 6 7 7 7 7 7 12 13
2010 Feb 22
2
Creating regularly spaced time series from irregular one
Hello, I have a series of intraday (high-frequency) price data in the form of POSIX timestamp followed by the value. I sucesfuly loaded that into "its" package object. I would like to create from it a regularly spaced time series of prices (for example 1min, 5min, etc apart) so i could calcualte returns. There is an interpolation function locf() that for timestamp with value NA uses last
2013 Mar 18
2
data.frame with NA
I have this little data.frame http://dl.dropbox.com/u/102669/nanotna.rdata Two column contains NA, so the best thing to do is use na.locf function (with fromLast = T) But locf function doesn't work because NA in my data.frame are not recognized as real NA. Is there a way to substitute fake NA with real NA? In this case na.locf function should work Thank you
2003 Nov 14
4
LOCF - Last Observation Carried Forward
Hi! Is there a possibilty in R to carry out LOCF (Last Observation Carried Forward) analysis or to create a new data frame (array, matrix) with LOCF? Or some helpful functions, packages? Karl --------------------------------- Gesendet von http://mail.yahoo.de Schneller als Mail - der neue Yahoo! Messenger. [[alternative HTML version deleted]]
2013 Apr 29
1
how to add new rows in a dataframe?
Hi, dat1<- read.table(text=" id??????????????? t???????????????????? scores 2???????????????? 0??????????????????????? 1.2 2???????????????? 2???????????????????????? 2.3 2???????????????? 3??????????????????????? 3.6 2???????????????? 4??????????????????????? 5.6 2???????????????? 6??????????????????????? 7.8 3???????????????? 0??????????????????????? 1.6 3????????????????
2006 Apr 26
2
About regression and plot
Dear R-help, This is my first R day. I want to ask some more beginner's questions. Q1. How can I obtain the covariance matrix for parameter estimates of a multiple regression? I checked ?lm but didn't get the information. Q2. How can I see the old graphs in the graph window? Q3. Can R plot animated graph? For example, I want to see the dynamic change of a 2D graph during a time
2011 Jan 11
1
scaling to multiple data files
Hello, I have logging information for multiple machines, which I am trying to summarize and graph. So far, I process each host individually, but I would like to summarize the user count across multiple hosts. I want to answer the question "how many unique users logged in on a certain day across a group of machines"? I'm not quite sure how to scale the data frame and analysis to
2010 Jun 30
1
merge.zoo and fill
Hello again, I merge different zoo time series with prices at different dates. This returns a multivariate zoo object with NA's at various points i.e., 2010-02-28 NA NA NA NA 850.2 2444.4 NA NA NA NA NA NA NA 2010-03-01 61.1 55.3 61.5 81.24 NA NA 1712.2 3.3 11139.3 163.7 2242.4 9015.6 109.791 2010-03-31
2010 Apr 12
1
N'th of month working day problem
Dear Gabor, Thanks for your reply. however: > tail(DJd) ^DJI.Close 2010-04-01 10927.07 2010-04-05 10973.55 2010-04-06 10969.99 2010-04-07 10897.52 2010-04-08 10927.07 *2010-04-09 10997.35* > tail(ag) 2009-11-30 10344.84 2009-12-31 10428.05 2010-01-31 10067.33 2010-02-28 10325.26 2010-03-31 10856.63 *2010-04-30 10997.35 * It seems the script "makes up"
2011 Oct 09
1
help with using last observation carried forward analysis for a clinical trial please
Hi, I have a series of id's with multiple visits and questionnaire scores. This is a clinical trial that will be analyzed using the last observation carried forward method. In other words, in order to comply with intent to treat analysis when many subjects withdraw, data points for the last visit must be generated and filled in with the last observation. The ultimate goal is to tabulate the
2006 Jan 20
3
fractional factorial design in R
Hi, i need to create a fractional factorial design sufficient to estimate the main effects. The factors may have any number of levels, let's say any number from 2 to 6. I've tried to use the library conf.design , but i cannot figure out how to write the code. For example, what is the code for a design with 5 factors (2x3x3x5x2) and only main effects not confounded? thanks in advance!
2010 Jun 30
2
merging and adding time series
Hello I have two series (that can have with different frequencies or with missing values). I merge them and use na.locf, getting a zoo objet with a common index and two core columns. How can I add this columns getting a new zoo series? Any other way of adding two asynchronou series? regards -- View this message in context:
2010 Sep 20
2
Substitute NAs by zero
Hello How can I substitute all NA values by zero in a R zoo series? I've been reading about na.locf and na.omit but I think none of them do what I need. thanks. -- View this message in context: http://r.789695.n4.nabble.com/Substitute-NAs-by-zero-tp2546715p2546715.html Sent from the R help mailing list archive at Nabble.com.
2013 Mar 26
1
Shifting cells and removing blanks
Hi , I've been struggling with this problem. Initially I thought something like a na.locf would help but I'm at a dead end. I have a data set like this: ID Prod1 Prod2 Prod3 Prod4 Prod5 01 A - B - C 02 - F - G - 03 H - - - J And I would like to remove all
2006 Mar 18
2
extraction - subsets
Hi everybody, let us assume i have the following matrixX and vectorY matrixX <- runif(100) dim(matrixX) <- c(10,10) vectorY <- as.matrix(as.character(seq(1,10))) if I define: subsample<-c("2") i can extract the rows from matriX based on the elements in vectorY which are listed in subsample matrixX[vectorY==subsample] if I define subsample with more than 1 element, such
2006 Apr 25
10
www.r-project.org
Dear R users and developpers, My question is adressed to both of you, so I choose R-help to post it. Are there any plans to jazz up the main R website : http://www.r-project.org The look it have now is the same for a long time and kind of sad compared to other statistical package's website. Of course, the comparison is not fair, since companies are paying web designers to draw lollipop
2011 Oct 08
1
Filling missing days in xts time series
Hi, I have a bunch of irregularly spaced xts time series (with a POSIX index), and I'm trying to write a function that fillls the missing days. Using a solution suggested by Gabor Grothendieck for zoo, I wrote the following: # FD: Fill missing days FD<-function(ser) {rng<-range(time(ser)) > temp<-merge(ser,xts(,seq(rng[1],rng[2],"day"))) >
2018 Jan 08
2
Replace NAs in split lists
You can enforce these assumptions by sorting on multiple columns, which leads to na.locf(df1[ order(df1$ID,df1$Value), ]) On Mon, Jan 8, 2018 at 4:19 PM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: > Yes, you are right if the IDs are always sequentially-adjacent and the > first non-NA value appears in the first record for each ID. > -- > Sent from my phone. Please
2018 Jan 08
0
Replace NAs in split lists
"Enforce" is overstating it... results will differ if there are no non-NA values for a given ID, and there is a potential further discrepancy if there are multiple non-NA values. But these issues were not identified by the OP, so may not be relevant in their case. -- Sent from my phone. Please excuse my brevity. On January 8, 2018 6:41:33 AM PST, Eric Berger <ericjberger at