similar to: What does class "call" mean? How do I make class "formula" into a "call"?

Displaying 20 results from an estimated 9000 matches similar to: "What does class "call" mean? How do I make class "formula" into a "call"?"

2011 Apr 15
2
Function for deleting variables with >=50% missing obs from a data frame
Hello R users! I have several data frames where some of the variables have many missing observations. For example, Q1 in one of my data frames has over 66% of its observations missing. I have tried imputation with mice but it does not work for all the data frames and I get the following message or a similar message to this: iter imp variable 1 1 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11
2011 Mar 18
2
How do I delete multiple blank variables from a data frame?
Dear List Members,I have 55 data frames, each of which with 272 variables and 267 observations. Some of these variables are blanks but the blanks are not the same for every data frame. I would like to write a procedure in which I import a data frame, see which variables are blank, and delete those variables. My data frames have variables named P1 to P136 and Q1 to Q136. I have a couple of
2011 Apr 19
1
Subsetting a data frame by dropping correlated variables
Hello R Users! I have a data frame that has many variables, some with missing observations, and some that are correlated with each other. I would like to subset the data by dropping one of the variables that is correlated with another variable that I will keep int he data frame. Alternatively, I could also drop both the variables that are correlated with each other. Worry not! I am not deleting
2011 Apr 07
1
df with max function applied to 6 lags of a variable?!?
Hello everyone! I have a data frame of 136 variables with 270 observations. I would like to create a new data frame such that each element of that data frame contains the maximum value of the 6 prior lags of the initial data frame. So for example, if my original data frame, A, were A1=c(7.72, 7.94, 7.56, 7.54, 0.93, 0.59, 7.21, 8.00, 7.19, 7.57)A2=c(4.27, 3.70, 3.80, 3.67, 3.83, 3.95, 4.02, 2.06,
2011 Apr 08
1
Package mice: Error in if (meth[j] != "") { : argument is of length zero
Dear R users, I am using package mice and I am getting the error " Error in if (meth[j] != "") { : argument is of length zero." I have tried using several different versions of R (even the one that will be coming out this month) to no avail. I am using RStudio as my interface with R. Also note that I had run this a couple of days ago and it was working fine; I can't,
2011 Feb 09
3
Loop in variable names
Hello! I would like to do some tables for several variables and I would like to write a loop that does the table for each variable. I should also point out that my data set has several missing observations and sometimes the observations that are missing are not the same for all my variables. What I would like to do: table(StoreData$CompanyID, !is.na(StoreData$P2))
2011 Jun 21
1
Setting up list of many equations for systemfit
Dear List Members,I am trying to set up a large system of equations and I am trying to find a simple way to set up the list command under the package system fit. Here is the example from system fit and what I am trying to do: EQ1 <- Y1 ~ X1 + X2 + X4EQ2 <- Y2 ~ X2 + X3EQ3 <- Y3 ~ X2 + X3 + X4EQ4 <- Y4 ~ X1 + X3 + X4eqSystem <-list(form1 = EQ1, form2 = EQ2, form3 = EQ3, form4 = EQ4)
2011 Apr 13
1
Overcoming warning in package zoo
Dear R users,I have a long program that I am trying to run--I am using RStudio as my interface with R. The pieces of the program run well individually but when I try to run everything in sequence it bogs down because of a warning after using rollmax from package zoo. Here is the warning: "In rollmax.zoo(zoo(Pmat), 7, na.pad = FALSE, align = "right") : na.pad is deprecated. Use
2011 Jun 28
2
How do I output all the R-squares of an SUR? summary(fitSUR$eq[[1:4]])$r.squared does not work
Greetings R Users, I have a system of equations for which I would like to output all the R-squares. Assume there are four equations in my system, the only way I found to output all the R-squares is by calling them out one by one as this: summary(fitSUR$eq[[1]])$r.squared summary(fitSUR$eq[[2]])$r.squared summary(fitSUR$eq[[3]])$r.squared summary(fitSUR$eq[[4]])$r.squared But isn't there a
2012 Oct 17
1
extracting and restricting coefficients
Hi  I want to fit two equations simultaneously EQ1<-Y1~X1+X2 EQ2<-Y2~X1+X2 eqsystem<-list(Y1HAT=EQ1,Y2HAT=EQ2) fitols<-systemfit(eqsystem, method="OLS", data=BB) How do I get coefficients for the first equation? R code How do I restrict coefficient of X2 in the first equation (say , restrict it to less than  zero). R code Your help is appreciated. Dereje [[alternative
2011 Jun 22
3
Help Needed on Merging Columns by Summation
Dear Sirs/Madam, I am a beginner to R, and I am currently working on a data matrix which looks like this: > head(oligo) ko:K00001 ko:K00003 ko:K00005 ko:K00008 ko:K00009 ko:K00010 ko:K00012 AAA 370 631 365 67 164 455 491 KAA 603 1208 170 157 68
2011 Feb 14
1
R not working after loading lattice
Hello! Happy Valentine's Day... After I loaded the package lattice in R, it did not work. Then when I closed R and restarted it, R started with an error message and here is the feedback that I got from the R Console: Loading required package: Hmisc Loading required package: survival Loading required package: stats Loading required package: graphics Loading required package: splines Error in
2009 Apr 13
2
joint estimation of two poisson equations
Dear list members, Is there a package somewhere for jointly estimating two poisson processes? I think the closest I've come is using the "SUR" option in the Zelig package (see below), but when I try the "poisson" option instead of the "SUR" optioin I get an error (error given below, and indeed, reading the documentation of the Zelig package, I get the impression
2011 Aug 23
2
Replacing NAs in one variable with values of another variable
Hello everyone, I am trying to figure out a way of replacing missing observations in one of the variables of a data frame by values of another variable. For example, assume my data is X X <-as.data.frame(matrix(c(9, 6, 1, 3, 9, "NA", "NA","NA","NA","NA", 6, 4, 3,"NA", "NA", "NA", 5, 4, 1, 3),
2011 Nov 15
1
Estimating model parameters for system of equations
Hi all, I'm trying to estimate model parameters in R for a pretty simple system of equations, but I'm having trouble. Here is the system of equations (all derivatives): eqAlgae <- (u_Amax * C_A) * (1 - (Q_Amin / Q_A)) eqQuota <- (p_max * R_V) / (K_p + R_V) - ((Q_A-Q_Amin)*u_Amax) eqResource <- -C_A * (p_max * R_V) / (K_p + R_V) eqSystem <- list(C_A = eqAlgae, Q_A = eqQuota,
2012 Apr 20
1
pasting a formula string with double quotes in it
Hello everyone, I have tried several ways of doing this and searched the documentation and help lists and I have been unable to find an answer or even whether it is possible to do it. I am pasting together a formula and I need to insert double quotes around the strings. Here's an example: location <- c("AL", "AK", "MA", "PA") v=2 test <-
2006 Jun 01
4
FW: How to create a new package?
Hi, I'm a group of functions and I would like to create a package for load in R. I have created a directory named INE and a directory below that named R, for the files of R functions. A have created the files DESCRIPTION and INDEX in the INE directory. The installation from local zip files, in the R 2.3.0, results but to load the package I get an error like: 'INE' is not a
2007 Feb 21
2
file path
Hello, It is possible to return the path of the current working R-file (in execution)? Thanks, Rita Sousa. [[alternative HTML version deleted]]
2011 Jun 23
0
Loops, Paste, Apply? What is the best way to set up a list of many equations?
Is there a way to apply paste to?list(form1 = EQ1, form2 = EQ2, form3 = EQ3, form4 = EQ4)?such that I don't have to write form1=EQ1 for all my models?(I might have a list of 20 or more)? I also need the EQs to read the formulas associated with them. For example, below, I was able to automate the name assignment but I could not figure out how to?to set up the list using?paste or other
2006 Dec 12
2
tklistbox...
Hi everyone, I have different listboxes in the same toplevel window. The problem is, if I select (by left clicking) one of those listbox elements, the current selection in the other listboxes is cleared! Anybody knows how I can prevent this? Thanks, --------------------------------------------------- Rita Sousa DME - ME: Departamento de Metodologia Estatística - Métodos Estatísticos INE -