similar to: 'with' usage question

Displaying 20 results from an estimated 5000 matches similar to: "'with' usage question"

2000 Mar 31
1
R: one bananna aov() question
Hello world, I'm trying to do an anova on data in data.set, dependent variable is a column named "dep.var", grouping variable is in a column called "indep.var", and is.factor(indep.var) is TRUE... why can't I just do aov(dep.var ~ indep.var, data = data.set)? What have I done to deserve this?! What gives? Am I missing something totlly obvious? R-base-1.0.0-1,
2005 Jun 17
0
another aov results interpretation question
I commend you to (a) the recent article by Doug Bates on "Fitting nonlinear mixed models in R" pp. 27-30 in the latest issue of "R News" available from "www.r-project.org" -> Newsletter and (b) Doug's book with Pinheiro (2000) Mixed-Effects Models in S and S-PLUS (Springer). I suggest you try the same analysis using in "lmer", library(lme4), and
2008 May 22
1
How to account for autoregressive terms?
Hi, how to estimate a the following model in R: y(t)=beta0+beta1*x1(t)+beta2*x2(t)+...+beta5*x5(t)+beta6*y(t-1)+beta7*y(t-2)+beta8*y(t-3) 1) using "lm" : dates <- as.Date(data.df[,1]) selection<-which(dates>=as.Date("1986-1-1") & dates<=as.Date("2007-12-31")) dep <- ts(data.df[selection,c("dep")]) indep.ret1
2013 Mar 21
4
easy way of paste
Hello, Is there a better way to use paste such as: a = paste(colnames(list.indep)[1],colnames(list.indep)[2],colnames(list.indep)[3],colnames(list.indep)[4],colnames(list.indep)[5],sep="+") > a [1] "aa+dummy1+dummy2+bb+cc" I tried a = paste(colnames(list.indep)[1:5],sep="+") > a [1] "aa" "dummy1" "dummy2"
2012 Sep 29
1
Unexpected behavior with weights in binomial glm()
Hi useRs, I'm experiencing something quite weird with glm() and weights, and maybe someone can explain what I'm doing wrong. I have a dataset where each row represents a single case, and I run glm(...,family="binomial") and get my coefficients. However, some of my cases have the exact same values for predictor variables, so I should be able to aggregate up my data frame and
2012 Jan 15
1
Need help interpreting the logit regression function
Hello R community, I have a question about the logistic regression function. Specifically, when the predictor variable has not just 0's and 1's, but also fractional values (between zero and one). I get a warning when I use the "glm(formula = ... , family = binomial(link = "logit"))" which says: "In eval(expr, envir, enclos) : non-integer #successes in a binomial
2009 Feb 03
1
How to show variables used in lm function call?
Hello R users, I am new to R and am wondering if anyone can help me out with the following issue: I wrote a function to build ts models using different inputs, but when R displays the call for a model, I cannot tell which variables it is using because it shows the arguments instead of the real variables passed to the function. (e.g Call: lm(formula = dyn(dep ~ lag(dep, -1) + indep)) --->
2004 Oct 10
3
some help interpreting ANOVA results, please?
On Sun, 10 Oct 2004, RenE J.V. Bertin wrote: > Could I ask some hints/help in interpreting the following ANOVA results, > please? This concerns an experiment where I study the incidence and > severity of motion sickness. I have Sickness.norm, a subjective > discomfort/sickness estimate, normalised to 0..1, the session time T > (normalised to 0..1 and binned in 0.2 wide bins) and a
2009 Jun 21
2
Help on qpcR package
I am using R on a Windows XP professional platform. The following code is part of a bigger one CODE press=function(y,x){ library(qpcR) models.press=numeric(0) cat("\n") dep=y print(dep) indep=log(x) print(indep) yfit=dep-PRESS(lm(dep~indep))[[2]] cat("\n yfit\n") print(yfit) yfit.orig=yfit presid=y-yfit.orig press=sum(presid^2)
2010 Mar 16
3
function arguments: name of an object vs. call producing the object?
In a function, say foo.glm for glm objects I want to use the name of the object as a label for some output, but *only* if a glm object was passed as an argument, not a call to glm() producing that object. How can I distinguish these two cases? For example, I can use the following to get the name of the argument: foo.glm <- function(object) { oname <- as.character(sys.call())[2]
2005 Mar 30
2
Step error
Could anyone tell me what am I doing wrong? > pro<-function(indep,dep){ + d<-data.frame(indep) + form<-formula(lm(dep~.,data=d)) + forward<-step(lm(dep~X1,data=d),scope=form,trace=0,direction='f') + return(forward) + } > pro(m,q) Error in inherits(x, "data.frame") : Object "d" not found Where q is a vector with the dependent variable's
2008 Sep 03
1
test if all predictors in a glm object are factors
I'm trying to develop some graphic methods for glm objects, but they only apply for models where all predictors are discrete factors. How can I test for this in a function, given the glm model object? That is, I want something that will serve as an equivalent of is.discrete.glm() in the following context: myplot.glm <- function(model, ...) { if (!inherits(model,"glm"))
2018 May 21
0
removing part of a string
Hello, Try this. ss1 <- "z:f(5, a=3, b=4, c='1:4', d=2)" ss2 <- "f(5, a=3, b=4, c=\"1:4\", d=2)*z" fun <- function(s) sub("(\\().*(\\))", "\\1\\2", s) fun(ss1) #[1] "z:f()" fun(ss2) #[1] "f()*z" Hope this helps, Rui Barradas On 5/21/2018 2:33 PM, Vito M. R. Muggeo wrote: > dear all, > I am stuck
2018 May 21
1
removing part of a string
I would use sub("\\(.*\\)", "()", s) It is essentially the same as Rui's suggestion, but I find the purpose to be more clear. It might also be a little more efficient. HTH Ulrik On Mon, 21 May 2018, 15:38 Rui Barradas, <ruipbarradas at sapo.pt> wrote: > Hello, > > Try this. > > > ss1 <- "z:f(5, a=3, b=4, c='1:4', d=2)" >
2009 Feb 07
3
Output results to a single postscript document
Hello R users, I have been trying to output all my results (text, plots, etc) into the same postscript file as one document, but have been unable to...Can anyone help me improve my code below so that I can accomplish this? Currently I have to output them separately then piece them back together into one document.. Thanks in Advance for any help! options (scipen=999, digits=7)
2018 May 21
2
removing part of a string
dear all, I am stuck on the following problem. Give a string like ss1<- "z:f(5, a=3, b=4, c='1:4', d=2)" or ss2<- "f(5, a=3, b=4, c=\"1:4\", d=2)*z" I would like to remove all entries within parentheses.. Namely, I aim to obtain respectively "z:f()" or "f()*z" I played with sub() and gsub() but without success.. Thank you very
2020 May 18
6
[PATCH] SSE2/SSSE3 optimized version of get_checksum1() for x86-64
This drop-in patch increases the performance of the get_checksum1() function on x86-64. On the target slow CPU performance of the function increased by nearly 50% in the x86-64 default SSE2 mode, and by nearly 100% if the compiler was told to enable SSSE3 support. The increase was over 200% on the fastest CPU tested in SSSE3 mode. Transfer time improvement with large files existing on both ends
2020 May 19
5
[PATCHv2] SSE2/SSSE3 optimized version of get_checksum1() for x86-64
I've read up some more on the subject, and it seems the proper way to do this with GCC is g++ and target attributes. I've refactored the patch that way, and it indeed uses SSSE3 automatically on supporting CPUs, regardless of the build host, so this should be ideal both for home builders and distros. Getting the code to build right in c++ mode (checksum_sse2.cpp only) was a bit of an
2008 Jan 11
5
installing and using a package
i'm trying to learn R. i have no programing experience. i tried to add on a package and just picked "yags". i can't get it to work or get any help. --- > install.packages("yags") Warning in install.packages("yags") : argument 'lib' is missing: using 'C:\Documents and Settings\j\My Documents/R/win-library/2.6' trying URL
2003 Nov 03
2
problem building MS-Windows package under linux
hi there, trying to follow the steps of Yan & Rossini 2003, I have two problems : first when I 'make CrossCompileBuild', I get : ****************************************************************************** make[1]: Entering directory `/home/ros/RWORK/CROSSSOMP/WinR/R-1.8.0/src/gnuwin32' make -f Makefile.docfiles make[2]: Entering directory