similar to: matching of arguments in ...?

Displaying 20 results from an estimated 11000 matches similar to: "matching of arguments in ...?"

2009 Nov 02
2
"object not found" within function
Hi, I am trying to write a function to compute many cross-tabulations with the -svytable- command. Here is a simplified example of the structure of my code (adapted from the -svytable- help file): data(api) func.example<-function(variable){ dclus1<-svydesign(id=~1, weights=~pw,data=apiclus1, fpc=~fpc) svytable(~ variable, dclus1) } When I call this function with:
2012 Dec 10
3
Warning message: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
Hi there I'm trying to fit a logistic regression model to data that looks very similar to the data in the sample below. I don't understand why I'm getting this error; none of the data are proportional and the weights are numeric values. Should I be concerned about the warning about non-integer successes in my binomial glm? If I should be, how do I go about addressing it? I'm
2008 Aug 06
1
Warning when using survey:::svyglm
Howdy, Referencing the below exchange: https://stat.ethz.ch/pipermail/r-help/2006-April/103862.html I am still getting the same warning ("non-integer #successes in a binomial glm!") when using svyglm:::survey. Using the API data: library(survey) data(api) #stratified sample dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc)
2005 Oct 09
1
enter a survey design in survey2.9
Hi dears, I expect that Mr Thomas Lumley will read this message. I have data from a complexe stratified survey. The population is divide in 12 regions and a region consist to and urban area and rural one. there to region just with urbain area. stratification variable is a combinaison of region and area type (urban/rural) In rural area, subdivision are sample with probabilties proporionnal to
2008 Sep 12
2
Fw: Complex sampling survey _ Use of survey package
-------------------------------------------------- From: "Ahoussou Sylvie" <sylvie.ahoussou at antilles.inra.fr> Sent: Friday, September 12, 2008 9:48 AM To: "Thomas Lumley" <tlumley at u.washington.edu> Subject: Re: [R] Complex sampling survey _ Use of survey package > Thanks for your answer > > I think I made a mistake when I recopied the 5 first rows of
2010 Nov 11
3
Evaluation puzzle
The survexp function can fail when called from another function. The "why" of this has me baffled, however. Here is a simple test case, using a very stripped down version of survexp: survexp.test <- function(formula, data, weights, subset, na.action, rmap, times, cohort=TRUE, conditional=FALSE, ratetable=survexp.us, scale=1, npoints, se.fit,
2008 Sep 09
1
survey package
Version 3.9 of the survey package is now on CRAN. Since the last announcement (version 3.6-11, about a year ago) the main changes are - Database-backed survey objects: the data can live in a SQLite (or other DBI-compatible) database and be loaded as needed. - Ordinal logistic regression - Support for the 'mitools' package and multiply-imputed data - Conditioning plots,
2008 Sep 09
1
survey package
Version 3.9 of the survey package is now on CRAN. Since the last announcement (version 3.6-11, about a year ago) the main changes are - Database-backed survey objects: the data can live in a SQLite (or other DBI-compatible) database and be loaded as needed. - Ordinal logistic regression - Support for the 'mitools' package and multiply-imputed data - Conditioning plots,
2008 Aug 13
1
Arguments to lm() within a function - object not found
Hi all, I'm having some difficulty passing arguments into lm() from within a function, and I was hoping someone wiser in the ways of R could tell me what I'm doing wrong. I have the following: lmwrap <- function(...) { wts <- somefunction() print(wts) # This works, wts has the values I expect fit <- lm(weights=wts,...) return(fit) } If I call my function lmwrap, I get
2012 Sep 06
1
[Rscript] difficulty passing named arguments from commandline
Wanting a commandline solution (for a problem detailed @ http://mailman.unidata.ucar.edu/mailing_lists/archives/netcdfgroup/2012/msg00279.html ) I turned to Rscript, and whacked out the q'n'd https://github.com/TomRoche/GEIA_to_netCDF/blob/master/netCDF.stats.to.stdout.r However it wasn't as quick as hoped, because I spent quite a bit of time figuring out how to pass the arguments.
2001 Dec 17
1
environments again
In a previous message I was not clear enough in my querry. I have the following program: tst<- function() { x <- c(32.7,32.3,31.5,32.1,29.7,29.1,35.7,35.9,33.1, 36.0,34.2,31.2,31.8,28.0,29.2,38.2,37.8,31.9, 32.5,31.1,29.7) g <- rep(1:7,rep(3,7)) s <- rep(1:3,7) cat(" Only x and g \n") aov1(x,g) cat("\n\n Now x, g and s \n") aov1(x,g,s=s) }
2010 Dec 19
1
package survey
Hi R users, could someone help me to find out which formulas, for standard error calculation, are used in following example: a=data.frame(weights=rep(c(10,1),c(4,1)),fpc=rep(41,5),uk=rep(1,5)) srs<-svydesign(id=~1, weights=~weights, data=a) srs1<-svydesign(id=~1, weights=~weights,fpc=~fpc, data=a) svytotal(~uk,srs) total SE uk 41 9 svytotal(~uk,srs1) total SE uk 41
2013 Mar 19
1
source, sys.source and error line numbers
Hi, is there a way to retrieve the line number of where en error occurred when sourcing a file in a tryCatch statement? Is it stored somewhere accessible? It is not found in the error object. Consider the following code/output and note the difference in the traceback between source (has line number) and sys.source (has no line number). Thank you, Renaud ######## # code ######## codefile <-
2005 Dec 21
2
Newbie - Summarize function
Dear R Users, I have searched through the archives but I am still struggling to find a way to process the below dataset. I have a dataset that has stratum and plot identifier. Within each plot there is variable (Top) stating the number of measurments that should be used to to calculate the mean to the largest "top" elements within one of the vectors (X). I would like to process
2006 Feb 01
1
recover() (PR#8546)
After using options(error=recover), it takes a long time (too long) to get back to the prompt. Look at: Browse[1]> recover() Enter a frame number, or 0 to exit 1: window(test, start = c(15, 1), end = c(17, 1), extend = TRUE) 2: window.ts(test, start = c(15, 1), end = c(17, 1), extend = TRUE) 3: as.ts(window.default(x, ...)) 4: window.default(x, ...) 5: function () 6: eval(quote(browser()),
2004 Aug 09
1
error when calling debugger()
Hi, I am getting an error message when I am trying to run the debugger() on the last.dump. The debugger() stops after I make a selection. Could someone please suggest what it might mean? The R log is included below. This is R-1.8.1 on RH 7.3. Thanks, Vadim > load("last.dump.rda") > debugger(last.dump) Message: Error in split(x, f) : Group length is 0 but data length > 0
2018 Oct 05
2
Dots are not fixed by make.names()
Hi It seems that names of the form "..#" and "..." are not fixed by make.names(), even though they are reserved words. The documentation reads: > [...] Names such as ".2way" are not valid, and neither are the reserved words. > Reserved words in R: [...] ... and ..1, ..2 etc, which are used to refer to arguments passed down from a calling function, see
2016 Apr 20
1
locked environments
Shouldn't the following 4 ways to alter an object in a locked environment either all work or all fail? (All working would be nice, I think.) E <- new.env() assign("var", c(1,2,3,4), envir=E) lockEnvironment(E, bindings=FALSE) E$var[1] <- 101 ; E$var #[1] 101 2 3 local(var[2] <- 102, envir=E) #Error in eval(expr, envir, enclos) : # cannot add
2009 May 04
1
ellipsis problem
Hi, I'm confused about the use of ellipsis in function arguments. I'm trying to write a wrapper for plot to automate the combination of plot() and points() calls for a data.frame. Some arguments seem to get passed through to the inner plot, while others cause an error: Error in eval(expr, envir, enclos) : ..1 used in an incorrect context, no ... to look in As a minimal example: tmp
2010 Sep 21
3
Error in eval(expr, envir, enclos)
I am absolutely new to R and I am aware of only a few basic command lines. I was running a robust regression in R, using the following command line library (MASS) rfdmodel1 <- rlm (TotalEmployment_2004 ~ MISSISSIPPI + LOUISIANA + TotalEmployment_2000 + PCWhitePop_2004 + UnemploymentRate_2004 + PCUrbanPop2000 + PCPeopleWithACollegeDegree_2000 + PCPopulation.of.or.over.65.years.of.age_2004)