similar to: scoping problem

Displaying 20 results from an estimated 3000 matches similar to: "scoping problem"

2007 Sep 12
2
Evaluating args in a function
Can anyone explain what I'm doing wrong here: > fred <- data.frame() > class(fred) [1] "data.frame" > test.fn <- function(x,class=class(x)) {class} > test.fn(fred) Error in test.fn(fred) : promise already under evaluation: recursive default argument reference or earlier problems? R 2.5.1 on both Windows and SUSE Linux. -- Sanford Weisberg, sandy at
2013 Oct 25
2
R CMD check problem with R 3.0.2
Using SUSE Linux, Windows 32 bit and Windows 64 bit R 3.0.2 , I am unable to use R CMD check successfully. Here is the Windows 64 bit report: Z:\R\source\effects>R CMD check pkg * using log directory 'Z:/R/source/effects/pkg.Rcheck' * using R version 3.0.2 (2013-09-25) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file
2004 Jul 20
1
Accuracy in summary (PR#7121)
Full_Name: Sanford Weisberg Version: 1.9.1 OS: Win XP Submission from: (NULL) (160.94.148.2) > wm <- read.table(url("http://www.stat.umn.edu/~sandy/wmdata0.txt"), header=TRUE) > mean(wm$Spd1) [1] 7.7773 > summary(wm$Spd1) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.222 4.780 7.550 7.780 10.200 21.600 The mean of this variable DOES NOT ROUND to the value
2006 Dec 19
2
Random Effects Model
Hello, I am new to R, and I am trying to figure out how to use it for a random effects model. I am using version 2.4.0, and I also have the book Applied Linear Regression by Sanford Weisberg. I have four variables: Swimmer, Sex, Swim, and Difference. Swimmer identifies the number assigned to a particular person. Sex is male/female. Swim identifies the number swim from 1 to 6. Difference
2012 May 30
3
R learning
Hi, What is quickest way to learn R? I am unnecessarily having fear of learning R. rgds Parag Kulkarni Haridwar,India -- View this message in context: http://r.789695.n4.nabble.com/R-learning-tp4631814.html Sent from the R help mailing list archive at Nabble.com.
2011 Nov 10
2
2^k*r experimental design and anova
Hello, Can anyone point me to an online tutorial or book containing the easiest way to do ANOVA over the result data from a 2^k*r experiment. It is not clear to me if I can pass the raw data corresponding to each experiment or just the summarized data i.e. mean, sse, std, etc. I would like to get the: - box plot showing the effect for the different factors and levels - plot showing whether there
2013 Sep 19
1
Vignette problem and CRAN policies
Hello, All: The vignette with the sos package used "upquote.sty", required for R Journal when it was published in 2009. Current CRAN policy disallows "upquote.sty", and I've so far not found a way to pass "R CMD check" with sos without upquote.sty. I changed sos.Rnw per an email exchange with Prof. Ripley without solving the problem; see below. The
2007 Mar 06
2
bug: sticky symbol refs? (PR#9555)
Hello. What happens in the following is that I create two simple functions, f and g, on the workspace. Then I replace g. When I then call f, it uses the old version of g. Now clearly, the circumstances for this to happen must be quite special and rare. But I'd say they're not pathological. It seems to require two things: 1) masked versions of f and g on a search position lower down the
2012 Jun 13
3
How to plot linear, cubic and quadratic fitting curve in a figure?
Hi R experts, Could you please help me to fit a linear, cubic and quadratic curve in a figure? I was trying to show all these three fitting curves with different colour in one figure. I spent substantial time to figure it out, but I could not. I have given here a example and what I did for linear, but no idea for cubic and quadratic fitting curve > dput(test) structure(list(sp = c(4L, 5L,
2003 Apr 03
1
Tukey's one degree of freedom for nonadditivity?
Is there code available to decompose interactions involving at least one nominal factor with more than 2 levels as described, e.g., by Tukey or by Mandel (1971, Technometrics, 13: 1-18)? Tukey's model: E(y[i,j]) = mu0 + a[i] + b[j] + c*a[i]*b[j], estimating a, b, and c so sum(a) = sum(b)= 0. Mandel essentially describes a singular value decomposition of the interaction. Thanks,
2006 Jan 02
2
update?
I'm having problems with environments and update() that I expect have a simple explanation. To illustrate, suppose I wanted to make a very primitive Tukey one-degree-of- freedom for nonadditivity test and naively wrote: nonadd <- function(formula){ f <- lm(formula) v <- f$fitted.values^2 g <- update(f, . ~ . + v) anova(f,g) } x <-
2004 Jun 25
1
SER and NAT
I have a really simple question about a fairly complex problem: I have a Cisco 7960 behind a NAT. I have an Asterisk server behind a different NAT. I have a SER server (with rtpproxy installed) on a public IP adress. I've opened ports with static NAT to * and the Cisco. Without using SER, I can register the phone to *, I can complete calls, I just can't move audio. Reading the
2008 Dec 13
2
weird pasting of ".value" when list is returned
could someone explain why the name of FPVAL gets " .value" concatenated onto it when the code below is run and temp is returned. I've been trying to figure this out for too long. It doesn't matter when I put the FPVAL in the return statement. It happens regardless of whether it's first or last. Thanks. f.lmmultenhanced <- function(response, pred1, pred2) {
2004 Jun 16
2
gam
hi, i'm working with mgcv packages and specially gam. My exemple is: >test<-gam(B~s(pred1)+s(pred2)) >plot(test,pages=1) when ploting test, you can view pred1 vs s(pred1, edf[1] ) & pred2 vs s(pred2, edf[2] ) I would like to know if there is a way to access to those terms (s(pred1) & s(pred2)). Does someone know how? the purpose is to access to equation of smooths terms
2001 May 25
1
Cook-Weisberg confidence curves
Is there an existing function to compute Cook-Weisberg confidence curves for non-linear model parameters in R? Kari Ruohonen -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !)
2012 Mar 19
1
glm: getting the confidence interval for an Odds Ratio, when using predict()
Say I fit a logistic model and want to calculate an odds ratio between 2 sets of predictors. It is easy to obtain the difference in the predicted logodds using the predict() function, and thus get a point-estimate OR. But I can't see how to obtain the confidence interval for such an OR. For example: model <- glm(chd ~age.cat + male + lowed, family=binomial(logit)) pred1 <-
2007 Jun 04
3
Extracting lists in the dataframe $ format
I'm new to R and am trying to extract the factors of a dataframe using numeric indices (e.g. df[1]) that are input to a function definition instead of the other types of references (e.g. df$out). df[1] is a list(?) whose class is "dataframe". These indexed lists can be printed successfuly but are not agreeable to the plot() and lm() functions shown below as are their df$out
2005 Mar 03
3
creating a formula on-the-fly inside a function
I have a function that, among other things, runs a linear model and returns r2. But, the number of predictor variables passed to the function changes from 1 to 3. How can I change the formula inside the function depending on the number of variables passed in? An example: get.model.fit <- function(response.dat, pred1.dat, pred2.dat = NULL, pred3.dat = NULL) { res <- lm(response.dat ~
2013 Mar 31
1
lmer effects-type plot?
hello, all. while i have a mcmc running, i am looking at the frequestist method of my model. i have never done HLM so i am looking for ways to plot them that might yeild something useful like dr. fox's effects plot package. this is my model, where dem is democracy ranked continuous 1:10, trsut is a 3 level categorical variable, cpi is 1:10, etc... > hier.jags2.mod <- lmer(dem ~
2007 Dec 19
1
library(rpart) or library(tree)
Hi, I have a problem with library (rpart) (and/or library(tree)). I use a data.frame with variables "pnV22" (observation: 1, 0 or yes, no) "JTemp" (mean temperature) "SNied" (summer rain) I used function "rpart" to build a model: library(rpart) attach(data.frame) result <- rpart(pnV22 ~ JTemp + SNied) I got the following tree: n=55518 (50