Re: [R] question about formatting Dates

2012-06-26 Thread Patrick Connolly
On Tue, 26-Jun-2012 at 10:54PM -0500, Erin Hodgess wrote: |> Dear R People: |> |> I have dates as factors in the following: |> |> > poudel.df$DATE |> [1] 1/2/2011 1/4/2011 1/4/2011 1/4/2011 1/6/2011 1/7/2011 1/8/2011 |> [8] 1/9/2011 1/10/2011 |> Levels: 1/10/2011 1/2/2011 1/4/2011 1/6/201

Re: [R] plotting two histograms on one plot with hist function

2012-06-26 Thread Blignaut, M, Mej
Thank you for all the advice! After mailing the question, I actually found a function called multhist (plotrix package) that plots two data sets (in single list) on a single histogram. The script is as follows: #I listed to two data sets in “long” format in a .csv file input <- read.csv(fi

Re: [R] X11 Font is missing during Taylor diagram plot

2012-06-26 Thread Pascal Oettli
Hello, And what is your system? Do you have root privileges? Regards Le 27/06/2012 13:01, mmka...@uwaterloo.ca a écrit : Dear Jim, I am sorry to write you directly instead of sending a user forum mail. I have been trying to plot a Taylor diagram but get confronting the following error messa

Re: [R] chisq.test

2012-06-26 Thread John
On Wed, 27 Jun 2012 16:58:29 +1200 Rolf Turner wrote: > On 27/06/12 08:54, arun wrote: > > > > Hi, > > > > The error is due to less than 5 observations in some cells. > > NO, NO, NO It's not the observations that matter, it is > the ***EXPECTED COUNTS***. These must all be at lea

[R] How to connect R to php

2012-06-26 Thread shrutibansal
Hello I want to know Is this possible to connect R with PHP ? I am using operating system-windows 7 there is a R-php software but it is not working for windows 7 OS... Can any body help me? Shruti Bansal -- View this message in context: http://r.789695.n4.nabble.com/How-to-connect-R-to-php-tp

[R] How to copy files emulating "cp -f" on Unix

2012-06-26 Thread Tang, Hsiu-Khuern
Hi, Is there a function that emulates cp -f on Unix, in that existing but non-writable destination files are removed first? I thought file.copy(src, dst, overwrite = TRUE) did that, but it doesn't: it will not copy to non-writable dst. To be sure, this behavior is consistent with the document

[R] rJava Error

2012-06-26 Thread fabin.ittiachan
Hi, I'm receiving an error when I am trying to install rJava. I have posted the error below. RHive_0.0-6.tar.gz rJava_0.9-3.tar.gz RJDBC_0.2-0.tar.gz Rserve_0.6-8.tar.gz [root@localhost Package]# R CMD INSTALL rJava_0.9-3.tar.gz * installing to library ‘/usr/local/lib64/R/library’ * installin

[R] Help with spdep package issue with errorsarlm

2012-06-26 Thread Samantha Sifleet
Hi List, I am hoping some of you have experience with the spdep package. I have had success with lm.morantest and lm.LMtests. I am trying to run a spatial error model and I keep getting the following error Error in res[i, listw$neighbours[[i]]] <- listw$weights[[i]] : NAs

[R] how to convert list of matrix (raster:extract o/p) to data table with additional colums (polygon Id, class)

2012-06-26 Thread akjha
Hi List, I have a raster and a polygon with attribute ID and Class. I want to have the fraction of each class present in each pixel of raster. I have use the raster::extract to get the value and weights as below. ex<-extract(raster,polygon,weighted=TRUE) this gives me [[1]] value weight 1394

[R] density function

2012-06-26 Thread pilaw
Hello, I need density function so that I can find expected value (using integration). I use density(): f= density(data) but f isn't a function and I can't get values and integrate it This is very urget, so please help. Greetings Peter -- View this message in context: http://r.789695.n4.nabble

[R] X11 Font is missing during Taylor diagram plot

