Displaying 5 results from an estimated 5 matches for "stellathepug".
2011 Sep 21
2
Weighted Average on More than One Variable in Data Frame
Dear R Users,
I have looked for a solution to the following problem and I have not been
able to find it on the archive, through Google or in the R documentation.
I have a data frame, say df, which has 4 variables, one of which I would
like to use as a grouping variable (g), another one that I would like to use
for my weights (w) The other two variables are variables (x1 and x2) for
which I would
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 <-
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 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
2011 Jun 24
4
What does class "call" mean? How do I make class "formula" into a "call"?
I have a list called "tabs" that I would like to have the same structure as my list "eqSystem." The two look like they have the same format but they are different because when I look at their attributes, class(eqSystem[[1]]) is "call" but class(tabs[[1]]) is "formula". I want to have class(tabs[[1]]) as a call too. So what does "call" mean? And how