Re: [R] xyplot: adding pooled regression lines to a paneled type="r" plot

2010-06-23 Thread Dennis Murphy
Hi: Does this work for you? xyplot(distance ~ age | Sex, data = Orthodont, groups = Subject, main = 'Individual linear regressions ~ age', type = c('g', 'r'), panel = function(x, y, ...) { panel.xyplot(x, y, ..., col = gray(0.5)) panel.lmline(x, y

[R] how to change the format of numeric variable

2010-06-23 Thread Yi
Hi, The format problem is really annoying. How to get rid of it? x [1] 1e+06 And also when I do barplot, x=rnorm(100,mean=1000) barplot(table(cut(x,breaks=c(0,50,100,150,200,250,300,350,400,450,500,1000,2000,5000,1 The data will show as scientific format, when it is larger than 999 (1

Re: [R] EVENT PACKAGE

2010-06-23 Thread Dennis Murphy
Hi: Perhaps the OP is referring to Jim Lindsey's event package, which is not on CRAN but available at http://www.commanster.eu/rcode.html HTH, Dennis On Wed, Jun 23, 2010 at 3:11 AM, Jim Lemon wrote: > On 06/23/2010 02:10 AM, Pedro Mota Veiga wrote: > >> >> Hi people of R forum, >> I´m trying

[R] How to estimate the Hurst exponent in a stable and effective way?

2010-06-23 Thread Mogei Wang
Hello, very one, I am using the package "fArma" to compute the Hurst exponent. I have tried all the 9 *Fit functions, and got quite different results from different functions. And sometimes, the result is larger than 1, or less than 0. In the program, I just call the fit functions *Fit(myData)@Hur

Re: [R] problem with graphic devices

2010-06-23 Thread Kuan(謝冠生)
Got it~! Thanks a lot!! I am trying to draw a chart not directly by R but PL/R in my postgresql database server. I googled and found that to make a pdf (or the other graphic devices) file might be an possible way to make it happen. Kuan >I'm guessing foo.pdf was created on your file system,

Re: [R] problem with graphic devices

2010-06-23 Thread Erik Iverson
Question: After using graphic devices, such as pdf(), png() in R, nothing happened. Screen Log: -- pdf("foo.pdf") plot(1:10) dev.off() null device 1 I'm guessing foo.pdf was created on your file system, in whatever directory getwd() returns. -

Re: [R] integrate dmvtnorm

2010-06-23 Thread Ravi Varadhan
Double integral: fvec = function(x, y) sapply(x, function(z, y) dnorm(y, mean=0.75/z) * dnorm(z, mean=0.6, sd=0.15), y=y) gvec = function(x) sapply(x, function(y) integrate(f, lower=-Inf, upper=Inf, y=y, subdivisions=1, rel.tol=1.e-08)$val) xx <- seq(-5, 5, length=1000) plot(xx, gvec(x

[R] problem with graphic devices

2010-06-23 Thread Kuan(謝冠生)
Version: OS: Windows XP/CentOS 5.5 R: 2.11.1 Acrobate reader: 9.3.2 Question: After using graphic devices, such as pdf(), png() in R, nothing happened. Screen Log: -- > pdf("foo.pdf") > plot(1:10) > dev.off() null device 1 > > -- The

Re: [R] how to group a large list of strings into categories based on string similarity?

2010-06-23 Thread Martin Morgan
On 06/23/2010 07:46 PM, Martin Morgan wrote: > On 06/23/2010 06:55 PM, G FANG wrote: >> Hi, >> >> I want to group a large list (20 million) of strings into categories >> based on string similarity? >> >> The specific problem is: given a list of DNA sequence as below >> >> ACTCCCGCCGTTCGCGCGCAGCATGA

Re: [R] Comparing distributions

2010-06-23 Thread Ralf B
The diagram only serves as a rough example to give you an idea. To be more precise I would like to give more detail: The data represents movements from two types of pointing device (e.g. mouse, pointer, ) along an axis. The data has diffreent parameters -- such as different pointing devices, diffe

Re: [R] how to group a large list of strings into categories based on string similarity?

2010-06-23 Thread Martin Morgan
On 06/23/2010 06:55 PM, G FANG wrote: > Hi, > > I want to group a large list (20 million) of strings into categories > based on string similarity? > > The specific problem is: given a list of DNA sequence as below > > ACTCCCGCCGTTCGCGCGCAGCATGATCCTG > ACTCCCGCCGTTCGCGCGC > CAGGATCATG

Re: [R] Comparing distributions

2010-06-23 Thread Robert A LaBudde
Your "*" curve apparently dominates your "+" curve. If they have the same total number of data each, as you say, they both cannot sum to the same value (e.g., N = 1 or 1.000). So there is something going on that you aren't mentioning. Try comparing CDFs instead of pdfs. At 03:33 PM 6/23/

[R] how to group a large list of strings into categories based on string similarity?

2010-06-23 Thread G FANG
Hi, I want to group a large list (20 million) of strings into categories based on string similarity? The specific problem is: given a list of DNA sequence as below ACTCCCGCCGTTCGCGCGCAGCATGATCCTG ACTCCCGCCGTTCGCGCGC CAGGATCATGCTGCGCGCGAACGGCGGGAGT CAGGATCATGCTGCGCGCGAANN CAGG

[R] rgdal-maptools

2010-06-23 Thread Felipe Carrillo
The shapefile data can be downloaded from the link below: download all the six files and save them on your working directory and make sure the dsn path is set to where the files are saved. My shapefiles are saved on C:/Data. https://secure.filesanywhere.com/fs/v.aspx?v=897263875a6472a99baa Hi: I

Re: [R] count data with a specific range

2010-06-23 Thread Joris Meys
see ?cut Cheers Joris On Thu, Jun 24, 2010 at 2:57 AM, Yi wrote: > I would like to prepare the data for barplot. But I only have the data frame > now. > > x1=rnorm(10,mean=2) > x2=rnorm(20,mean=-1) > x3=rnorm(15,mean=3) > data=data.frame(x1,x2,x3) > > If there a way to put data within a specific

Re: [R] problem to building R (datasets)

2010-06-23 Thread Geun Seop Lee
Thank you for your reply. The reason why I was trying to compile R source is that I encountered some compile errors when I tried to use Rcpp package in order to compile my c++ program connected to R. A lot of link errors happened like undefined reference to `__gxx_personality_sj0' undefined refer

Re: [R] Estimate of variance and prediction for multiple linear regression

2010-06-23 Thread cc super
What if the size of the newdata is different from the previous one used to generate the regression model? Let's say pdat <- data.frame(x1 = rnorm(5, 2), x2 = rnorm(5)) predict(lin, pdat) It comes up with warning and the result is not correct. Thanks! 2010/6/23 Gavin Simpson > On Tue, 2010-0

Re: [R] integrate dmvtnorm

2010-06-23 Thread Christos Argyropoulos
No something else is going on here f=function(x) {dmvnorm(c(0.6, 0.8), mean=c(0.75, 0.75/x))*dnorm(x, mean=0.6, sd=0.15)} > f(1) [1] 0.01194131 > x<-seq(-2,2,.15) > f(x) Error in dmvnorm(c(0.6, 0.8), mean = c(0.75, 0.75/x)) : mean and sigma have non-conforming size But ... > sapply

[R] count data with a specific range

2010-06-23 Thread Yi
I would like to prepare the data for barplot. But I only have the data frame now. x1=rnorm(10,mean=2) x2=rnorm(20,mean=-1) x3=rnorm(15,mean=3) data=data.frame(x1,x2,x3) If there a way to put data within a specific range? The expected result is as follows: range x1 x2

Re: [R] integrate dmvtnorm

2010-06-23 Thread Carrie Li
Thanks! Both suggestions are very helpful. One more question: Can I use Vectorize to solve double integration question ? Now that f=function(x, y) {dnorm(y, mean= 0.75/x)*dnorm(x, mean=0.6, sd=0.15)} And I want to integrate x first,then y. Ravi used sapply, which is good, but it seems to be that

Re: [R] list operation

2010-06-23 Thread Bill.Venables
Here is an alternative: > lst <- list(m = c('a','b','c'), n = c('c','a'), l = c('a','bc')) > set <- c("a", "c") > (w <- sapply(lst, function(x) all(set %in% x))) m n l TRUE TRUE FALSE > names(w)[w] [1] "m" "n" -Original Message- From: r-help-boun...@r-project.org [mai

Re: [R] trouble building R on solaris

2010-06-23 Thread Dr. David Kirkby
On 06/23/10 11:08 PM, Mathew Fox wrote: Dear all, I just changed from linux to a solaris server and I'm having trouble building R from source. First, you might be better posting on r-devel. I know this seems unuual, and installation problems are usually handled on the help or support lists, b

Re: [R] integrate dmvtnorm

2010-06-23 Thread Ravi Varadhan
The main problem is that your function is not vectorized. Here is one solution: > require(mvtnorm) > f=function(x){ sapply(x, function(y) {dmvnorm(c(0.6, 0.8), mean=c(0.75, 0.75/y))*dnorm(y, mean=0.6, sd=0.15)}) } > integrate(f, lower=-Inf, upper=Inf) 0.1314427 with absolute error < 4e-05 > H

Re: [R] list operation

2010-06-23 Thread Henrique Dallazuanna
Try this: lst[colSums(mapply('%in%', list(set), lst)) == 2] On Wed, Jun 23, 2010 at 10:35 AM, Yuan Jian wrote: > Hi, > > it seems a simple problem, but I can not find a clear way. > I have a list: > lst=list(m=c('a','b','c'),n=c('c','a'),l=c('a','bc')) > > lst > $m > [1] "a" "b" "c" > $n > [1]

[R] integrate dmvtnorm

2010-06-23 Thread Carrie Li
Hello, everyone, I have a question about integration of product of two densities. Here is the sample code; however the mean of first density is a function of another random variable, which is to be integrated. ## f=function(x) {dmvnorm(c(0.6, 0.8), mean=c(0.75, 0.75/x))*dnorm(x, mean=0.6, sd=0.15

Re: [R] Comparing distributions

2010-06-23 Thread Tommy Chheng
Check out the KL divergence test http://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence @tommychheng Programmer and UC Irvine Graduate Student Find a great grad school based on research interests: http://gradschoolnow

Re: [R] Unique Data Frame Name?

2010-06-23 Thread Kjetil Halvorsen
\Why not put all the data frames in a list? Kjetil On Wed, Jun 23, 2010 at 6:56 PM, Douglas M. Hultstrand wrote: > Hello, > > I am trying to create a data frame with a unique name, based on indexing of > for loop.  I was wondering if there is a way to do this, I keep running into > errors when I

[R] Unique Data Frame Name?

2010-06-23 Thread Douglas M. Hultstrand
Hello, I am trying to create a data frame with a unique name, based on indexing of for loop. I was wondering if there is a way to do this, I keep running into errors when I try to do this. Below is a brief example, I am trying to get two data frames (name1 and name2). Any suggestions are a

Re: [R] Beginning Eigen System question.

2010-06-23 Thread William Revelle
Kevin, At 3:32 PM -0700 6/23/10, wrote: Forgive me if I missunderstand a basic Eigensystem but when I present the following matrix to most any other LinearAlgebra system: 1 3 1 1 2 2 1 1 3 I get an answer like: //$values //[1] 5.00e+00 1.00e+00 -5.536207e-16 //$vectors /

Re: [R] Beginning Eigen System question.

2010-06-23 Thread Ravi Varadhan
Eigenvectors are unique only up to a constant factor, so any scalar multiple of an eigenvector is also an eigenvector. By convention, most (all) packages normalize the eigenvectors such that their norm is 1. Therefore, eigenvectors are unique up to their sign, i.e. if (+x) is an eigenvector corre

Re: [R] problem to building R (datasets)

2010-06-23 Thread Joris Meys
Why compile from source? 2.11.1 installs fine on XP from the binary, so that's the more obvious solution. Cheers Joris On Thu, Jun 24, 2010 at 12:39 AM, Geun Seop Lee wrote: >> >>  Dear all, >>> >>> While I was trying to build R source, I found an error at datasets package >>> (there was no erro

Re: [R] Beginning Eigen System question.

2010-06-23 Thread Joris Meys
On Thu, Jun 24, 2010 at 12:41 AM, Joris Meys wrote: > Which other Linear Algebra system, and which function did you use in R? > Cheers > Joris Never mind, off course you used "eigen()"... Eigenvectors are only determined up to a constant. If I'm not mistaken (but check the help files on it), R no

Re: [R] problem to building R (datasets)

2010-06-23 Thread Geun Seop Lee
> > Dear all, >> >> While I was trying to build R source, I found an error at datasets package >> (there was no error before that) >> >> ../../../library/datasets/R/datasets is unchanged >> Error in dir.create(Rdatadir, showWarnings = FALSE) : >> file name conversion problem >> Calls: -> -> di

[R] problem to building R (datasets)

2010-06-23 Thread Geun Seop Lee
Dear all, While I was trying to build R source, I found an error at datasets package (there was no error before that) ../../../library/datasets/R/datasets is unchanged Error in dir.create(Rdatadir, showWarnings = FALSE) : file name conversion problem Calls: -> -> dir.create Execution halted m

Re: [R] Beginning Eigen System question.

2010-06-23 Thread Joris Meys
Which other Linear Algebra system, and which function did you use in R? Cheers Joris On Thu, Jun 24, 2010 at 12:32 AM, wrote: > Forgive me if I missunderstand a basic Eigensystem but when I present the > following matrix to most any other LinearAlgebra system: > >  1  3  1 >  1  2  2 >  1  1  3

Re: [R] list operation

2010-06-23 Thread Joris Meys
Another variation on the same theme : lst=list(m=c('a','b','c'),n=c('c','a'),l=c('a','bc')) set <- c('a','c') f <-function(lst,set) sapply(lst,function(x) sum(set %in% x)==length(set) ) i <- f(lst,set) names(i[i]) Doesn't serve anybody but keeps my mind fresh. For long lists, you might benefit

[R] Beginning Eigen System question.

2010-06-23 Thread rkevinburton
Forgive me if I missunderstand a basic Eigensystem but when I present the following matrix to most any other LinearAlgebra system: 1 3 1 1 2 2 1 1 3 I get an answer like: //$values //[1] 5.00e+00 1.00e+00 -5.536207e-16 //$vectors // [,1] [,2] [,3] //[1,

[R] A question about R2Winbugs

2010-06-23 Thread Dennis
Dear R users: I was trying to fit a HMM with mixture of Gaussian into the dataset, and I tried to implement it by R2Winbugs. But I got the following errer. * Error in FUN(X[[1L]], ...) : .C(..): 'type' must be "real" for this format* Does anybody know what's the problem? Does R2Winbugs accept s

Re: [R] Probabilities from survfit.coxph:

2010-06-23 Thread Joris Meys
On Wed, Jun 23, 2010 at 9:03 PM, Parminder Mankoo wrote: > Hello: > > In the example below (or for a censored data) using survfit.coxph, can > anyone point me to a link or a pdf as to how the probabilities appearing in > bold under "summary(pred$surv)" are calculated? Do these represent > acumulat

[R] trouble building R on solaris

2010-06-23 Thread Mathew Fox
Dear all, I just changed from linux to a solaris server and I'm having trouble building R from source. I can't use the binaries because I don't have a permission to write to /usr/local. I followed the online instructions regarding the configuration with readline and the GNU version of iconv: ./co

[R] Shapefile

2010-06-23 Thread Felipe_Carrillo
Hopefully the attachment will make it this time... Hi: I am practicing with the attached shapefile and was wondering if I can get some help. Haven't used 'rgdal' and 'maptools' much but it appears to be a great way bring map data into R. Please take a look at the comments and let me know if I n

Re: [R] Wilcoxon signed rank test and its requirements

2010-06-23 Thread Joris Meys
On Wed, Jun 23, 2010 at 10:27 PM, Atte Tenkanen wrote: > Hi all, > > I have a distribution, and take a sample of it. Then I compare that sample > with the mean of the population like here in "Wilcoxon signed rank test with > continuity correction": > >> wilcox.test(Sample,mu=mean(All), alt="two.

Re: [R] Plotting Data on a Map

2010-06-23 Thread David Winsemius
On Jun 23, 2010, at 4:57 PM, Felipe Carrillo wrote: For some reason the shapefile can't get attached. The shapefile is too large to put it in dput..Is there another way to do this? If you dput or dump it and then label the output as .txt it will generally pass the server's scrutiny. -- Da

Re: [R] Dimnames of array inside loop

2010-06-23 Thread David Winsemius
On Jun 23, 2010, at 11:17 AM, M.Ribeiro wrote: any clue?? hello R-helpers, I have an array acuracia <- array(NA, dim = c(1, 1, A, B, C)) which is first defined and in the example above with dimensions 1x1xAxBxC. My array is then filled using 3 loops (I am not well familiar yet with lapp

Re: [R] xtable for latex: setting some values globally

2010-06-23 Thread stefan.d...@gmail.com
fair enough! I was just hoping there was some free lunch... thanks and best from Rotterdam, Stefan On Wed, Jun 23, 2010 at 4:26 PM, Hadley Wickham wrote: >> If anybody has quick fix, that would be helpful. > > Write your own function that wraps xtable... > > Hadley > > > -- > Assistant Professor

Re: [R] Comparing distributions

2010-06-23 Thread Joris Meys
A qqplot would indeed help. ?ks.test for more formal testing, but be aware: You should also think about what you call similar distributions. See following example : set.seed(12345) x1 <- c(rnorm(100),rnorm(150,3.3,0.7)) x2 <- c(rnorm(140,1,1.2),rnorm(110,3.3,0.6)) x3 <- c(rnorm(140,2,1.2),rnorm(11

Re: [R] list operation

2010-06-23 Thread Peter Alspach
Tena koe Yu One possibility: lst[sapply(lst, function(x) length(x[x%in% c('a','c')])==2)] HTH ... Peter Alspach > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Yuan Jian > Sent: Thursday, 24 June 2010 1:35 a.m. > To: r-hel

Re: [R] list operation

2010-06-23 Thread William Dunlap
> lst <- list(m=c('a','b','c'),n=c('c','a'),l=c('a','bc')) > f <- function(list, set) vapply(lst, function(el)all(is.element(set, el)), FUN.VALUE=logical(1)) > # if you have an old version of R use as.logical(sapply(...)) > # instead of vapply(..., FUN.VALUE=logical(10) > i <- f(lst, c(

Re: [R] calculating using user provided function

2010-06-23 Thread Charles C. Berry
On Wed, 23 Jun 2010, suman dhara wrote: Sir, I'm writing a program in R that requires the user to provide a funtion. On the basis of the user provided function the program will proceed further and give results. Is there any technique in R that allow a user to give his own function and on the bas

Re: [R] list operation

2010-06-23 Thread Phil Spector
Yuan - There may be faster ways, but names(lst)[sapply(lst,function(i)'a' %in% i && 'c' %in% i)] seems to do what you want. - Phil Spector Statistical Computing Facility D

Re: [R] RJDBC vs RMySQL vs ???

2010-06-23 Thread Ralf B
Sorry for the lack of details. Since I run the same SQL first directly on MySQL (using the MySQL Query Browser) and then again using R through the RJDBC interface, I assume that I won't simply have a badly constructed SQL query. However, just to clear possible objection, here the SQL: # Extracts

Re: [R] Generation of binomial numbers using a loop

2010-06-23 Thread Phil Spector
Sarah - If you're willing to forgo the loop, res = unlist(mapply(rbinom,frequency,no_trials,prob)) res[res == 0] = 1 will give you what you want. - Phil Spector Statistical Computing Facility

Re: [R] Plotting Data on a Map

2010-06-23 Thread Felipe Carrillo
For some reason the shapefile can't get attached. The shapefile is too large to put it in dput..Is there another way to do this? - Original Message > From: Felipe Carrillo > To: Tom Hopper > Cc: r-h...@stat.math.ethz.ch; ggpl...@googlegroups.com > Sent: Wed, June 23, 2010 1:52:29 PM >

[R] Wilcoxon signed rank test and its requirements

2010-06-23 Thread Atte Tenkanen
Hi all, I have a distribution, and take a sample of it. Then I compare that sample with the mean of the population like here in "Wilcoxon signed rank test with continuity correction": > wilcox.test(Sample,mu=mean(All), alt="two.sided") Wilcoxon signed rank test with continuity correcti

Re: [R] Plotting Data on a Map

2010-06-23 Thread Felipe Carrillo
Hi: I am practicing with the attached shapefile and was wondering if I can get some help. Haven't used 'rgdal' and 'maptools' much but it appears to be a great way bring map data into R. Please take a look at the comments and let me know if I need to explain better what I am trying to accomplish.

[R] Probabilities from survfit.coxph:

2010-06-23 Thread Parminder Mankoo
Hello: In the example below (or for a censored data) using survfit.coxph, can anyone point me to a link or a pdf as to how the probabilities appearing in bold under "summary(pred$surv)" are calculated? Do these represent acumulative probability distribution in time (not including censored time)?

[R] Generation of binomial numbers using a loop

2010-06-23 Thread Sarah Sanchez
Dea'R' helpers I have following data - prob = c(0.1, 0.2, 0.3, 0.4, 0.5) frequency = c(100, 75, 45, 30, 25) no_trials = c(10, 8, 6, 4, 2) freq1 = rbinom(frequency[1], no_trials[1], prob[1]) freq2 = rbinom(frequency[2], no_trials[2], prob[2]) freq3 = rbinom(frequency[3], no_trials[3], prob[3])

[R] list operation

2010-06-23 Thread Yuan Jian
Hi,   it seems a simple problem, but I can not find a clear way. I have a list: lst=list(m=c('a','b','c'),n=c('c','a'),l=c('a','bc')) > lst $m [1] "a" "b" "c" $n [1] "c" "a" $l [1] "a"  "bc" how can I get list elements that include a given subset? for example, for given subset {'a','c'}, the answ

[R] calculating using user provided function

2010-06-23 Thread suman dhara
Sir, I'm writing a program in R that requires the user to provide a funtion. On the basis of the user provided function the program will proceed further and give results. Is there any technique in R that allow a user to give his own function and on the basis of that function the program will work.

[R] is there a Decode HTML function somewhere (similar to URLdecode)?

2010-06-23 Thread Tony B
Dear all, I am aware of the URLdecode(..) function and was wondering if there was something similar for HTML? For example, I would like to convert strings like this: > x <- "isn't" into this: > "isn't" Many thanks for your time, Tony Breyal # O/S: Windows Vista 32 bit # R version 2.11.0 (201

[R] Fitting Gamma distribution

2010-06-23 Thread Marcosco01
I'm looking for goodness of fit tests for gamma distributions with large data sizes and for different data. I have a matrix with around 4.000 data values about losses and there is a heavy right-tail in it. I have fitted a gamma distribution with "fitdistr". You can see the example: fitdistr

Re: [R] Dimnames of array inside loop

2010-06-23 Thread M.Ribeiro
any clue?? hello R-helpers, I have an array acuracia <- array(NA, dim = c(1, 1, A, B, C)) which is first defined and in the example above with dimensions 1x1xAxBxC. My array is then filled using 3 loops (I am not well familiar yet with lapply or sapply functions so I am still a loop-user): fo

Re: [R] [Rd] New errors with difftime()-objects in 2.11.1 (was Re: Request: difftime method for cut())

2010-06-23 Thread Gustaf Rydevik
On Wed, Jun 23, 2010 at 7:13 AM, Peter Dalgaard wrote: > Gustaf Rydevik wrote: > >> Oh, I forgot to mention that the workaround of using as.double (or >> as.numeric) works fine, and I've done that. >> It's just that it can take quite a while (as in several hours) to >> figure out that the reason f

Re: [R] RJDBC vs RMySQL vs ???

2010-06-23 Thread James W. MacDonald
Hi Ralf, Ralf B wrote: I am running a simple SQL SELECT statement that involvs 50k + data points using R and the RJDBC interface. I am facing very slow response times in both the RGUI and the R console. When running this SQL statement directly in a SQL client I have processing times that are a l

Re: [R] Comparing distributions

2010-06-23 Thread Bert Gunter
?qqplot Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ralf B Sent: Wednesday, June 23, 2010 12:34 PM To: r-help@r-project.org Subject: [R] Comparing distributions I am trying to

[R] dlm package and Log Likelihoods

2010-06-23 Thread Joseph . Smith
Hello, For this project I have been tasked with emulating an old Dynamic Linear Modelling paper's results in the R programming language with the same data. The majority of the work (creating the model, filtering, smoothing, forecasting, etc.) has been done via the dlm package, and I have been

[R] RJDBC vs RMySQL vs ???

2010-06-23 Thread Ralf B
I am running a simple SQL SELECT statement that involvs 50k + data points using R and the RJDBC interface. I am facing very slow response times in both the RGUI and the R console. When running this SQL statement directly in a SQL client I have processing times that are a lot lot faster (which means

[R] Comparing distributions

2010-06-23 Thread Ralf B
I am trying to do something in R and would appreciate a push into the right direction. I hope some of you experts can help. I have two distributions obtrained from 1 datapoints each (about 1 datapoints each, non-normal with multi-model shape (when eye-balling densities) but other then that

Re: [R] Plotrix Trick

2010-06-23 Thread Peter Langfelder
On Wed, Jun 23, 2010 at 10:01 AM, Lorenzo Isella wrote: > Dear All, > I am using the plotrix library to plot some matrices. > I have a problem: some of my data are outliers, hence using a linear > color scale does not work very well (you would see too many cells having > a similar, indistinguishab

Re: [R] About normality tests...

2010-06-23 Thread Hadley Wickham
> Finally, FWIW, 1 is not considered "very large" these days; maybe > 10,000,000,000 might be... It's off topic, but I rather like Mike Driscoll's definition of big data: it's too big to fit on a single machine and must be stored on many (http://www.slideshare.net/dataspora/s-4455027). A smal

Re: [R] About normality tests...

2010-06-23 Thread Greg Snow
Before doing normality tests look at fortune(117) and fortune(234). If you still feel the need to have the computer print out a p-value for a test of exact normality, then try SnowsPenultimateNormalityTest in the TeachingDemos package. If you want a test that is more meaningful, then look at v

Re: [R] About normality tests...

2010-06-23 Thread Bert Gunter
Ralf: Don't bother testing. You will reject normality. But don't bother paying attention to the results of the normality testing anyway -- normality testing is generally useless. (IMO -- others disagree). DO pay attention to the plots; I would place a modest bet that you will find that your data

Re: [R] About normality tests...

2010-06-23 Thread Peter Ehlers
On 2010-06-23 12:05, Ralf B wrote: Hi all, I have two very large samples of data (1+ data points) and would like to perform normality tests on it. I know that p< .05 means that a data set is considered as not normal with any of the two tests. I am also aware that large samples tend to lead

Re: [R] About normality tests (2) ...

2010-06-23 Thread Tal Galili
look at: ?qqnorm and ?qqline Examples are in their help. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com

[R] About normality tests (2) ...

2010-06-23 Thread Ralf B
In addition to the previous email: What plots would you suggest in addition to density / histogram plots and how can I produce them with R ? Perhaps one of you has an example ? Thanks a lot, Ralf __ R-help@r-project.org mailing list https://stat.ethz.c

[R] About normality tests...

2010-06-23 Thread Ralf B
Hi all, I have two very large samples of data (1+ data points) and would like to perform normality tests on it. I know that p < .05 means that a data set is considered as not normal with any of the two tests. I am also aware that large samples tend to lead more likely to normal results (Andy F

Re: [R] xyplot: adding pooled regression lines to a paneled type="r" plot

2010-06-23 Thread Michael Friendly
Thanks, Deepayan I read your presentation and understand how this works for the case you presented, but I can't get it to work for my case, where I want to superimpose model fitted lines over individual subject regression lines. Here's what I tried library(nlme) library(lattice) ##

Re: [R] Clustering

2010-06-23 Thread Tal Galili
Hi Ralph, In case of hclust, the dendrogram does show the "steps" (they are the heights presented in the graph). You can present them also in a matrix using "cutree", for example: dat <- (USArrests) n <- (dim(dat)[1]) hc <- hclust(dist(USArrests)) cutree(hc, k=1:n) You might then visualize the

Re: [R] possibility to determine whether a script is "sourced"?

2010-06-23 Thread Jannis
Cheers Chuck and Greg for your help! only Chucks solution though worked for my problem, for Gregs solution I would have had to start R in interactive mode which I do not do as I start the scripts still from an interactive GUI. Thanks a lot! Jannis --- Charles C. Berry schrieb am Mi, 23.6.2010

Re: [R] possibility to determine whether a script is "sourced"?

2010-06-23 Thread Charles C. Berry
On Wed, 23 Jun 2010, Jannis wrote: Dear R community, I am running some rather large scripts either by executing single blocks of them separately or by executing them at once via source('script.R') Now there is a lot of code in those scripts that I only want to run when I run them manually,

Re: [R] how to print a colored plot in black/white?

2010-06-23 Thread Joshua Wiley
Dear Marius, >From the documentation (see ?trellis.device): "Note that this only applies to the initial choice of colors, which can be overridden using 'theme' or subsequent calls to 'trellis.par.set' (and by _arguments supplied directly in high level calls for some settings_)." [emphasis added]

Re: [R] possibility to determine whether a script is "sourced"?

2010-06-23 Thread Greg Snow
Look at the "interactive" function, it may do what you want. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of

[R] Clustering

2010-06-23 Thread Ralph Modjesch
Hi, I use the following clustering methods and get the corresponding dendrograms for single, complete, average, ward and kmeans clustering. This gives the dendrograms, but doesn't show the calculation-way. My question: is there a possibility to show this calculation steps (cluster steps) in matr

[R] how to print a colored plot in black/white?

2010-06-23 Thread Marius Hofert
Dear expeRts, shouldn't this... x <- 1:10 myplot <- xyplot(x~x,col="red") trellis.device(postscript,color=FALSE,file="plot.ps") print(myplot) dev.off() ... give a black/white plot? Cheers, Marius __ R-help@r-project.org mailing list https://stat.eth

[R] Plotrix Trick

2010-06-23 Thread Lorenzo Isella
Dear All, I am using the plotrix library to plot some matrices. I have a problem: some of my data are outliers, hence using a linear color scale does not work very well (you would see too many cells having a similar, indistinguishable color). See the code snipped at the end of the email. Plotting t

Re: [R] Analyzing large transition matrix

2010-06-23 Thread John Kane
?dotchart perhaps? --- On Wed, 6/23/10, Bill Harris wrote: > From: Bill Harris > Subject: [R] Analyzing large transition matrix > To: "r-help" > Received: Wednesday, June 23, 2010, 9:30 AM > Let's say you have a dataframe of car > trade-ins.  For example, each row > contains > > oldcar   new

Re: [R] Remove squares from scatter3D

2010-06-23 Thread Peter Ehlers
On 2010-06-22 15:40, moleps wrote: Dear All, I´ve been trying to find an option to scatter3D from rcmdr to remove the individual points from the plots but to no help so far. Removing the residuals is easy, but I cannot find a similar point option. Is there such an option that can be set to FA

[R] possibility to determine whether a script is "sourced"?

2010-06-23 Thread Jannis
Dear R community, I am running some rather large scripts either by executing single blocks of them separately or by executing them at once via source('script.R') Now there is a lot of code in those scripts that I only want to run when I run them manually, so I wonder whether there is any way

Re: [R] Trouble compiling igraph. . .

2010-06-23 Thread jim smith
On Wed, 23 Jun 2010 14:37:07 +0200 Rainer Hurling wrote: > I am working with R-2.11.1 on FreeBSD 9.0-CURRENT (amd64). On several > systems there had been no problems with installing igraph (0.5.3). > > > This is what I get from my igraph.so library: > > #ldd /usr/local/lib/R/library/igraph/

Re: [R] reg: R genetics problem

2010-06-23 Thread Juliet Hannah
I've used this package before, and it always gives me the message: NOTE: THIS PACKAGE IS NOW OBSOLETE. So I stopped using it. I just tried installing it and it gave me some new errors (below). Maybe you should also post your sessionInfo(). > library("genetics") Loading required package: combinat

Re: [R] question about a program

2010-06-23 Thread Joris Meys
Most of the computation time is in the functions qvnorm. You can win a little bit by optimizing the code, but the gain is relatively small. You can also decrease the interval used to evaluate qvnorm to win some speed there. As you look for the upper tail, no need to evaluate the function in negativ

[R] mhplot error with test example: "ylim not found"

2010-06-23 Thread vaneet
Hello all, I am trying to make a genome association plot for p-values related to SNPs and was fortunate to find that R contains a package that produces Manhattan plots which is what's preferred for my current project. The function mhtplot() is found in the 'gap' package which I installed in R 2.

[R] K-Centroids fuzzy Clusters Analysis ?

2010-06-23 Thread cgenolin
Hi the list, Using flextClust, we can cluster data using k-mean with some user-define distances. Is there something similar for fuzzy k-means ? Christophe __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

Re: [R] xtable for latex: setting some values globally

2010-06-23 Thread Hadley Wickham
> If anybody has quick fix, that would be helpful. Write your own function that wraps xtable... Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/ __ R-help@r-project.org mailing

[R] Analyzing large transition matrix

2010-06-23 Thread Bill Harris
Let's say you have a dataframe of car trade-ins. For example, each row contains oldcar newcar qty and a typical entry could be lexus bmw1 I put the qty column to allow for fleet purchases, where one purchase may convert multiple cars at once. I'd like to show what's going on. I co

Re: [R] (help) This is an R workspace memory processing question

2010-06-23 Thread Jay Emerson
You should look at packages like ff, bigmemory, RMySQL, and so on. However, you should really consider moving to a different platform for large-data work (Linux, Mac, or Windows 7 64-bit). Jay - This is an R workspace memory processing question.

Re: [R] glm

2010-06-23 Thread Frank E Harrell Jr
On 06/23/2010 06:30 AM, Samuel Okoye wrote: Thank you ver much. Is there is a function in R which is doing penalized cubic regression, say spl.plr(), that if I have weeks = 1:9 I can use somthing like pp<- spl.plr(weeks,c(1,3,5,7)) and for 8 and 9 will be linear? Is rcs() library(Design) doing

[R] Hong Kong R users' group

2010-06-23 Thread C.H.
Dear R users in Hong Kong, Hello. Any HK R users in HK would like to organize a regular users' group meeting like LA, NY, London, Osaka... etc ? Maybe some demonstrations, lightning talks, beginner tutorials. Thanks. Regards, CH -- CH Chan __ R-help

Re: [R] question about a program

2010-06-23 Thread Jim Holtman
use Rprof to determine where your function is spending time. What is the problem you are trying to solve? Sent from my iPhone. On Jun 23, 2010, at 5:21, li li wrote: Dear all, I have the following program for a multiple comparison procedure. There are two functions for the two steps. First

Re: [R] Trouble compiling igraph. . .

2010-06-23 Thread Rainer Hurling
On 23.06.2010 13:29 (UTC+1), jim smith wrote: Been and R-user for about 5 years now in an industrial setting, and always find the mailing list most helpful. I have run into problem compiling igraph on R. I have contacted the maintainer of igraph, and he has determined that it is not an igraph p

  1   2   >