Re: [R] Question on RData and Rhistory extentions

2011-01-19 Thread Jeff Newmiller
I think you get files with extensions, but you have not told Windows to show them to you. Adjust your file display settings in a file manager window. "Jean-Philippe Puyravaud" wrote: >Hi, > > > >It seems simple but I could not find the solution on the R site. > > > >I can't save properly ".RD

Re: [R] Using subset to filter data table

2011-01-19 Thread Phil Spector
Ben - droplevels was introduced in R version 2.12.0. Since you are running version 2.10.1, it won't be available. You might want to upgrade to a more recent version. - Phil Spector Statistical Computing Facilit

[R] Question on RData and Rhistory extentions

2011-01-19 Thread Jean-Philippe Puyravaud
Hi, It seems simple but I could not find the solution on the R site. I can't save properly ".RData" and ".Rhistory" in Windows 7 folders. I get files with no extension. Thanks in advance for your help. JP Jean-Philippe Puyravaud 9A Frederic Osanam Street Colas Nagar Puduc

Re: [R] Using subset to filter data table

2011-01-19 Thread Ben Harrison
Thank you Santosh. I am so new to R that I don't even have droplevels: 1> tcc2 = droplevels(tcc) Error: could not find function "droplevels" I looked up ?droplevels: 1> ?droplevels No documentation for 'droplevels' in specified packages and libraries: you could try '??droplevels' 1> ??droplevels

[R] circular reference lines in splom

2011-01-19 Thread Max Kuhn
Hello everyone, I'm stumped. I'd like to create a scatterplot matrix with circular reference lines. Here is an example in 2d: library(ellipse) set.seed(1) dat <- matrix(rnorm(300), ncol = 3) colnames(dat) <- c("X1", "X2", "X3") dat <- as.data.frame(dat) grps <- factor(rep(letters[1:4], 25)) pan

Re: [R] function of probability for normal distribution

2011-01-19 Thread David Winsemius
On Jan 19, 2011, at 6:03 PM, JClark wrote: Dear Greg Snow, I'm a biologist trying to write a mathematical formula for a doubly truncated normal distribution to be used in the language "R". I realise this is simple stuff for a mathematician but I'm stumped. Wikipedia gives what seems a fai

Re: [R] function of probability for normal distribution

2011-01-19 Thread Charles C. Berry
On Wed, 19 Jan 2011, JClark wrote: Dear Greg Snow, I'm a biologist trying to write a mathematical formula for a doubly truncated normal distribution to be used in the language "R". I realise this is simple stuff for a mathematician but I'm stumped. Wikipedia gives what seems a fairly simple f

Re: [R] Semi-Regular Time Series with Missing Values

2011-01-19 Thread Adam Oliner
Whoops, fixed a typo: library("zoo") data = c(50, 32, 22, 13, 14, 6, 12, 3, 6, 21, NA, NA, 15, 13, 17, 9, 11, 34, 63) dataz = zoo(data, 1:length(data)) datat = as.ts(dataz) datatt = ts(datat, frequency=2) frequency(datatt) length(datatt) # these all give errors stl(datatt, s.window="per") # this n

Re: [R] Semi-Regular Time Series with Missing Values

2011-01-19 Thread Adam Oliner
Gabor, On Wed, Jan 19, 2011 at 3:36 PM, Gabor Grothendieck wrote: > stl does not support series with NAs > Thank you. This is what I needed to know. Cheers, -- - Adam J. Oliner [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] function of probability for normal distribution

2011-01-19 Thread JClark
Dear Greg Snow, I'm a biologist trying to write a mathematical formula for a doubly truncated normal distribution to be used in the language "R". I realise this is simple stuff for a mathematician but I'm stumped. Wikipedia gives what seems a fairly simple formula - with function = maths with m

Re: [R] Using subset to filter data table

2011-01-19 Thread Ben Harrison
Thank you Santosh. I am so new to R that I don't even have droplevels: 1> tcc2 = droplevels(tcc) Error: could not find function "droplevels" I looked up ?droplevels: 1> ?droplevels No documentation for 'droplevels' in specified packages and libraries: you could try '??droplevels' 1> ??droplevels

Re: [R] Semi-Regular Time Series with Missing Values

2011-01-19 Thread Gabor Grothendieck
On Wed, Jan 19, 2011 at 5:21 PM, Adam Oliner wrote: > The objective is to get the stl calls to work without making up values for > the NAs: > > library("zoo") > data = c(50, 32, 22, 13, 14, 6, 12, 3, 6, 21, NA, NA, 15, 13, 17, 9, 11, 34, > 63) > dataz = zoo(data, 1:length(data)) > t = as.ts(dataz)

