[R] Virus alert because of an R-help e-mail

2023-10-31 Thread David Croll
I just received a virus warning from my e-mail provider, GMX. See the attached image below. The virus detection can be spurious - but the e-mail was automatically deleted by GMX. With the best regards, David __ R-help@r-project.org mailing list -- To

[R] function doesn't change the variable in the right way

2014-03-07 Thread David Croll
Dear R users and friends, I would like to ask you about the weird behaviour of a function I just wrote. This little function should take a vector, find NAs and substitute them for the mean of the vector, and return the normalized value of that vector. I've tried both <- and <<- for changin

[R] barely readable "autocomplete" text

2013-12-17 Thread David Croll
Dear R users and R friends, I have one question I wish to have answered. I have RKWard installed on Ubuntu (12.04 LTS), and it works like a charm. The only problem is that the "autocomplete" function is barely readable. Here, you see the parameters of "scan()" written in white, on a sa

Re: [R] Where to download the splines package.

2012-01-09 Thread David Croll
Hello, you will find this helpful: http://r.789695.n4.nabble.com/Where-is-the-splines-package-td2122794.html "splines" is now a part of the normal R installation, David Winsemius says there. Regards, David > Hi, > > install.packages("splines") > > Warning in install.packages : > packa

[R] power regression: which package?

2011-03-02 Thread David Croll
Dear R users and R friends, I have a little problem... I don't know anymore which package to use if I want to perform a power regression analysis. To be clear, I want to fit a regression model like this: fit <- (y ~ a * x ^ b + c) where a, b and c are coefficients of the model. The R

Re: [R] density() with confidence intervals

2010-09-03 Thread David Croll
Thank you very much for your help, Greg! Here's my ludicrous vision/attempt/whatever :o) ### Idea for making a density() with confidence interval ### xx <- faithful$eruptions xx.hist <- hist(xx, breaks="FD", freq=F) # plot(xx.hist$mids, xx.hist$density) # gives a rough "plot(density(xx))" out

[R] density() with confidence intervals

2010-09-03 Thread David Croll
Hello R users & R friends, I just want to ask you if density() can produce a confidence interval, indicating how "certain" the density() line follows the true frequency distribution based on the sample you feed into density(). I've heard of loess.predict(loess(y ~ x), se=TRUE) which gives yo

[R] disabling scientific number format

2010-06-16 Thread David Croll
Hello R users, I am a bit puzzled by the fact that options(digits=22) x0 <- 69880 y0 <- 26185 x1 <- 69600 y1 <- 22937 number <- paste(x0,y0,x1,y1,sep="") number <- as.numeric(travel) print(number) gives number in scientific notation (some precision is wasted by having a "e+19" at the tail

[R] Finally, the first R spam!

2010-01-06 Thread David Croll
Hi R friends and users, Just for fun (or concern): I received a R spam mail. Perhaps the first in history... Subject: R Courses and Consulting From: R Training33 R Courses and Consulting Dear Sir, We are working on our 2010 R training schedule and would like to know if you are interest

Re: [R] wilcox.exact() problem

2009-10-28 Thread David Croll
Dear Achim, let me thank you for this assurance! The sample size is too large (~4000 observations per group) to solve this problem exactly. The error message could maybe be improved, but the message is clear: This is too large to deal with. However, this is not a problem. With several thou

[R] wilcox.exact() problem

2009-10-27 Thread David Croll
Dear R friends, here I write again about the wilcox.exact() problem. I want to compare two sets of categorical data, and in one case it says "negative length vectors not allowed", and in the other one I get the error "cannot allocate vector of length ...". On http://rapidshare.com/files/298

[R] "negative length vectors are not allowed" in wilcox.exact() and perm.test()

2009-10-16 Thread David Croll
Dear R friends, I want to compare two datasets and I get the message Error in .Call("cpermdist2", ma = as.integer(m), mb = as.integer(col), : negative length vectors are not allowed after specifying the exact test. I'm using the exactRankTests package. Do you suggest me using the coin lib

[R] Games in R

2009-08-12 Thread David Croll
Hi everybody - this is an oddball question. I wonder if anybody has programmed any games in R, such as Sudoku, Tic-Tac-Toe and the like. Or even a flight simulator... R mateys! Let's make some t-tests! Regards, David __ R-help@r-project.org mail

Re: [R] glm.nb() giving strongly different results

2009-03-25 Thread David Croll
re involved. So unless you are generating fake data, the random number generator should play no part. Bill Venables http://www.cmis.csiro.au/bill.venables/ -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of David Croll Sent: Wednesda

[R] glm.nb() giving strongly different results

2009-03-24 Thread David Croll
Dear colleagues, I have performed several dozens of glm.nb(response ~ variable) analyses weeks ago, and when I looked through the results today I saw that many of the results have quite different intercept values despite the response part remained the same. I'm quite sure I did same kind

Re: [R] Odp: Problem with retrieving updated variables after attach()

2009-02-10 Thread David Croll
Thank you, this does the job perfectly! Regards, David R> new.df <- data.frame(id,age) Or, perhaps more automatic: R> new.df <- do.call(data.frame, sapply(ls(pos=2), as.name)) Is this what you are after? Cheers, Berwin __ R-help@r-proj

Re: [R] Odp: Problem with retrieving updated variables after attach()

2009-02-10 Thread David Croll
Well, I knew that attach() only creates a copy of the variables in the search path. What I wanted to ask was how to *retrieve* that copy... > mat id age 1 NA NA 2 NA NA 3 NA NA 4 NA NA 5 NA NA > attach(mat) > id <<- sample(100,5) > age <<- rnorm(5,mean=30) How can I make a new data f

[R] Problem with retrieving updated variables after attach()

2009-02-10 Thread David Croll
Hello, suppose I have a data frame: > mat id age 1 NA NA 2 NA NA 3 NA NA 4 NA NA 5 NA NA Then I attach the data frame: > attach(mat) I assign some new values... > id <<- sample(100,5) > age <<- rnorm(5,mean=30) Then I want to create a new data frame from the variables id and age which

Re: [R] A package to set up a questionnaire & enter data

2008-12-11 Thread David Croll
unction in order to proceed # with another questionnaire enter_data() # stop the function using the "stop" button when you are finished } exporting "database" into a CSV or a text file should not be a problem with write.csv() or write.csv2(). Kind regards, Da

[R] function that uses a variable name as the parameter

2008-11-12 Thread David Croll
Hello dear R people! Several times it occurred to me that a function that uses a variable name as a parameter would be helpful, but I did not find out how to write such a function. I have experience in several programming language, but I did not come across a helpful trick... What I want to

[R] missing value where TRUE/FALSE needed

2008-11-07 Thread David Croll
Hello dear R people, for my MSc thesis I need to program some functions, and some of them simply do not work. In the following example, I made sure both vectors have the same length (10), but R gives me the following error: Error in if (vector1[i] == vector2[j]) { : missing value where TRUE