Re: [R] memory management

2012-02-29 Thread William Dunlap
> I do a lot of strsplit, unlist, & subsetting, so I could imagine why > the RSS is triple the total size of my data if all the intermediate > results are not released. I can only give some generalities about that. Using lots of small chunks of memory (like short strings) may cause fragmentation

[R] Coding help

2012-02-29 Thread Ayyappa Chaturvedula
Dear Group, I have the following dataset: ID REPI DV CONC SS 11 156.84 116 0 1 2 146.56 116 0 13 115.13 116 0 14 207.81 116 0 15 129.53 116 0 16 151.48 116 0 17 158.95 116 0 18 192.37 116 0 19 32.97 116 0 1 10

Re: [R] How to remove an object that is loaded every time R is opened?

2012-02-29 Thread Chris Campbell
Hi Jason If you close an R session and save without choosing a filename, a file called .RData will be created. Open a new session and type getwd(). Then have a look in the named file with your folder options set to Show Hidden Files. Deleting or renaming this file should remove the imported obj

Re: [R] Gamm and post comparison

2012-02-29 Thread Gavin Simpson
On Wed, 2012-02-22 at 10:55 -0800, RHam wrote: > My data set consist of number of calls (lcin) across Day. I am looking for > activity differences between three features (4 sites per feature). I am also > looking for peaks of activity across time (Day). I am using a gamm since I > believe these are

Re: [R] memory management

2012-02-29 Thread Sam Steingold
> * William Dunlap [2012-02-28 23:06:54 +]: > > You need to walk through the objects, checking for environments on > each component or attribute of an object. so why doesn't object.size do that? > > f <- function(n) { > + d <- data.frame(y = rnorm(n), x = rnorm(n)) > + lm(y ~ poly(

Re: [R] codon usage bias