2012-06-26 Thread mmkamal
Dear Jim, I am sorry to write you directly instead of sending a user forum mail. I have been trying to plot a Taylor diagram but get confronting the following error message: > taylor.diagram(ref,model_D1,pos.cor=FALSE) Error in text.default(1.05 * maxray * i, 1.05 * maxray * sqrt(1 - i^

[R] computing time for solve() in Matrix package

2012-06-26 Thread Paul Rathouz
Hi -- I am wondering why the time to solve (invert) a block diagonal matrix created with bdiag() from the Matrix package does not scale with the number of blocks [all of the same size]. Or, what I am doing wrong. The code / output below creates a series of block diagonal matrices with 4x4 blocks

[R] Menu Options Disabled in RExcel

2012-06-26 Thread PaulJr
Dear Richard, I know I should be posting this question on the list (I´ve already submited the question on RExcel´s list and still wating for approval) but I am going to send you the question here also, Please take a look at the document I am attaching, as you can see the Menu Options in RExcel ar

[R] Further Problems with RExcel - OLE action message

2012-06-26 Thread PaulJr
Hello everyone, There is another message that is popping up in RExcel that goes: Microsoft Excel is waiting for another application to complete an OLE action. What does this mean? I have attached a document here that shows the message in detail: http://r.789695.n4.nabble.com/file/n4634542/OLE_lin

[R] selecting rows by maximum value of one variables in dataframe nested by another Variable

2012-06-26 Thread Miriam
How could I select the rows of a dataset that have the maximum value in one variable and to do this nested in another variable. It is a dataframe in long format with repeated measures per subject. I was not successful using aggregate, because one of the columns has character values (and/or pos

Re: [R] Remove empty levels in subset

2012-06-26 Thread svo
Thank you very much. The advice I followed (and which, for some reason, I do not see here right now) was to use 'droplevels'. I needed the command for several variables at the same time, so this was very convenient. > Hello, Have you tried 'droplevels': test <-data.frame(a=as.factor(rep(c("f1","f

Re: [R] A solution for question about formatting Dates

2012-06-26 Thread R. Michael Weylandt
Please don't change subject lines for follow-on comments. It messes up threading in most readers: e.g., https://stat.ethz.ch/pipermail/r-help/2012-June/thread.html Michael On Tue, Jun 26, 2012 at 11:57 PM, Erin Hodgess wrote: > Hello again: > > Here is a solution to the dates without leading ze

Re: [R] chisq.test

2012-06-26 Thread Rolf Turner
On 27/06/12 08:54, arun wrote: Hi, The error is due to less than 5 observations in some cells. NO, NO, NO It's not the observations that matter, it is the ***EXPECTED COUNTS***. These must all be at least 5 in order for the null distribution of the test statistic to be a

[R] A solution for question about formatting Dates

2012-06-26 Thread Erin Hodgess
Hello again: Here is a solution to the dates without leading zeros: pou1 <- function(x) { #Note: x is a data frame #Assume that Column 1 has the date #Column 2 has station #Column 3 has min #Column 4 has max library(stringr) w <- character(length=nrow(x))

Re: [R] question about formatting Dates

2012-06-26 Thread R. Michael Weylandt
On Tue, Jun 26, 2012 at 10:54 PM, Erin Hodgess wrote: > Dear R People: > > I have dates as factors in the following: > >> poudel.df$DATE > [1] 1/2/2011  1/4/2011  1/4/2011  1/4/2011  1/6/2011  1/7/2011  1/8/2011 > [8] 1/9/2011  1/10/2011 > Levels: 1/10/2011 1/2/2011 1/4/2011 1/6/2011 1/7/2011 1/8/

Re: [R] flatten lists

2012-06-26 Thread arun
Hi, I hope this helps. Tested to some depth. x1 <- list(name="Jeroen", age=27, married=FALSE, home=list(country=list(name="Netherlands", short="NL"), city="Utrecht")) x2 <- list(name="Jeroen", age=27, married=FALSE, home=list(country=list(name=list(Country1="Netherlands",Country2="Spain"), sho

Re: [R] Zero inflated: is there a limit to the level of inflation

2012-06-26 Thread Stephanie L. Simek
Thank you both for your quick response and input. I will consider all of your points and see what we are able to derive from there. Thank you again for your time and expertise. -Stephanie --- Stephanie L. Simek Carnivore Ecology Lab Forest and

Re: [R] flatten lists

2012-06-26 Thread arun
Hi, Try: do.call("c",do.call("c",x)) x1<-do.call("c",do.call("c",x))  x2<-flatlist(x)  identical(x1,x2) [1] TRUE A.K. - Original Message - From: Jeroen Ooms To: Neal Fultz Cc: r-help@r-project.org Sent: Tuesday, June 26, 2012 6:23 PM Subject: Re: [R] flatten lists Hmm that doesn

Re: [R] chisq.test

2012-06-26 Thread arun
Hi, The error is due to less than 5 observations in some cells. You can try, fisher.test(tabele)     Fisher's Exact Test for Count Data data:  tabele p-value = 0.0998 alternative hypothesis: two.sided A.K. - Original Message - From: Omphalodes Verna To: "r-help@r-project.org" C

[R] question about formatting Dates

2012-06-26 Thread Erin Hodgess
Dear R People: I have dates as factors in the following: > poudel.df$DATE [1] 1/2/2011 1/4/2011 1/4/2011 1/4/2011 1/6/2011 1/7/2011 1/8/2011 [8] 1/9/2011 1/10/2011 Levels: 1/10/2011 1/2/2011 1/4/2011 1/6/2011 1/7/2011 1/8/2011 1/9/2011 > I want them to be "regular" dates which can be sort

Re: [R] rms package-superposition prediction curve of ols and data points

2012-06-26 Thread Frank Harrell
This is what the addpanel argument to plot.Predict is for, something along the lines of ap <- function(...) lpoints(age, weight) plot(Predict(. . .), addpanel=ap) Frank David Winsemius wrote > > On Jun 26, 2012, at 11:29 AM, Sarah Goslee wrote: > >> You could use points() instead of plot() fo

[R] RES: Compile C files

2012-06-26 Thread Frederico Mestre
Hello: I just reinstalled R and Rtools. It works perfectly now. Thanks, Frederico -Mensagem original- De: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Enviada em: quarta-feira, 27 de Junho de 2012 01:06 Para: Frederico Mestre Cc: r-help@r-project.org Assunto: Re: [R] Compile C

Re: [R] Figuring out encodings of PDFs in R

2012-06-26 Thread Duncan Murdoch
On 12-06-26 3:28 PM, Jonas Michaelis wrote: Dear list, I am currently scraping some text data from several PDFs using the readPDF() function in the tm package. This all works very well and in most cases the encoding seems to be "latin1" - in some, however, it is not. Is there a good way in R to

Re: [R] Compile C files

2012-06-26 Thread Duncan Murdoch
On 12-06-26 2:48 PM, Frederico Mestre wrote: Hello: Sorry, this might look like a beginner question, but I'm just starting to work on the C and R interface. I'm trying to compile a C file (with a function) to load it to an R function but, in the command line I keep getting a lot of errors,

Re: [R] Indexing matrices from the Matrix package with [i, j] seems to be very slow. Are there "faster alternatives"?

2012-06-26 Thread Søren Højsgaard
Duncan, I should probably add that I am aware that my code is not the solution and also that the relative gain of my code probably decreases with the problem size until eventually it will perform worse that [i,j] (because of copying I suppose). So my point is just: It would just be nice if [i,j

Re: [R] flatten lists

2012-06-26 Thread Bert Gunter
Frankly, I'm not sure what you mean, but presumably unlist(yourlist, recurs=FALSE) is not it, right? -- Bert On Tue, Jun 26, 2012 at 2:25 PM, Jeroen Ooms wrote: > I am looking for a function to flatten a list to a list of only 1 > level deep. Very similar to unlist, however I don't want to tur

[R] mixture distribution with positive and negative probabilities

2012-06-26 Thread Yakir Gagnon
Hi! Any ideas on which package (e.g. mixdist, flexmix, etc) how I could fit a mixture of say 3 Gaussian functions where 2 have their proportions, means, and sigmas, and the third has a mean, sigma but a negative proportion. Basically I'm trying to fit a mixture model to a distribution that I know i

Re: [R] Indexing matrices from the Matrix package with [i, j] seems to be very slow. Are there "faster alternatives"?

2012-06-26 Thread Søren Højsgaard
Dear Duncan Thanks for your suggestion, but I really need sparse matrices: I have implemented various graph algorithms based on adjacency matrices. For large graphs, storing all the 0's in an adjacency matrices become "uneconomical", and therefore I thought I would use sparse matrices but the s

Re: [R] chisq.test

2012-06-26 Thread David Winsemius
On Jun 26, 2012, at 2:27 PM, Omphalodes Verna wrote: Dear list! I would like to calculate "chisq.test" on simple data set with 70 observations, but the output is ''Warning message:'' Warning message: In chisq.test(tabele) : Chi-squared approximation may be incorrect Here is an example:

Re: [R] flatten lists

2012-06-26 Thread Jeroen Ooms
Alright, but I need something recursive for lists with arbitrary deepness. On Tue, Jun 26, 2012 at 3:37 PM, arun wrote: > Hi, > > Try: > > do.call("c",do.call("c",x)) > > x1<-do.call("c",do.call("c",x)) >  x2<-flatlist(x) >  identical(x1,x2) > [1] TRUE > > > > A.K. > > > > - Original Messag

Re: [R] flatten lists

2012-06-26 Thread Jeroen Ooms
Hmm that doesn't seem to work if the original list is nested more than 2 levels deep. I should have probably given a better example: x <- list(name="Jeroen", age=27, married=FALSE, home=list(country=list(name="Netherlands", short="NL"), city="Utrecht")) On Tue, Jun 26, 2012 at 3:04 PM, Neal Fu

Re: [R] flatten lists

2012-06-26 Thread Neal Fultz
do.call("c", x) maybe? On Tue, Jun 26, 2012 at 02:25:40PM -0700, Jeroen Ooms wrote: > I am looking for a function to flatten a list to a list of only 1 > level deep. Very similar to unlist, however I don't want to turn it > into a vector because then everything will be casted to character > vect

Re: [R] Zero inflated: is there a limit to the level of inflation

2012-06-26 Thread Achim Zeileis
On Tue, 26 Jun 2012, Marc Schwartz wrote: On Jun 26, 2012, at 2:10 PM, SSimek wrote: Hello, I have count data that illustrate the presence or absence of individuals in my study population. I created a grid cell across the study area and calcuated a count value for each individual per season p

Re: [R] Zero inflated: is there a limit to the level of inflation

2012-06-26 Thread Marc Schwartz
On Jun 26, 2012, at 2:10 PM, SSimek wrote: > Hello, > > I have count data that illustrate the presence or absence of individuals in > my study population. I created a grid cell across the study area and > calcuated a count value for each individual per season per year for each > grid cell. The c

Re: [R] plotting two histograms on one plot with hist function

2012-06-26 Thread John Kane
Oh, I had not thought of it in those terms. It does make sense now. John Kane Kingston ON Canada -Original Message- From: ke...@math.montana.edu Sent: Tue, 26 Jun 2012 10:57:31 -0600 To: jrkrid...@inbox.com Subject: Re: [R] plotting two histograms on one plot wi

[R] flatten lists

2012-06-26 Thread Jeroen Ooms
I am looking for a function to flatten a list to a list of only 1 level deep. Very similar to unlist, however I don't want to turn it into a vector because then everything will be casted to character vectors: x <- list(name="Jeroen", age=27, married=FALSE, home=list(country="Netherlands", city="Ut

Re: [R] chisq.test

2012-06-26 Thread David L Carlson
The warning means that you have many cells with expected values less than 5 (4 of 8 cells in this case) so that the chi square estimate may be inflated. The good news is that the probability of the inflated chi square is .0978 which you probably would not consider to be significant anyway. If you w

Re: [R] chisq.test

2012-06-26 Thread Peter Ehlers
On 2012-06-26 11:27, Omphalodes Verna wrote: Dear list! I would like to calculate "chisq.test" on simple data set with 70 observations, but the output is ''Warning message:'' Warning message: In chisq.test(tabele) : Chi-squared approximation may be incorrect Here is an example: tab

[R] Figuring out encodings of PDFs in R

2012-06-26 Thread Jonas Michaelis
Dear list, I am currently scraping some text data from several PDFs using the readPDF() function in the tm package. This all works very well and in most cases the encoding seems to be "latin1" - in some, however, it is not. Is there a good way in R to check character encodings? I found the functio

[R] Zero inflated: is there a limit to the level of inflation

2012-06-26 Thread SSimek
Hello, I have count data that illustrate the presence or absence of individuals in my study population. I created a grid cell across the study area and calcuated a count value for each individual per season per year for each grid cell. The count value is the number of time an individual was prese

[R] chisq.test

2012-06-26 Thread Omphalodes Verna
Dear list! I would like to calculate "chisq.test" on simple data set with 70 observations, but the output is ''Warning message:'' Warning message: In chisq.test(tabele) : Chi-squared approximation may be incorrect Here is an example:         tabele <- matrix(c(11, 3, 3, 18, 3, 6, 5, 21), nco

Re: [R] Storing whole regression results

2012-06-26 Thread Sarah Goslee
You can store entire regression results in a list, then use lapply() to retrieve individual coefficients as desired. Lists are very powerful for managing odd data formats, and no loops needed. Sarah On Tue, Jun 26, 2012 at 4:19 PM, Kevin Chang wrote: > Hello seasons R users, > > > > Is it possi

[R] Storing whole regression results

2012-06-26 Thread Kevin Chang
Hello seasons R users, Is it possible to store a complete regression result into an array? I've already been able to save individual regression coefficients, but would like to store the whole regression results into different arrays through a loop. So that in under different quantiles regre

Re: [R] Ljung-Box test (Box.test)

2012-06-26 Thread Rui Barradas
Hello, That's a statistics question, but it's also about using an R function. The Ljung-Box test isn't supposed to be used in such a context, to test the residuals of an ols y = bX + e. It is used to test time independence of the original series or of the residuals of an ARMA(p, q) fit. In b

Re: [R] How to specify "newdata" in a Cox-Modell with a time dependent interaction term?

2012-06-26 Thread Terry Therneau
I'm finally back from vacation and looking at your email. 1. The primary mistake is in your call, where you say fit <- survfit(mod.allison.5, newdata.1, id="Id") This will use the character string "Id" as the value of the identifier, not the data. The effect is exactly the same as the diff

[R] Compile C files

2012-06-26 Thread Frederico Mestre
Hello: Sorry, this might look like a beginner question, but I'm just starting to work on the C and R interface. I'm trying to compile a C file (with a function) to load it to an R function but, in the command line I keep getting a lot of errors, like: "C:/Program~1/R/R-215~1.0/include/R

Re: [R] increase the usage of CPU and Memory

2012-06-26 Thread Oliver Ruebenacker
Hello Christopher, If a process has data to write to hard disk, the data is usually written to a buffer in memory, and from there it is written to the hard disk independently of the CPU. Since writing to memory is much faster than writing to hard disk, this allows the process to run faster.

Re: [R] shapiro.test()

2012-06-26 Thread peter dalgaard
On Jun 26, 2012, at 16:43 , r...@uni-potsdam.de wrote: > Hey, > today I wanted to use the shapiro.test() on data containing 3 numerical > values per group. > It is the first time that an NA was given back for some of the groups. > In the follwing an example of code and output is shown: > > >>

[R] Ljung-Box test (Box.test)

2012-06-26 Thread Steven Winter
I fit a simple linear model y = bX to a data set today, and that produced 24 residuals (I have 24 data points, one for each year from 1984-2007). I would like to test the time-independence of the residuals of my model, and I was recommended by my supervisor to use the Ljung-Box test. The Box.tes

Re: [R] How To Setup hunspell in R

2012-06-26 Thread Ribbis
Do you make any progress in solving this? I'm having the same struggle. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/How-To-Setup-hunspell-in-R-tp4541801p4634523.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Intersection

2012-06-26 Thread arun
Hi, Try this:  dat1<-data.frame(value=c(15,20,25,30,45,50),dates=c("2005-05-25","2005-06-25","2005-07-25","2005-08-25","2005-09-25","2005-10-25")) dat2<-data.frame(value=c(15,20,25,50),dates=c("2005-05-25","2005-06-25","2005-07-25","2005-10-25"))  merge(dat1,dat2, by="dates")    dates value.x

Re: [R] increase the usage of CPU and Memory

2012-06-26 Thread Christofer Bogaso
On 26-06-2012 16:33, Oliver Ruebenacker wrote: Hello Xi, If a program has input or output to disk or network, this may cause it to wait and not use the available CPU. Output is usually buffered, but may cause delay if the buffer gets full (I'm not sure though whether this is an issu

Re: [R] shapiro.test()

2012-06-26 Thread Özgür Asar
Actually, your sample size is 3. Sorry for that. Ozgur -- View this message in context: http://r.789695.n4.nabble.com/shapiro-test-tp4634513p4634525.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list htt

Re: [R] plotting two histograms on one plot with hist function

2012-06-26 Thread ilai
On Tue, Jun 26, 2012 at 10:02 AM, John Kane wrote: > Why not just plot the two histograms on the same scale in a 2 panel plot? > I think OP request was "for comparison". Two panels may do, but why not a barplot of the histograms in the same panel ? barplot( rbind( hist(rbeta(30,2,4),breaks=seq(

Re: [R] rms package-superposition prediction curve of ols and data points

2012-06-26 Thread David Winsemius
On Jun 26, 2012, at 11:29 AM, Sarah Goslee wrote: You could use points() instead of plot() for the second command. Ummm. Maybe not. I think think that plot.Predict uses lattice graphics. You may need to use trellis.focus() followed by lpoints(). Or use the "+" operation with suitable obj

Re: [R] plotting two histograms on one plot with hist function

2012-06-26 Thread John Kane
Why not just plot the two histograms on the same scale in a 2 panel plot? John Kane Kingston ON Canada > -Original Message- > From: mb...@sun.ac.za > Sent: Tue, 26 Jun 2012 15:24:55 +0200 > To: r-help@r-project.org > Subject: [R] plotting two histograms on one plot with hist function >

Re: [R] shapiro.test()

2012-06-26 Thread Özgür Asar
See ?shapiro.test ...the number of non-missing values must be between 3 and 5000. By the way, how reasonable testing normality of 3 values? Best ozgur -- View this message in context: http://r.789695.n4.nabble.com/shapiro-test-tp4634513p4634520.html Sent from the R help mailing list archive a

Re: [R] Intersection

2012-06-26 Thread andrija djurovic
Hi. Try with following functions: ?intersection ?"%in%" ?"[" Perhaps someone will provide you more help if you read and follow posting guide http://www.R-project.org/posting-guide.html Andrija On Tue, Jun 26, 2012 at 5:03 PM, ÷ÁÓÉÌØÞÅÎËÏ áÌÅËÓÁÎÄÒ

[R] data.table vs plyr reg output

2012-06-26 Thread Geoffrey Smith
Hello. The data.table package is very helpful in terms of speed. But I am having trouble actually using the output from linear regression. Is there any way to get the data.table output to be as pretty/useful as that from the plyr package? Below is an example. library('data.table'); library('pl

Re: [R] Remove empty levels in subset

2012-06-26 Thread Sarah Goslee
Hi, On Tue, Jun 26, 2012 at 8:06 AM, svo wrote: > Hi, > > I have exactly the same question (how to remove empty levels in my subset), > but in my case the factor command does not work, because my dataframe is not > atomic > >> Try this: >> >> test2$a <- factor(test2$a) >> > > R gives me the error

Re: [R] Intersection

2012-06-26 Thread Sarah Goslee
That sounds like a job for merge(), but it's hard to be sure because you didn't provide the information requested in the posting guide. Sarah On Tue, Jun 26, 2012 at 11:03 AM, Васильченко Александр wrote: > Hello. > I have a problem with 2 dataframes. There are 2 columns - "value" and > "dates".

Re: [R] rms package-superposition prediction curve of ols and data points

2012-06-26 Thread Sarah Goslee
You could use points() instead of plot() for the second command. Sarah On Tue, Jun 26, 2012 at 8:37 AM, achaumont wrote: > Hello, > > I have a question about the “plot.predict” function in Frank Harrell's rms > package. > Do you know how to superpose in the same graph the prediction curve of ols

[R] Intersection

2012-06-26 Thread Васильченко Александр
Hello. I have a problem with 2 dataframes. There are 2 columns - "value" and "dates". These dataframes have different dimension. Some dates coincide. And I need to intersect them by dates and have on output two dataframes with identical columns "dates" and new dimension . "value" have to recieve in

Re: [R] Remove empty levels in subset

2012-06-26 Thread svo
Hi, I have exactly the same question (how to remove empty levels in my subset), but in my case the factor command does not work, because my dataframe is not atomic > Try this: > > test2$a <- factor(test2$a) > R gives me the error message: Error in sort.list(y) : 'x' must be atomic for 'sort.lis

[R] shapiro.test()

2012-06-26 Thread reso
Hey, today I wanted to use the shapiro.test() on data containing 3 numerical values per group. It is the first time that an NA was given back for some of the groups. In the follwing an example of code and output is shown: shapiro.test(c(0.000637806, 0.00175561, 0.001196708)) Shapir

[R] plotting two histograms on one plot with hist function

2012-06-26 Thread Blignaut, M, Mej
I would like to plot two data sets (frequency (y-axis) of mean values for 0-1(x=axis)) on a single histogram for comparison. The hist() only allow the overlay of two histograms, and although barplot() allows beside=TRUE, it does not show frequency values (like hist) but rather all of the values.

[R] rms package-superposition prediction curve of ols and data points

2012-06-26 Thread achaumont
Hello, I have a question about the “plot.predict” function in Frank Harrell's rms package. Do you know how to superpose in the same graph the prediction curve of ols and raw data points? Put most simply, I would like to combine these two graphs: > fit_linear <- ols (y4 ~ rcs(x2,c(5,10,15,20,60,

Re: [R] Packaging Error

2012-06-26 Thread Uwe Ligges
On 26.06.2012 08:54, Mayank Bansal wrote: I was trying to ByteCompile a package that I made. The package compiles successfully with byte compile set to FALSE. When I set ByteCompile to TRUE, I receive the following error message while doing R CMD INSTALL /usr/lib/R/bin/INSTALL: line 34: 9964

Re: [R] MuMIn - assessing variable importance following model averaging, z-stats/p-values or CI?

2012-06-26 Thread Uwe Ligges
Please contact the package maintainer. Best, Uwe Ligges On 26.06.2012 12:46, Robertson, Andrew wrote: Dear R users, Recent changes to the MuMIn package now means that the model averaging command (model.avg) no longer returns confidence intervals, but instead returns zvalues and corresponding

Re: [R] rrdf package for mac not working

2012-06-26 Thread Uwe Ligges
On 26.06.2012 00:41, Ricardo Pietrobon wrote: rrdf is incredibly helpful, but I've notice that the rrdf package for mac hasn't been working for some time: http://goo.gl/5Ukpn . wondering if there is still a plan to maintain that in the long run, or if there is some other alternative to read RDF

Re: [R] rrdf package for mac not working

2012-06-26 Thread Uwe Ligges
Please contact the package maintainer. Best, Uwe Ligges On 26.06.2012 00:41, Ricardo Pietrobon wrote: rrdf is incredibly helpful, but I've notice that the rrdf package for mac hasn't been working for some time: http://goo.gl/5Ukpn . wondering if there is still a plan to maintain that in the lon

Re: [R] graph displays

2012-06-26 Thread John Kane
Sorry I misunderstood what you wanted. Using ggplot2 and reshape2 which I imagine you will have to install, this should give you what you want library(ggplot2) library(reshape2) xx1 <- melt(Dataset, id = c("Source")) p <- ggplot( xx1 , aes(variable, value, fill= Source )) +

Re: [R] significance level (p) for t-value in package zelig

2012-06-26 Thread Rune Haubo
My point was just that the situation in a cumulative link model is not much different from a binomial glm - the binomial glm is even a special case of the clm with only two response categories. And just like summary(glm(, family=binomial)) reports z-values and computes p-values by using the nor

Re: [R] compare one field of dataframe with excel sheet using R

2012-06-26 Thread Jean V Adams
It would help if you provided an example for your data frame, and example for your spreadsheet, and more information on how to judge if the ppm values "are similar". Maybe this code will help you get started ... # Here's an example data frame mydf <- data.frame( compound=letters[1:10],

Re: [R] Drawing (lon,lat) coordinates onto the image of a world

2012-06-26 Thread Sarah Goslee
Hi Steve, On Mon, Jun 25, 2012 at 9:47 PM, Steven Winter wrote: > Given a set of latitude and longitude coordinates pairs (stored in variables > "latitudevals" and "longitudevals"), I would like to plot them onto the image > of a equirectangular world map. I would like to plot each coordinate p

Re: [R] graph displays

2012-06-26 Thread Jim Lemon
On 06/26/2012 06:24 PM, MSousa wrote: Good morning, Thanks for help. I can explain better what I am trying to do. I'm trying to read data from a file, separated by a tab, with the following code. Dataset<-read.table("C:/Users/Administrator/Desktop/R/graph.txt",sep="\t", quote="\"",header = TR

Re: [R] How to estimate variance components with lmer for models with random effects and compare them with lme results

2012-06-26 Thread Bert Gunter
1. This is not an R question; it is a statistical issue. 2. R-sig-mixed-models is the appropriate list, not r-help. -- Bert On Tue, Jun 26, 2012 at 3:28 AM, KL wrote: > Hi, > > I performed an experiment where I raised different families coming from two > different source populations, where eac

Re: [R] Error in mice

2012-06-26 Thread Prof Brian Ripley
On 26/06/2012 08:59, Anera Salucci wrote: Hi all, I am imputing missingness of 90 columns in a data frame using mice. But "mice" gives back : Error in nnet.default(X, Y, w, mask = mask, size = 0, skip = TRUE, softmax = TRUE, : too many (1100) weights Any idea to solve this error is we

[R] clean Email format data

2012-06-26 Thread climmi
Dear all I am now going to do some text analysis using R. However, the data is very noisy that I need to clean it first. I don't have much experience in the text cleaning process. Is anyone would provide help on this? If you are able to provide some similar code which was done before would be

Re: [R] Loop for multiple plots in figure

2012-06-26 Thread baptiste auguie
Try this alternative solution using only base functions: # split the data into 4 data.frames l <- split(data, data$Subject) names(l) # set up the graph parameters par(mfrow=n2mfrow(length(l)), mar=c(4,4,1,1), mgp = c(2, 1, 0)) # good old for loop over the subject names for( n in names(l)){ d <-

[R] MuMIn - assessing variable importance following model averaging, z-stats/p-values or CI?

2012-06-26 Thread Robertson, Andrew
Dear R users, Recent changes to the MuMIn package now means that the model averaging command (model.avg) no longer returns confidence intervals, but instead returns zvalues and corresponding pvalues for fixed effects included in models. Previously I have used this package for model selection/av

[R] How to estimate variance components with lmer for models with random effects and compare them with lme results

2012-06-26 Thread KL
Hi, I performed an experiment where I raised different families coming from two different source populations, where each family was split up into a different treatments. After the experiment I measured several traits on each individual. To test for an effect of either treatment or source as well

[R] compare one field of dataframe with excel sheet using R

2012-06-26 Thread sathya7priya
I have a data frame consisting of three columns(name of compund,ppm and frequency).Name contains string values .ppm and frequency contains numeric values with decimal points upto four digits. I have an excel sheet which is like a library.The first column contains the name of compounds and remaining

[R] Error in mice

2012-06-26 Thread Anera Salucci
Hi all, I am imputing missingness of  90 columns  in a  data frame using mice. But "mice" gives back :  Error in nnet.default(X, Y, w, mask = mask, size = 0, skip = TRUE, softmax = TRUE,  :   too many (1100) weights Any idea to solve this error is welcome, Anera [[alternative HTML vers

Re: [R] graph displays

2012-06-26 Thread MSousa
Good morning, Thanks for help. I can explain better what I am trying to do. I'm trying to read data from a file, separated by a tab, with the following code. Dataset<-read.table("C:/Users/Administrator/Desktop/R/graph.txt",sep="\t", quote="\"",header = TRUE) View(Dataset) dput(Dataset) > View(

Re: [R] increase the usage of CPU and Memory

2012-06-26 Thread Oliver Ruebenacker
Hello Xi, If a program has input or output to disk or network, this may cause it to wait and not use the available CPU. Output is usually buffered, but may cause delay if the buffer gets full (I'm not sure though whether this is an issue with plenty of memory available) Take care

Re: [R] combineLimits and Dates

2012-06-26 Thread Peter Ehlers
On 2012-06-25 15:30, Duncan Mackay wrote: Hi Elliot This works on Win 7 ver 2.15 useOuterStrips(combineLimits( xyplot(x + y ~ d | g, groups = h, data = dat, type = 'l', scales = list(y = list(relation = "free"), x = list( at =seq(from = as.Date("2011-01-0

Re: [R] increase the usage of CPU and Memory

2012-06-26 Thread Prof Brian Ripley
See the vignette for package 'parallel' to make use of your 4 cores. On 26/06/2012 01:07, Xi wrote: Dear All, I have been searching online for help increasing my R code more efficiently for almost a whole day, however, there is no solution to my case. So if anyone could give any clue to solve m

Re: [R] Drawing (lon,lat) coordinates onto the image of a world

2012-06-26 Thread Pascal Oettli
Hello, What do you mean by "image"? A file (jpeg, bmp,...)? Best Regards Le 26/06/2012 10:47, Steven Winter a écrit : Given a set of latitude and longitude coordinates pairs (stored in variables "latitudevals" and "longitudevals"), I would like to plot them onto the image of a equirectangula

Re: [R] Loop for multiple plots in figure

2012-06-26 Thread Marcel Curlin
This solution works really nicely & I learned much by working through it. However but I am having trouble with subplot formatting; setting main=d$Subject results in the correct title over each plot but repeated multiple times. Also I can't seem to format the axis labels and numbers to reduce the sp

Re: [R] Save rgl plot3d Graph as Image

2012-06-26 Thread iris
In the rgl package *rgl.postscript *can save 3d scatter plots you have generated using the plot3d command . For example open3d() x <- sort(rnorm(1000)) y <- rnorm(1000) z <- rnorm(1000) + atan2(x,y) plot3d(x, y, z, col=rainbow(1000)) rgl.postscript("persp3dd.pdf","pdf") -- View this mess

[R] Packaging Error

2012-06-26 Thread Mayank Bansal
I was trying to ByteCompile a package that I made. The package compiles successfully with byte compile set to FALSE. When I set ByteCompile to TRUE, I receive the following error message while doing R CMD INSTALL /usr/lib/R/bin/INSTALL: line 34: 9964 Done echo 'tools:::.install_packages()' 9965

[R] Drawing (lon,lat) coordinates onto the image of a world

2012-06-26 Thread Steven Winter
Given a set of latitude and longitude coordinates pairs (stored in variables "latitudevals" and "longitudevals"), I would like to plot them onto the image of a equirectangular world map. I would like to plot each coordinate pair with a red circle, if possible. Does anyone have any suggestions as

[R] increase the usage of CPU and Memory

2012-06-26 Thread Xi
Dear All, I have been searching online for help increasing my R code more efficiently for almost a whole day, however, there is no solution to my case. So if anyone could give any clue to solve my problem, I would be very appreciate for you help. Thanks in advance. Here is my issue: My desktop i