Re: [R] xyplot question

2011-01-19 Thread Saiwing Yeung
> This is a version of FAQ 7.22: you need to tell R to print lattice graphics. > Without the next statement, the result would be auto-printed. > > Duncan Murdoch That fixed it. Thank you again. Sorry for not reading the FAQ. Saiwing __ R-help@r-pro

Re: [R] Semi-Regular Time Series with Missing Values

2011-01-19 Thread Adam Oliner
The objective is to get the stl calls to work without making up values for the NAs: library("zoo") data = c(50, 32, 22, 13, 14, 6, 12, 3, 6, 21, NA, NA, 15, 13, 17, 9, 11, 34, 63) dataz = zoo(data, 1:length(data)) t = as.ts(dataz) datat = as.ts(dataz) datatt = ts(t, frequency=2) frequency(datatt)

Re: [R] Semi-Regular Time Series with Missing Values

2011-01-19 Thread Adam Oliner
My series was regularly spaced, it simply contained missing values. I don't see why the new values were added. Besides, my previous email showed exactly how to convert a zoo object with missing values into a ts object with missing values and a frequency other than 1, so I'm not sure what you mean:

[R] MCMC object indexing

2011-01-19 Thread Robinson, David G
I have an mcmc object and I'm trying to plot the quantiles of the variables - and not as a function of the iterations as in cumuplot. I cannot seem to find the right combination of indexing to access the variables; after which I'm sure I can plot all the statistics I could hope for. Any hints f

[R] spatstat theoretical values from inhomogeneous Poisson models