2012-02-29 Thread R. Michael Weylandt
This question sounds more suited for the Bioconductor list which focuses on R tools for genetic/bioinformatic computation. It's an active and very friendly list and I think one doesn't have to subscribe to post (but doing so certainly isn't a bad idea). Michael On Feb 29, 2012, at 9:55 AM, aoi

Re: [R] puzzling results from logistic regression

2012-02-29 Thread Bert Gunter
Please folks ... On Wed, Feb 29, 2012 at 7:14 AM, Michael wrote: > How did you see it's non-significant? You need to take or review a basic statistics course. Pr(>|Z|) is your P value. > > Thanks! > > On Wed, Feb 29, 2012 at 9:10 AM, Sarah Goslee wrote: > >> On Wed, Feb 29, 2012 at 10:02 AM, Mi

Re: [R] How to remove an object that is loaded every time R is opened?

2012-02-29 Thread jim holtman
Put --no-restore On your startup command to start with a clean session. On Wednesday, February 29, 2012, Jason Love wrote: > Dear R users, > I'm a newbie and have another basic question that you guys can answer for > me. > So, I've been noticing that an object (data frame) called "FossilFuel" is

Re: [R] ts.plot and x axes customization

2012-02-29 Thread ilai
On Wed, Feb 29, 2012 at 1:56 AM, Jochem Schuster wrote: > Hello, > > thank you very much for your answer. In the following, I will provide my > recent code and try to explain again: > > series1 = ts(x$france start=c(2000,1), frequency=4) > series2 = ts(x$germany, start=c(2000,1), frequency=4) > ti

Re: [R] Cleaning up messy Excel data

2012-02-29 Thread John Kane
(mydata <- as.factor(c("1","2","3", ">2", "5", ">2"))) str(mydata) newdata <- as.character(mydata) newdata[newdata==">2"] <- 0 newdata <- as.numeric(newdata) str(newdata) We really need to keep Excel (and other spreadsheets) out of peoples hands. John Kane Kingston ON Canada > -Original

Re: [R] Installing package QRMlib

2012-02-29 Thread jthetzel
QRMlib built without errors on my WIndows machine. Here's the resulting zip binary: http://commondatastorage.googleapis.com/jthetzel-public/QRMlib_1.4.5.1.zip Will that install on your machine? Jeremy DT54321 wrote > > I wouldn't see myself as an experienced R user soI would appreciate if >

[R] How to remove an object that is loaded every time R is opened?

2012-02-29 Thread Jason Love
Dear R users, I'm a newbie and have another basic question that you guys can answer for me. So, I've been noticing that an object (data frame) called "FossilFuel" is loaded as default when I first open up the R (see below). I created this data frame a while ago which is a data set for tutorial and

Re: [R] Export nls object to text file

2012-02-29 Thread Sarah84
Thanks very much for this. I will try this. -- View this message in context: http://r.789695.n4.nabble.com/Export-nls-object-to-text-file-tp4431039p4431752.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

[R] codon usage bias

2012-02-29 Thread aoife
Hey guys, I have what i think is a really simple problem :( I installed the seqinr library. I want to do an RSCU analysis. But i can't get it to work in even the simplest case. for example, if i have a string read in: > newdata5 $testseq [1] "agtgagatgatagatagatagatagatagatagatagaccagata"

Re: [R] Database

2012-02-29 Thread John Kane
It all depends on what you are doing but R is pretty powerful. I have never used Access so I don't know what it can do but I have played around with othe dbs at a very basic level and most things I did could be done quite easily in R : Sheer data set size could be a problem but unless you have

Re: [R] puzzling results from logistic regression

2012-02-29 Thread R. Michael Weylandt
Formally, look at Pr(>|z|). Informally, look at the null and residual deviances from print(aa). Michael On Wed, Feb 29, 2012 at 10:14 AM, Michael wrote: > How did you see it's non-significant? > > Thanks! > > On Wed, Feb 29, 2012 at 9:10 AM, Sarah Goslee wrote: > >> On Wed, Feb 29, 2012 at 10:02

Re: [R] puzzling results from logistic regression

2012-02-29 Thread Michael
How did you see it's non-significant? Thanks! On Wed, Feb 29, 2012 at 9:10 AM, Sarah Goslee wrote: > On Wed, Feb 29, 2012 at 10:02 AM, Michael wrote: > > Hi all, > > > > As you can see from below, the result is strange... > > Not really. > > > I would imagined that the bb result should be much

Re: [R] Cannot use negative argument in function

2012-02-29 Thread John Kane
Do an str() on the data. It looks like temp is a factor and I doubt that factors can be negative. John Kane Kingston ON Canada > -Original Message- > From: svfil...@alaska.edu > Sent: Tue, 28 Feb 2012 22:03:19 -0800 (PST) > To: r-help@r-project.org > Subject: [R] Cannot use negative ar

Re: [R] puzzling results from logistic regression

2012-02-29 Thread Sarah Goslee
On Wed, Feb 29, 2012 at 10:02 AM, Michael wrote: > Hi all, > > As you can see from below, the result is strange... Not really. > I would imagined that the bb result should be much higher and close to 1, > any way to improve the fit? > > Any other classification methods? > > Thank you! > > data=d

Re: [R] Principal Component Analysis

2012-02-29 Thread Stephen Sefick
x <- data.frame(a=rnorm(100), b=rnorm(100), d=rnorm(100)) prcomp(x, scale=T) prcomp(scale(x), scale=F) The above will give you the same thing. This should be the case because the correlation matrix is the same as the covariance of the scaled and centered original data. FWIW Stephen On 02/2

Re: [R] Does anyone knows a KMeans ++ package for R?

2012-02-29 Thread Kenneth Frost
I believe there is also an example of how to select initial values for k-means in Modern and Applied Statistics with S (Venables and Ripley). Ken On 02/29/12, Pascal Oettli wrote: > Dear Rui, > > Did you have a look at 'pracma' package? There is a 'kmeanspp' function. > > Best Regards, > Pasc

[R] Question about hierarchical clustering

2012-02-29 Thread Guido Leoni
Dear List i'm performing hierarchical clustering analysis with ward method. My best clusters are choosen according to silhouette score... Now I'd like to select the most representative term in each cluster. Do you think that searching for medoids could be a good idea? Here is the code that I use a

[R] puzzling results from logistic regression

2012-02-29 Thread Michael
Hi all, As you can see from below, the result is strange... I would imagined that the bb result should be much higher and close to 1, any way to improve the fit? Any other classification methods? Thank you! data=data.frame(y=rep(c(0, 1), times=100), x=1:200) aa=glm(y~x, data=data, family=binom

Re: [R] Principal Component Analysis

2012-02-29 Thread Sarah Goslee
Hi, On Wed, Feb 29, 2012 at 9:52 AM, Blaz Simcic wrote: > Dear R buddies, > I’m trying to run Principal Component Analysis, package > princomp: > http://stat.ethz.ch/R-manual/R-patched/library/stats/html/princomp.html. I'm going to assume you actually mean the princomp() function. > My questio

[R] Principal Component Analysis

2012-02-29 Thread Blaz Simcic
Dear R buddies, I’m trying to run Principal Component Analysis, package princomp: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/princomp.html. My question is: why do I get different results with pca = princomp (x, cor = TRUE) and pca = princomp (x, cor = FALSE) even when I standardi

[R] simulating scores

2012-02-29 Thread kerry1912
I am currently looking at rugby scores and I have predicted 'T', 'C', 'P' and 'D' by using the predict function for a weekend of results. score <-5*T + 2*C + 3*P+ 3*Dr score So the output from the score function above is 12 values, as follows. Where 1 to 12 represent the teams involved in the ga

[R] R 2.14.2 is released + R anniversary

2012-02-29 Thread Peter Dalgaard
The build system rolled up R-2.14.2.tar.gz (codename "Gift-Getting Season") at 9:00 this morning. This is intended to be the final round-up release of the 2.14 series; see the list below for details. (The codename is still not part of the actual sources. That feature will have to wait for 2.15.

[R] How can I avoid the warning messages when calling DAAG package?

2012-02-29 Thread Jason Love
Dear R users, I'm a newbie for R and want to ask some basic questions. So, after I open the R software, I typed library(DAAG). Then, I get massive warning messages as shown below. Why does it happen? Also, here are few specific questions regarding each message. 1) Loading required package: MAS

Re: [R] Error occurred during mean calculation of a column of a data frame, which is apparently contents numeric data

2012-02-29 Thread Prof Brian Ripley
On 29/02/2012 13:41, Duncan Murdoch wrote: On 12-02-29 8:16 AM, R. Michael Weylandt wrote: Factors are internally stored as integers (enums if you have used other programming languages) with a special label set -- it's more memory efficient than storing the whole string over and over. That was

Re: [R] Converting a function from Splus to R

2012-02-29 Thread R. Michael Weylandt
Oh...that does make more sense -- seemed like a rather odd choice of variable name. Michael On Wed, Feb 29, 2012 at 8:40 AM, Prof Brian Ripley wrote: > On 29/02/2012 13:24, R. Michael Weylandt wrote: >> >> Change the name to something syntactically valid? The problem is that >> you can't (well,

[R] Computing line= for mtext

2012-02-29 Thread Frank Harrell
I want to right-justify a vector of numbers in the right margin of a low-level plot. For this I need to compute the line parameter to give to mtext. Is this the correct scalable calculation? par(mar=c(4,3,1,5)); plot(1:20) s <- 'abcde'; w=strwidth(s, units='inches')/par('cin')[1] mtext(s, side=4

Re: [R] Installing package QRMlib

2012-02-29 Thread Pfaff, Bernhard Dr.
Well, because QRMlib interfaces C routines (IIRC), the error message is pretty indicative, i.e. these routines cannot be compiled. Now, without further information there is not much to recommend, but: 1) check your RTools installation 2) Ask the package maintainer (cc'ed) when he will re-release

Re: [R] Error occurred during mean calculation of a column of a data frame, which is apparently contents numeric data

2012-02-29 Thread Duncan Murdoch
On 12-02-29 8:16 AM, R. Michael Weylandt wrote: Factors are internally stored as integers (enums if you have used other programming languages) with a special label set -- it's more memory efficient than storing the whole string over and over. That was one of the original justifications, but cha

Re: [R] Converting a function from Splus to R

2012-02-29 Thread Prof Brian Ripley
On 29/02/2012 13:24, R. Michael Weylandt wrote: Change the name to something syntactically valid? The problem is that you can't (well, you can, but it's ill advised) have variable names beginning with numbers. They don't seem to be used much so there won't be much trouble in that. I think that

Re: [R] Database

2012-02-29 Thread Gabor Grothendieck
On Tue, Feb 28, 2012 at 6:06 PM, Trying To learn again wrote: > Hi all, > > I´m new using Access. I see that many things that you can do on Access you > can do on CRAN R but not on contrary. > > My question is: Is there any manual with examples comparing how to do data > base analysis on access an

Re: [R] Installing package QRMlib

2012-02-29 Thread DT54321
I wouldn't see myself as an experienced R user soI would appreciate if anyone is able to give me a clear set of instructions on how to install and load QRMlib. The steps I've followed are: 1: Download 'QRMlib_1.4.5.1.tar.gz' from http://cran.r-project.org/src/contrib/Archive/QRMlib/ to my local fo

Re: [R] Good and modern Kernel Regression package in R with auto-bandwidth?

2012-02-29 Thread Liaw, Andy
That's why I said you need the book. The details are all in the book. From: Michael [mailto:comtech@gmail.com] Sent: Thursday, February 23, 2012 1:49 PM To: Liaw, Andy Cc: r-help Subject: Re: [R] Good and modern Kernel Regression package in R with auto-bandwi

Re: [R] Converting a function from Splus to R

2012-02-29 Thread Berend Hasselman
On 29-02-2012, at 14:02, Freddy Hernández wrote: > I have a function written for Splus, when I run it in R I obtain get an error > because the function has the elements "0.d0" and "2.d0". How can I change it > to run in R? > > The function can be found in page 230 from > http://www.stat.wisc.edu

Re: [R] Error in Aggregate

2012-02-29 Thread R. Michael Weylandt
The error message is clear: your problem is that your data.frame (note the period) contains factors. Use str(data) -- also don't use data as it's a function name -- to see which ones and change as appropriate. Michael On Wed, Feb 29, 2012 at 7:16 AM, arunkumar wrote: > Hi > > My dataframe  l

Re: [R] Converting a function from Splus to R

2012-02-29 Thread R. Michael Weylandt
Change the name to something syntactically valid? The problem is that you can't (well, you can, but it's ill advised) have variable names beginning with numbers. They don't seem to be used much so there won't be much trouble in that. Michael 2012/2/29 Freddy Hernández : > I have a function writt

Re: [R] Database

2012-02-29 Thread Prof Brian Ripley
On 29/02/2012 12:45, R. Michael Weylandt wrote: I don't use Access but my general impression is that the advantages it brings will be similar to those brought by any other database: performance rather than ability -- they are both Turing complete after all, after some trickery on the SQL end. Da

[R] using jit

2012-02-29 Thread yan jiao
Dear R gurus, I'm trying to use jit package to parallel my computing do you put jit(2) /jit(1) in front of every loops? I got 8 nested loops in my code. many thanks yan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] Bayesian Hidden Markov Models

2012-02-29 Thread Oscar Rueda
Dear James, The distances are normalized between zero and 1, so in your case all of them will be zero. You can check that with > res$Dist.for.model And do > Q.NH(summary(res)[[1]]$beta, x=0) To obtain the common transition matrix. Cheers, Oscar On 29/2/12 03:59, "monkeylan" wrote: > D

[R] Converting a function from Splus to R

2012-02-29 Thread Freddy Hernández
I have a function written for Splus, when I run it in R I obtain get an error because the function has the elements "0.d0" and "2.d0". How can I change it to run in R? The function can be found in page 230 from http://www.stat.wisc.edu/~mchung/teaching/stat471/stat_computing.pdf Function is as f

Re: [R] Error occurred during mean calculation of a column of a data frame, which is apparently contents numeric data

2012-02-29 Thread R. Michael Weylandt
Factors are internally stored as integers (enums if you have used other programming languages) with a special label set -- it's more memory efficient than storing the whole string over and over. Michael On Wed, Feb 29, 2012 at 5:49 AM, Aniruddha Mukherjee wrote: > Hello Berend. > > Many thanks f

[R] Error in Aggregate

2012-02-29 Thread arunkumar1111
Hi My dataframe looks like this data= id V1 V2 V3 V4 1 5 6 7 8 1 10 20 30 40 2 23 54 54 6 3 43 54 54 33 4 12 34 54 54 4 34 54 23 52 I have to sum by id I used command aggregate(data,by =list(data$id),FUN=sum) Error i face is Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L), na.rm = FALS

[R] equivalent from gladder and ladder from stata

2012-02-29 Thread agent dunham
Dear community, Apologies, I'm still pretty newbie. Anyway, I am performing linar regression analysis. As a common cause of non-normally distributed residuals is non-normally predictor variables, i'm interested in achieving the best transformation of the predictors. I've seen some commands at R,

[R] Minimum curvature Interpolation in R?

2012-02-29 Thread Paul Brewin
Hi - Is there a Minimum Curvature interpolation function writen for R somewhere? Sometimes called minimum Curvature Splines I believe. Have searched the help-archive etc with no joy. Many thanks! -- Dr Paul E Brewin South Georgia Project Science Officer Shallow Marine Surveys Group PO Box 598

Re: [R] indexing??

2012-02-29 Thread helin_susam
Thanks, Dear Petr Savick. Your help is enough to solve my problem. With your help I've dealt with the problem. Many thanks for your effort, Sincerely, Helin -- View this message in context: http://r.789695.n4.nabble.com/indexing-tp4428210p4431168.html Sent from the R help mailing list archiv

Re: [R] Error occurred during mean calculation of a column of a data frame, which is apparently contents numeric data

2012-02-29 Thread Aniruddha Mukherjee
Hello Berend. Many thanks for your prompt reply and that helped me a lot. One more thing, if you please explain, I shall be highly obliged. Why in my case (i.e. when stringsAsFactors was TRUE by default), > as.numeric(matr1$Pulse_rate) displays the following [1] 4 5 7 5 9 8 6 10 3 2

Re: [R] Database

2012-02-29 Thread R. Michael Weylandt
I don't use Access but my general impression is that the advantages it brings will be similar to those brought by any other database: performance rather than ability -- they are both Turing complete after all, after some trickery on the SQL end. Databases allow much larger data sets than R current

Re: [R] Using a FOR LOOP to name objects

2012-02-29 Thread R. Michael Weylandt
In short, don't -- use a named list instead. Long answer: ?assign ?get Michael On Tue, Feb 28, 2012 at 10:40 PM, michaelyb wrote: > Hello, > > I am trying to use a for loop to name objects in each iteraction. As in the > following example (which doesn't work quite well) > > my_list<-c("A","B",

Re: [R] Export nls object to text file

2012-02-29 Thread R. Michael Weylandt
You can save it as an R Data file using save() and then reload it with load() -- there's not a natural way to make it something that lives nicely in a text file (since an nls object is quite complex) -- if you are just going to be using the object again in R I'd recommend the first. If you need it

Re: [R] Error occurred during mean calculation of a column of a data frame, which is apparently contents numeric data

2012-02-29 Thread Berend Hasselman
On 29-02-2012, at 11:49, Aniruddha Mukherjee wrote: > > Hello Berend. > > Many thanks for your prompt reply and that helped me a lot. One more thing, > if you please explain, I shall be highly obliged. > Why in my case (i.e. when stringsAsFactors was TRUE by default), > > as.numeric(matr1$P

Re: [R] Does anyone knows a KMeans ++ package for R?

2012-02-29 Thread Pascal Oettli
Dear Rui, Did you have a look at 'pracma' package? There is a 'kmeanspp' function. Best Regards, Pascal Le 29/02/2012 19:52, Rui Esteves a écrit : Dear Pascal, From Wikipedia: In applied statistics, k-means++ is an algorithm for choosing the initial values (or "seeds") for the k-means clu

Re: [R] Does anyone knows a KMeans ++ package for R?

2012-02-29 Thread Rui Esteves
Dear Pascal, >From Wikipedia: In applied statistics, k-means++ is an algorithm for choosing the initial values (or "seeds") for the k-means clustering algorithm. It was proposed in 2007 by David Arthur and Sergei Vassilvitskii, as an approximation algorithm for the NP-hard k-means problem—a way o

Re: [R] Does anyone knows a KMeans ++ package for R?

2012-02-29 Thread Pascal Oettli
Dear Rui, What "++" means? There is kmeans in "stats" package. Best Regards, Pascal Le 29/02/2012 19:20, Rui Esteves a écrit : Dear all. I am searching for KMeans ++ for R. I cannot find it. Do you know any package with it? Best regards, Rui __

Re: [R] Error occurred during mean calculation of a column of a data frame, which is apparently contents numeric data

2012-02-29 Thread Berend Hasselman
On 29-02-2012, at 09:45, Aniruddha Mukherjee wrote: > Hello R people, > > How can I compute the mean of the "Pulse_rate" column of the data frame or > matrix from the following character object called "str_got". It has 14 > entries and each entry has 8 values, separated by commas. Please go th

[R] Does anyone knows a KMeans ++ package for R?

2012-02-29 Thread Rui Esteves
Dear all. I am searching for KMeans ++ for R. I cannot find it. Do you know any package with it? Best regards, Rui __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.o

Re: [R] General question about GLMM and heterogeneity of variance

2012-02-29 Thread GibsonR
I will also post the above to the sig mixed models forum now. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/General-question-about-GLMM-and-heterogeneity-of-variance-tp4424429p4431107.html Sent from the R help mailing list archive at Nabble.com. __

[R] Error occurred during mean calculation of a column of a data frame, which is apparently contents numeric data

2012-02-29 Thread Aniruddha Mukherjee
Hello R people, How can I compute the mean of the "Pulse_rate" column of the data frame or matrix from the following character object called "str_got". It has 14 entries and each entry has 8 values, separated by commas. Please go thru the following R commands to know how I tried to unstring and

[R] Export nls object to text file

2012-02-29 Thread Sarah84
Hi all, I am new to R and have some trouble with exporting results from a non linear squares object (.nls), would be very thankful if anyone could help me. So what I'm doing is a Bass modelling of some data. The result is stored in the object "Bass.nls". I want to export a matrix with the three

Re: [R] Installing package QRMlib

2012-02-29 Thread DT54321
Ah yes, I can open it with Notepad...it reads the following: * installing *source* package 'QRMlib' ... ** Creating default NAMESPACE file ** libs ERROR: compilation failed for package 'QRMlib' * removing 'C:/PROGRA~1/R/R-214~1.1/bin/QRMLIB~1.RCH/QRMlib' -- View this message in context: http:/

Re: [R] Interpreting the Results of GLM

2012-02-29 Thread Milan Bouchet-Valat
Le mardi 28 février 2012 à 02:48 -0800, sazzle a écrit : > Hi, I'm wondering if you can help me, this is a really simple query but I > keep getting confused. I have run a GLM to see how boldness varies over > time following a particular treatment. The results are as follows... > > Call: glm(for

Re: [R] General question about GLMM and heterogeneity of variance

2012-02-29 Thread GibsonR
Sorry, I was not particularly clear. I ran my data through a GLM (the response variable is a proportion, and I ignored the random effects for the purposes of data exploration), and plotted the residuals against each of my predictor variables (some of which are continuous, some categorical). The h

Re: [R] indexing??

2012-02-29 Thread Petr Savicky
On Tue, Feb 28, 2012 at 11:42:32AM -0800, helin_susam wrote: > Dear Petr Savicky, > > Actually, this is based on jackknife after bootstrap algorithm. In summary, > > I have a data set, and I want to compute some values by using this > algorithm. > > Firstly, using bootstrap, I create some bootst

Re: [R] Cannot use negative argument in function

2012-02-29 Thread Berend Hasselman
On 29-02-2012, at 07:03, lidaky wrote: > Hi, > > today i wrote a function in R of the type: > > index.refraction <- function(Temp,Press, RH, CO2) > > When i try to plug a negative number in Temp, i got this type of error: > > " > n <- index.refraction(Temp= -40,100,80,CO2) > Messages d'avis :

<    1   2