2011-01-19 Thread Chi Michael
Hello, I am using the Kinhom function to plot envelopes from my fitted inhomogeneous models in spatstat. But the results I obtain do not have a theoretical value (theo). They only give me the "hi", "lo", "r" and "mmean" values but no "theo".  Please can anyone help? Mike. [[al

Re: [R] ggplot2, geom_hline and facet_grid

2011-01-19 Thread Dennis Murphy
Hi Sandy: I can reproduce your problem given the data provided. When I change ecd_rhythm from character to factor, it works as you intended. > str(lvefeg) List of 4 ### Interesting... $ cvd_basestudy: chr [1:10] "CBP05J02" "CBP05J02" "CBP05J02" "CBP05J02" ... $ ecd_rhythm : chr [1:10] "AF

[R] spacing of color key in filled.contour

2011-01-19 Thread claudia tebaldi
Hi all I'm plotting colored contour maps using filled.contour. My levels are very unevenly spaced, with, say, high resolution in the small numbers but ranges that can be an order of magnitude or two larger in absolute value compared to where the action takes place. Aside from transforming the dat

Re: [R] xyplot question

2011-01-19 Thread Duncan Murdoch
On 11-01-19 4:54 PM, Saiwing Yeung wrote: Hi all, I had a weird problem with xyplot and I am wondering if anyone can help me figure out what's wrong here. Basically if I call xyplot() inside a function and I call quartz() after, then the previous xyplot() does not do anything. A short demo of

Re: [R] Help with logistic model with random effects in R

2011-01-19 Thread Ben Bolker
LAURA WEIR <0611792W student.gla.ac.uk> writes: > > Hello everyone, > > I'm quite new to R and am trying to run a logistic model > to look at how various measures of boldness in > individual animals influences probability of capture, > however I also want to include random effects and > I'm

Re: [R] Semi-Regular Time Series with Missing Values

2011-01-19 Thread Gabor Grothendieck
On Wed, Jan 19, 2011 at 4:27 PM, Adam Oliner wrote: > My series was regularly spaced, it simply contained missing values. I don't > see why the new values were added. > > Besides, my previous email showed exactly how to convert a zoo object with Please provide a minimal self-contained reproducibl

[R] xyplot question

2011-01-19 Thread Saiwing Yeung
Hi all, I had a weird problem with xyplot and I am wondering if anyone can help me figure out what's wrong here. Basically if I call xyplot() inside a function and I call quartz() after, then the previous xyplot() does not do anything. A short demo of the issue is like this: library(lattice)

Re: [R] problem with constructing bitmap

2011-01-19 Thread Prof Brian Ripley
I suspect you have libpng 1.5.0 (assuming you installed libpng at all). So 1) That version has a CERT advisory, and should not be used. 1.5.1 is due tomorrow. 2) R 2.12.1 cannot work with future versions of external software. libpng 1.4.5 does work, but not 1.5.x. (And BTW, questions about

Re: [R] ggplot2, geom_hline and facet_grid

2011-01-19 Thread Small Sandy (NHS Greater Glasgow & Clyde)
Hi Still having problems in that when I use geom_hline and facet_grid together I get two extra empty panels A reproducible example can be found at: https://gist.github.com/786894 Sandy Small From: h.wick...@gmail.com [h.wick...@gmail.com] On Behalf Of

Re: [R] Semi-Regular Time Series with Missing Values

2011-01-19 Thread Gabor Grothendieck
On Wed, Jan 19, 2011 at 4:17 PM, Adam Oliner wrote: > Gabor, > > If you follow those steps on a series with missing values, the resulting tt > will contain tons of new NAs. (See my original email and the call to "zrt = zoo and zooreg classes handle series which may not be regularly spaced whereas

Re: [R] Semi-Regular Time Series with Missing Values

2011-01-19 Thread Adam Oliner
Gabor, If you follow those steps on a series with missing values, the resulting tt will contain tons of new NAs. (See my original email and the call to "zrt = as.ts(zr)".) At any rate, I finally managed to finagle a ts with the correct frequency by coercing to ts _twice_ and specifying the freque

Re: [R] R scheduling request

2011-01-19 Thread Alessandro Oggioni
Thanks Greg, work i'm lost a { after function (). Alessandro 2011/1/19 Greg Snow : > You could include a call to the "source" function that will read and run an R > script (I have not tried this, but don't see any reason that it would not > work). > > -- > Gregory (Greg) L. Snow Ph.D. > Statisti

Re: [R] Semi-Regular Time Series with Missing Values

2011-01-19 Thread Adam Oliner
This still does not give me the desired behavior: > z = zoo(x, order.by=t, frequency=24) > t = as.ts(z) ... inserts 23 NA values between every actual value. This is not correct; the original data has a frequency of 24 and doesn't need one forced upon it during coercion. > z = zoo(x, order.by=t) >

Re: [R] VarCorr

2011-01-19 Thread Joshua Wiley
Is this what you want? attr(VarCorr(merobject)[[1]], "stddev") Alternately, look at: getMethod("VarCorr", signature = "mer") For what is happening behind the scenes and why I chose what I did to extract the standard deviations Cheers, Josh On Jan 19, 2011, at 11:32, Stephanie Cooke wrote:

[R] problem with constructing bitmap: part of the problem

2011-01-19 Thread Erin Hodgess
Hello again. Libpng version 1.5.0 does not have a scripts/makefile.mingw. However, Libpng version 1.2.44 does. That seems to be the snag. Presumably I should stick with the older version. Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of

Re: [R] VarCorr

2011-01-19 Thread Joe P King
Cant you just save that column of values to an object stddev<-VC[,2]#if it's the second column that has the values also I wouldn't save your model name in the same name as the command, when you have " lmer<-lmer(y~1+(1|sampfac)+(1|labfac))", may be best to have "lmer.mod<-lmer(y~1+(1|sampfac)+(1|

[R] problem with constructing bitmap

2011-01-19 Thread Erin Hodgess
Dear R People: I'm building R-2.12.1 from scratch on a Windows XP machine. The "make all recommended" worked fine, but when I did the make in the bitmap directory, I got the following error: C:\R\R-2.12.1\src\gnuwin32\bitmap>make make make CC='gcc -std=gnu99' AR='ar' \ CFLAGS="-O3 -I../../../e

Re: [R] Semi-Regular Time Series with Missing Values

2011-01-19 Thread Gabor Grothendieck
On Wed, Jan 19, 2011 at 3:07 PM, Adam Oliner wrote: > This still does not give me the desired behavior: > >> z = zoo(x, order.by=t, frequency=24) >> t = as.ts(z) > ... inserts 23 NA values between every actual value. This is not correct; > the original data has a frequency of 24 and doesn't need o

Re: [R] Three-way interaction plot

2011-01-19 Thread John Fox
Dear Stephanie, I'm not sure what kind of plot you have in mind, but you might take a look at the effects package, which can plot interactions for a variety of models. I hope this helps, John John Fox Senator William McMaster Professor of Social Statistics De

Re: [R] Semi-Regular Time Series with Missing Values

2011-01-19 Thread Gabor Grothendieck
On Wed, Jan 19, 2011 at 1:10 PM, Adam Oliner wrote: > I don't seem to have that method: > >> zts = as.ts.zoo(z) > Error: could not find function "as.ts.zoo" > > I'm finding forum posts from people trying to use stl directly with zoo[reg] > functions (despite the documentation specifying ts) but di

Re: [R] how to get old packages to work on R 2.12.1

2011-01-19 Thread Robert Baer
Did you do: update.packages(checkBuilt=TRUE) Rob -- From: "Joshua Wiley" Sent: Wednesday, January 19, 2011 11:43 AM To: "Joseph Boyer" Cc: Subject: Re: [R] how to get old packages to work on R 2.12.1 Dear Joe, On Wed, Jan 19, 2011 at 7:49 AM,

[R] Help with logistic model with random effects in R

2011-01-19 Thread LAURA WEIR
Hello everyone, I'm quite new to R and am trying to run a logistic model to look at how various measures of boldness in individual animals influences probability of capture, however I also want to include random effects and I'm not sure how to construct a model that incorporates both of these

[R] VarCorr

2011-01-19 Thread Stephanie Cooke
I have a loop that I would like to use to extract the "stddev" for each itteration so I can average the "stddev" for all the runs. It would be helpful to know how to extract the "stddev" for each run from the VarCorr. Thanks MCruns<-1000 sighatlvec<-rep(NA,MCruns) sighatbvec<-rep(NA,MCruns) sighat

Re: [R] Printing "pretty' vectors in Sweave

2011-01-19 Thread Robin Jeffries
Ah! I was always trying collapse with sep and other options. Not by itself. Perfect! And yes, that was my bad example. Robin Jeffries MS, DrPH Candidate Department of Biostatistics UCLA 530-624-0428 On Tue, Jan 18, 2011 at 10:27 PM, Joshua Wiley wrote: > Hi Robin, > > Have you looked at the

Re: [R] Quantile Regression: Extracting Residuals

2011-01-19 Thread Jonathan P Daily
Try looking here: ?rq.object ?residuals R has excellent documentation that can answer many such questions with less than a minute of reading. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-448

[R] Copula and Multivariate distribution

2011-01-19 Thread salmajj
Hi all, I understand that rmvdc generates random number from mvdc object. But the mvdc object can only be used if we define the marginals! So my question is suppose we don't find any distribution which fit marginals so we use the Canonical Maximum Likelihood method (This approach uses the empir

[R] Installing package in windows 7

2011-01-19 Thread radagast
Hi all, I was trying to install a package called ei from this http://gking.harvard.edu/eiR link . With GCC, r-base-dev and some other R package dependencies installed it works perfect in my Ubuntu Linux system. Now I am trying to install the same in Windows 7 environment. So far my setup is as

[R] A question regarding volcano plot

2011-01-19 Thread Skull Crossbones
Hello all, I was trying to make a volcano plot with some real data, using log2(ratio) vs. Z-value significance. However the scatter of the points is too less contrary to 'normal' volcano plots and I'm getting a sharp 'V' shaped plot. *Am I doing something wrong here?* The data(ratio) is availa

[R] Three-way interaction plot

2011-01-19 Thread Ross, Stephanie
Hello All, I need to create a three-way interaction plot and I was wondering if anyone could recommend a package I could use to design these plots. Thank you! PHRI DISCLAIMER This information is directed in confidence solely to the person named above and may n

Re: [R] Semi-Regular Time Series with Missing Values

2011-01-19 Thread Adam Oliner
I don't seem to have that method: > zts = as.ts.zoo(z) Error: could not find function "as.ts.zoo" I'm finding forum posts from people trying to use stl directly with zoo[reg] functions (despite the documentation specifying ts) but discovering that stl gives errors with NA entries. I encountered s

Re: [R] A question regarding volcano plot

2011-01-19 Thread Skull Crossbones
I forgot to mention the plot looks like this :-( http://img402.imageshack.us/i/volcanoi.jpg/ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Quantile Regression: Extracting Residuals

2011-01-19 Thread Thanaset
Dear R users Is there a way to obtain the residuals from a model fitted by quantile regression? Thank you. Thanaset -- View this message in context: http://r.789695.n4.nabble.com/Quantile-Regression-Extracting-Residuals-tp3225423p3225423.html Sent from the R help mailing list archive at Nabbl

Re: [R] How to find more about Covariance (in R)

2011-01-19 Thread Fabrice Tourre
population is all individual. sample is a part of population. If the sample size is enough large, mean(sr*sr)-mean(sr)*mean(sr) will almost equal to cov(sr, sr). On Wed, Jan 19, 2011 at 3:59 PM, Alaios wrote: > Dear Josh, > I would like to thank you for your reply. > > > I think that it is clear

Re: [R] how to get old packages to work on R 2.12.1

2011-01-19 Thread Joshua Wiley
Dear Joe, On Wed, Jan 19, 2011 at 7:49 AM, Joseph Boyer wrote: > I just installed R 2.12.1, and when I went to run a few old programs with it, > nothing worked. > I got a ton of error messages saying such and such package was built before R > 2.10.0 and needed to be reinstalled. > > These were

Re: [R] Barplot and line x-axis positions

2011-01-19 Thread Greg Snow
You can use the updateusr function in the TeachingDemos package to get them to match. Sent from my iPod On Jan 18, 2011, at 10:05 AM, "Andy Aldersley" wrote: > > > > > > Hello all, > Hoping that there is a fairly simple solution to my query... > I'm trying to overlay a line plot of some

[R] CCF and missing values.

2011-01-19 Thread Paul Ossenbruggen
Hi, I have missing values in my time series. "na.action = na.pass" works for acf and pacf. Why do I get the following error for the ccf? > ts(matrix(c(dev$u[1:10],dev$q[1:10]),ncol=2),start=1,freq=1) Time Series: Start = 1 End = 10 Frequency = 1 Series 1 Series 2 1 68.0 138

Re: [R] how to get old packages to work on R 2.12.1

2011-01-19 Thread Marc Schwartz
On Jan 19, 2011, at 9:49 AM, Joseph Boyer wrote: > I just installed R 2.12.1, and when I went to run a few old programs with it, > nothing worked. > I got a ton of error messages saying such and such package was built before R > 2.10.0 and needed to be reinstalled. > > These were not just warni

[R] how to get old packages to work on R 2.12.1

2011-01-19 Thread Joseph Boyer
I just installed R 2.12.1, and when I went to run a few old programs with it, nothing worked. I got a ton of error messages saying such and such package was built before R 2.10.0 and needed to be reinstalled. These were not just warning messages, but error messages that prevent the programs fro

Re: [R] How to find more about Covariance (in R)

2011-01-19 Thread Steve Lianoglou
Hi, On Wed, Jan 19, 2011 at 9:59 AM, Alaios wrote: > Dear Josh, > I would like to thank you for your reply. > > > I think that it is clear that I miss a lot of theory. I have tried in google > to read and study more about covariance but I have this feeling that the term > 'covariance' is used f

Re: [R] Problem in using bdh function for Govt tickers

2011-01-19 Thread David Reiner
That's a Bloomberg issue, not RBloomberg: use bdp() (point) instead of bdh() (history) or bds() (set) > bdp(conn,ticker,c("PX_LAST","CPN")) PX_LAST CPN 912828JV Govt NA 0.875 912828JY Govt 100.0234 0.875 HTH, David L. Reiner XR Trading LLC -Original Message- From:

Re: [R] ggplot2, geom_hline and facet_grid

2011-01-19 Thread Hadley Wickham
Hi Sandy, It's difficult to know what's going wrong without a small reproducible example (https://github.com/hadley/devtools/wiki/Reproducibility) - could you please provide one? You might also have better luck with an email directly to the ggplot2 mailing list. Hadley On Wed, Jan 19, 2011 at 2

Re: [R] R scheduling request

2011-01-19 Thread Greg Snow
You could include a call to the "source" function that will read and run an R script (I have not tried this, but don't see any reason that it would not work). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Messa

Re: [R] How to find more about Covariance (in R)

2011-01-19 Thread Alaios
Dear Josh, I would like to thank you for your reply. I think that it is clear that I miss a lot of theory. I have tried in google to read and study more about covariance but I have this feeling that the term 'covariance' is used for many different things in different topics. You mentioned for

Re: [R] How to find more about Covariance (in R)

2011-01-19 Thread Joshua Wiley
Hi Alex, cov() uses the formula for a sample covariance. The denominator is N - 1 instead of N. However, the formula you used from Wikipedia is for a population covariance. To move between the two in this case: cov(sr, sr) * (4/5) # should equal E[XX] - E[x] * E[x] Cheers, Josh On Wed, Jan

[R] Error Moran's test : reconsider test arguments

2011-01-19 Thread Robert U
Dear R-users, I was wondering if someone could give me some advices on the following problem. I tried to apply moran’s test to a small dataset and couldn’t succeed, here is the error message:   mor <- moran.test(x, res2)   Avis dans moran.test(x, res2) :   Out-of-range p-value: r

[R] How to find more about Covariance (in R)

2011-01-19 Thread Alaios
Hello everyone, I am trying to understand how covariance work. So I created a vector called sr<-c(2,5,7,5,2) so according to wikipedia Cov(X,X)=E[XX]-E[x]*E[x] which in R is mean(sr*sr)-mean(sr)*mean(sr) [1] 3.76 but also cov(sr,sr) [1] 4.7 why is this difference between these two approaches

Re: [R] "cannot allocate vector of size ..." in RHLE5 PAE kernel

2011-01-19 Thread Mauricio Zambrano
Thanks again Hugo, 2011/1/19 Hugo Mildenberger : > Dear Mauricio, > > what I do not understand at all is the message: > >> Error: cannot allocate vector of size 476.2 Mb > > Have you tried to allocate a big matrix in between, whith > the R - statement not being shown in the output? If I understoo

Re: [R] "cannot allocate vector of size ..." in RHLE5 PAE kernel

2011-01-19 Thread Hugo Mildenberger
Dear Mauricio, what I do not understand at all is the message: > Error: cannot allocate vector of size 476.2 Mb Have you tried to allocate a big matrix in between, whith the R - statement not being shown in the output? Probably not. If not, your local R version is buggy for sure. The test shows

[R] Nnet Questions

2011-01-19 Thread chaitanya
Hi, I am using nnet function to run regression and classification algorihtms. following are my questions 1. test<-nnet(Strength~.,cement,skip=T,size=0,linout=T), why linout=T always for Regression algorithm 2. In the help, linout, entropy, softmax and censored are mutually exclusive. but i can

[R] Nnet Questions

2011-01-19 Thread chaitanya
Hi, I am new to nueral networks and R. i want run the NN using nnet. Following are my Questions. 1> To run regression using nnet, why should i specify linout=T always?. if not it is not prediciting properly 2>In the help, i have read that linout, entropy, softmax and censored are mutually excl

[R] Data Extraction/threshold/

2011-01-19 Thread Stuart
X959X967X968 X9591 -0.04 0.45 X967-0.04 1 -0.09 X9680.45-0.09 1 X968_2 0.76-0.16 0.82 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide ht

Re: [R] question about result of loglinear analysis

2011-01-19 Thread Mike Marchywka
> Date: Wed, 19 Jan 2011 01:20:06 -0800 > From: djmu...@gmail.com > To: laomen...@gmail.com > CC: r-help@r-project.org > Subject: Re: [R] question about result of loglinear analysis > > Hi: > > Well, you fit a saturated model. How many degrees of freedom do you have > left for error? The fact t

Re: [R] Accessing MySQL Database in R

2011-01-19 Thread Uwe Ligges
Folks, 1. can you pelase cite the messages you are repsonding to? 2. Can you please include the original poster of the question who is not necessarily subscribed to the list? Thanks, Uwe Ligges On 18.01.2011 09:52, Joel wrote: You could try useing '127.0.0.1' instead of 'localhost' and see

[R] LDA variables dropping similar within group

2011-01-19 Thread Marina Fernandez
Dear R-users: I am R-usser begginer and at the same time a beginner running discriminant analysis; I wanted to perform a DA using just the 80ß% of the original data but I have some problems with simmilarity in variables, Here my Skript set.seed(123) data80 <- data[sample(472, 378), ] da

Re: [R] "cannot allocate vector of size ..." in RHLE5 PAE kernel

2011-01-19 Thread Mauricio Zambrano
Dear Hugo, I tried your memory test program (without further modifications) just after the gc() command: print(gc()) print(gcinfo(TRUE)) system("/mypath/memorytest.out") and the result that I got was: Number of simulations read from ' Particles.txt ' : 9000 -

[R] det(X,log=TRUE)

2011-01-19 Thread James Lawrence
Hello R-help, I recently spent a lot of time debugging a program, and the problem turned out to be my own misuse of the det() function. A simple recreation of the problem would be X <- diag (c(2,2,2)) det (X,log=TRUE) ## returns 8 as opposed to log 8 I had simply assumed that (along with many o

Re: [R] Odp: count of factors

2011-01-19 Thread Lucia Rueda
Thanks a lot Petr!! It worked! -- View this message in context: http://r.789695.n4.nabble.com/count-of-factors-tp3224791p3224924.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/

Re: [R] "cannot allocate vector of size ..." in RHLE5 PAE kernel

2011-01-19 Thread Hugo Mildenberger
> I got the following warning: > memorytest.c: In function ‘main’: > memorytest.c:5: warning: return type of ‘main’ is not ‘int’ > Is this important ? Hello Mauricio, No, your gcc version is unduly puristic here. The traditional return type of the main function in "C" should be "int", and i

[R] Analyzing texts with tm

2011-01-19 Thread Michael Weller
Hey everybody! I have to use R's tm package to do some text analysis, first thing would be to create a term frequency matrix. Digging in tm's source code it seems like it uses some logic like this to create term frequencies: data("crude") (txt <- Content(crude[[1]])) (tokTxt <- unlist(strsplit

Re: [R] printing big real values

2011-01-19 Thread Henrique Dallazuanna
Try this: options(scipen = 20) summary(a[,1]) On Wed, Jan 19, 2011 at 9:36 AM, Adel ESSAFI wrote: > Hello, > I have a file with very big values. I want to display the real values with > classic ways (without exposant) > > > summary(a[,1]); > Min. 1st Qu.Median Mean 3rd Qu.

[R] printing big real values

2011-01-19 Thread Adel ESSAFI
Hello, I have a file with very big values. I want to display the real values with classic ways (without exposant) > summary(a[,1]); Min. 1st Qu.Median Mean 3rd Qu. Max. 1.198e+09 1.199e+09 1.200e+09 1.200e+09 1.201e+09 1.202e+09 Can you help please? Regards Adel --

[R] predict.lme() gives missings for new subjects

2011-01-19 Thread will . eagle
Hi, why does predict.lme() give missings in the "predict.Subject" column for Subjects which are not in the original training set? library(nlme) example(predict.lme) ## c.f. Subject=="F30" has missing values. How can I predict/impute values for such "new" Subjects based on the fitted model? Th

Re: [R] ggplot2, geom_hline and facet_grid

2011-01-19 Thread Sandy Small
Having upgraded to R version 2.12.1 I still have the same problem: The combination of facet_grid and geom_hline produce (for me) 4 panels of which two are empty of any data or lines (labelled "1" and "2"). Removing either the facet_grid or the geom_hline gives me the result I would then expect.

[R] table on factors with non-ASCII characters *extremely* slow on Windows

2011-01-19 Thread Karl Ove Hufthammer
Running ‘table’ on a factor with levels containing non-ASCII characters seems to result in *extremely* bad performance on Windows. Here’s a simple example with benchmark results (I’ve reduced the number of replications to make the function finish within reasonable time): library(rbenchmark) x.

Re: [R] expand.grid

2011-01-19 Thread Nick Sabbe
I appear to have misinterpreted the help: considering that it explicitly makes note of factors, I wrongly assumed that it would use the levels of a factor automatically. My bad. For completeness' sake, my final solution: getLevels<-function(vec, includeNA=FALSE, onlyOccurring=FALSE) { i

Re: [R] expand.grid

2011-01-19 Thread Berwin A Turlach
G'day Nick, On Wed, 19 Jan 2011 09:43:56 +0100 "Nick Sabbe" wrote: > Given a dataframe > > dfr<-data.frame(c1=c("a", "b", NA, "a", "a"), c2=c("d", NA, "d", "e", > "e"), c3=c("g", "h", "i", "j", "k")) > > I would like to have a dataframe with all (unique) combinations of > all the factors prese

Re: [R] Barplot and line x-axis positions

2011-01-19 Thread Jim Lemon
On 01/19/2011 04:04 AM, Andy Aldersley wrote: Hello all, Hoping that there is a fairly simple solution to my query... I'm trying to overlay a line plot of some data onto a barplot of different data. The y-axes are different for each set of data but the x-axes are the same (1:12, correspond

Re: [R] combining matrices from a list into a multidimensional array

2011-01-19 Thread Dennis Murphy
Hi: Try this: lapply(results, function(x) array(unname(unlist(x)), c(3, 3, 2))) HTH, Dennis On Wed, Jan 19, 2011 at 12:31 AM, Maas James Dr (MED) wrote: > I get some results back from running an iterative analysis in the form of a > list of matrices. What I would like to do with this list is

[R] Odp: count of factors

2011-01-19 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 19.01.2011 09:51:43: > > Hello everyone, > > I have a data set like this: > > > head( fish_transect) > ID_TRANSECT ID_PROJECT DE_ZONE DE_LOCALITY DE_SECTOR MES > 1 42 MB TarragonaCreixell Control I 9 > 2 42

[R] Problem in using bdh function for Govt tickers

2011-01-19 Thread nikhil
Hi, all I wanted to fetch data from Bloomberg for govt bonds, and analyse it further. I am having trouble in getting data as when I use field=PX_LAST, it is giving the prices but when I use field=CPN, or ISSUE_DT, it is not giving the results and just bouncing back for that. This is t

Re: [R] grid.table with head of two rows

2011-01-19 Thread Victor Urizar
Here is a more clear example: # Create the ftable object oftable<-ftable(Titanic, row.vars = 4,col.vars=c(2,3)) require(gridExtra) #Draw the grid, but the rows and heads are missing grid.draw(tableGrob(oftable, show.csep=TRUE, show.rsep=TRUE, show.box=TRUE, sepa

[R] ANNOUNCEMENT: Chapman & Hall/CRC: The R Series

2011-01-19 Thread Calver, Rob
We are pleased to announce the launch of a new series of books on R. Chapman & Hall/CRC: The R Series Aims and Scope This book series reflects the recent rapid growth in the development and application of R, the programming language and software environment for statistical computing and graphi

[R] useR! 2011: abstract submission & registration open

2011-01-19 Thread useR-2011
We are happy to inform you that abstract submission and registration for useR! 2011 is now available online, see http://www.R-project.org/useR-2011 This meeting of the R user community will take place at the University of Warwick, Coventry, UK, August 16-18, 2011. The conference schedule com

[R] count of factors

2011-01-19 Thread Lucia Rueda
Hello everyone, I have a data set like this: > head( fish_transect) ID_TRANSECT ID_PROJECT DE_ZONE DE_LOCALITY DE_SECTOR MES 1 42 MB TarragonaCreixell Control I 9 2 42 MB TarragonaCreixell Control I 9 3 42 MB TarragonaCreixel

Re: [R] "cannot allocate vector of size ..." in RHLE5 PAE kernel

2011-01-19 Thread Mauricio Zambrano
Thank you very much Hugo for your answer. Yesterday I was out of my office and I couldn't test the advise you gave me. Today I'll do it. I have never used C, so I have to ask. For creating an executable file with your code, I copied and pasted the text into a text file, and then tried from the

Re: [R] tips for looping over a category for beginner

2011-01-19 Thread Peter Ehlers
On 2011-01-18 16:27, Ben Harrison wrote: [...snip...] plot(Ozone ~ Temp, data = aq) This highlights one of the very confusing aspects of R language for me; is plot(x, y) the same as plot (y ~ x)? Seems to be, but maybe I'm missing some nuance. plot has many methods; see with methods(plo

Re: [R] question about result of loglinear analysis

2011-01-19 Thread Dennis Murphy
Hi: Well, you fit a saturated model. How many degrees of freedom do you have left for error? The fact that the standard errors are so huge relative to the estimates is a clue. Taking a look at your data, it's pretty clear that nation 3 is an outstanding outlier on its own. It is clearly - nay, bl

Re: [R] dataframe: string operations on columns

2011-01-19 Thread Ivan Calandra
Well, my solution with the loop might be slower (even though I don't see any difference with my system, at least with up to 100 lines and 3 strings to separate), but it works whatever the number of strings. But I should have renamed the columns outside of the loop: names(df)[2:3] <- paste("a", 1

Re: [R] tips for looping over a category for beginner

2011-01-19 Thread Ivan Calandra
Hi, If you don't find droplevels(), then you should install the latest version of R (2.12.1). It's always a good thing, even more if you're starting. Ivan Le 1/19/2011 01:27, Ben Harrison a écrit : Thanks for the reply Peter. On 18 January 2011 22:52, Peter Ehlers wrote: Since you don't

[R] expand.grid

2011-01-19 Thread Nick Sabbe
Hello list. I feel like an idiot. There exists a method called expand.grid which, from the documentation, appears to do just what I want, but then it doesn't, and I can't get it to behave. Given a dataframe dfr<-data.frame(c1=c("a", "b", NA, "a", "a"), c2=c("d", NA, "d", "e", "e"), c3

[R] combining matrices from a list into a multidimensional array

2011-01-19 Thread Maas James Dr (MED)
I get some results back from running an iterative analysis in the form of a list of matrices. What I would like to do with this list is combine it such that all the similar components get combined into a multidimensional array. If possible I'd like to put results[[1]]$resultmean and results[[2

Re: [R] Using subset to filter data table

2011-01-19 Thread Santosh Srinivas
tcc.new2 <- droplevels(tcc.new) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ben Harrison Sent: 19 January 2011 12:24 To: r-help@r-project.org Subject: [R] Using subset to filter data table I am having difficulty understanding ho

Re: [R] Reshape

2011-01-19 Thread Dennis Murphy
Hi: Here's a variation on Jim Holtman's solution - same packages. df <- data.frame(V1 = rep(c('X1', 'X2'), each = 3), V2 = rep(c('Y1', 'Y2', 'Y3'), 2), Y1 = rep(1, 6), Y2 = rep(2, 6), Y3 = rep(3, 6)) dd <- melt(df, id = c('V1', 'V2')) dcast(dd, V2 + variable ~

Re: [R] substituting level for NA in factor column

2011-01-19 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 19.01.2011 00:03:10: > > On Jan 18, 2011, at 5:25 PM, kurt_h...@nps.gov wrote: > > > Greetings > > I have a bunch of NAs in a column of categorical variables > > designating > > the size classes (e.g., smallest to largest: 1,2,3,4) of cave > > cr

  1   2   >