[R] problem about R

2012-10-01 Thread Leung Chen
How to run pie chart for each categorical variable in a dataset? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal

[R] smoothScatter plot

2012-10-01 Thread JiangZhengyu
Hi, I want to make a plot similar to sm1 (attached). The code I tried is: dcols <- densCols(x,y) smoothScatter(x,y, col = dcols, pch=20,xlab="A",ylab="B") abline(h=0, col="red") But it turned out to be s1 (attached) with big dots. I was wondering if anything wrong with my code. Thanks,Zhengy

Re: [R] Basic question about: <<- and method start with dot.

2012-10-01 Thread peter dalgaard
On Oct 2, 2012, at 06:00 , Fabrice Tourre wrote: > Dear list, > > When I read some source code, I find lot of place used symbol <<- , e.g. > > lastTime <<- newTime; > > What is the meaning here? Did you check help("<<-") ? The explanation there seems at least as clear as anything I could co

Re: [R] Transform pairwise observations into a table

2012-10-01 Thread arun
HI David, Thanks for your input. Third and fourth solutions looks very interesting.  with(dat1,tapply(coef,list(ind1,ind2),function(x) x)) # also gave the same result. # I tried with aggregate() and ddply(), but may be not as elegant solution as yours.   matrix(with(dat1,aggregate(coef,list(ind

Re: [R] Basic question about: <<- and method start with dot.

2012-10-01 Thread Rolf Turner
On 02/10/12 17:00, Fabrice Tourre wrote: Dear list, When I read some source code, I find lot of place used symbol <<- , e.g. lastTime <<- newTime; What is the meaning here? ?"<<-" See also: require("fortunes") fortune("<<-") Also, I find some method with the name start with dot,

Re: [R] mlogit and model-based recursive partitioning

2012-10-01 Thread Achim Zeileis
Tudor: Has anyone tried to model-based recursive partition (using mob from package party; thanks Achim and colleagues) a data set based on a multinomial logit model (using mlogit from package mlogit; thanks Yves)? Interesting question: in principle, this is possible but I wouldn't know of an

Re: [R] nlme: spatial autocorrelation on a sphere

2012-10-01 Thread Dan Bebber
Hi Spencer, thanks, I'll try R-sig-mixed-models. I tried using the corRSpher function from ramps in gls but received the following error: > Error in recalc.corSpatial(object[[i]], conLin) : > Unknown spatial correlation class Will post back here if I am successful. Dan _

[R] Basic question about: <<- and method start with dot.

2012-10-01 Thread Fabrice Tourre
Dear list, When I read some source code, I find lot of place used symbol <<- , e.g. lastTime <<- newTime; What is the meaning here? Also, I find some method with the name start with dot, e.g. .RowStandardizeCentered = function(x) { div = sqrt( rowSums(x^2) ); div[ div == 0 ] =

Re: [R] nlme: spatial autocorrelation on a sphere

2012-10-01 Thread Spencer Graves
Hi, Dan: On 10/1/2012 8:07 PM, Dan Bebber wrote: Please be assured, I really did "RTFM" (i.e. Pinheiro & Bates) as well as all the online sources, and have accessed the codes of the corStruct functions, but they do not reveal how the "metric" argument is used. Therefore, I can't reprogram to

Re: [R] nlme: spatial autocorrelation on a sphere

2012-10-01 Thread Dan Bebber
Please be assured, I really did "RTFM" (i.e. Pinheiro & Bates) as well as all the online sources, and have accessed the codes of the corStruct functions, but they do not reveal how the "metric" argument is used. Therefore, I can't reprogram to include "haversine" distance, as seen in the ramps p

Re: [R] Transform pairwise observations into a table

2012-10-01 Thread David Winsemius
On Oct 1, 2012, at 2:30 PM, arun wrote: > HI AHJ, > No problem. > > One more way in addition to reshape() (Rui's suggestion) to get the same > result. > library(reshape) > > as.matrix(cast(melt(dat1,id=c("ind1","ind2")),ind1~ind2,value="value")) > # 1 2 3 4 > #1 1.000 0.250 0.12

Re: [R] Ifelse Execution

2012-10-01 Thread Jeff Newmiller
Ifelse is a vector function and is absolutely inappropriate for that use. Use "if" instead. Also, read the help for Sys.sleep... you need to tell it how long you want to sleep. You should compute how long that is from now and sleep that long. ---

[R] Ifelse Execution

2012-10-01 Thread Bhupendrasinh Thakre
Hi Everyone, I am trying to run a time based query and need some of your help. Not much of data or packages. Just a simple one. Query I am trying to execute. ifelse ((as.numeric(as.POSIXct("2012-10-01 20:38:00"))), (rnorm(1,2,1)),(Sys.sleep())) Note. Why I am using as.numeric is as I have a li

Re: [R] (no subject)

2012-10-01 Thread Bhupendrasinh Thakre
It will be great if you can reproduce some code and data you are working on. Bhupendrasinh Thakre On Oct 1, 2012, at 4:25 PM, bibek sharma wrote: > Hello, > I am a new R -user and request your help for the following problem. > I need to merge two dataset of longitudinal study which has tw

[R] glmmPQL and spatial autocorrelation

2012-10-01 Thread Luis Huckstadt
Hi all, I am analyzing data on habitat utilization of seals in the Southern Ocean. My data show spatial autocorrelation, which I'm interested in incorporating into my model. I am trying to model the presence of dives (versus simulated pseudo-absences) using a binomial generalized binomial model (g

[R] mlogit and model-based recursive partitioning

2012-10-01 Thread tudor
Hello: Has anyone tried to model-based recursive partition (using mob from package party; thanks Achim and colleagues) a data set based on a multinomial logit model (using mlogit from package mlogit; thanks Yves)? I attempted to do so, but there are at least two reasons why I could not. First,

[R] (no subject)

2012-10-01 Thread bibek sharma
Hello, I am a new R -user and request your help for the following problem. I need to merge two dataset of longitudinal study which has two column (id and respose) common. when I used merge option to join the datas side be side, because of the repeated subject id, I got larger data set which is not

[R] Reading labels for very large heatmaps

2012-10-01 Thread JIMonroe
Hello, I have a large (919 X 919), hierarchically clustered heatmap that I would like to read the labels off of. I have tried saving the figure in pdf format and enlarging it until I can see the labels, but if I make the labels small enough to read (so that they don't overlap) using cexRow and cex

Re: [R] Transform pairwise observations into a table

2012-10-01 Thread arun
HI AHJ, No problem. One more way in addition to reshape() (Rui's suggestion) to get the same result. library(reshape) as.matrix(cast(melt(dat1,id=c("ind1","ind2")),ind1~ind2,value="value")) #  1 2 3   4 #1 1.000 0.250 0.125 0.5 #2 0.250 1.000 0.125 0.5 #3 0.125 0.125 1.000 0.5 #4 0.50

Re: [R] Error messages when attempting to calculate polychoric correlation matrices

2012-10-01 Thread John Fox
Dear Kevin, >From ?polychor (in the polycor package): "polychor(x, y, ML = FALSE, control = list(), std.err = FALSE, maxcor=.) Arguments x a contingency table of counts or an ordered categorical variable; the latter can be numeric, logical, a factor, or an ordered factor, but if a fa

Re: [R] svyboxplot - library (survey)

2012-10-01 Thread Thomas Lumley
The documentation says "The grouping variable in svyboxplot, if present, must be a factor" -thomas On Tue, Oct 2, 2012 at 4:28 AM, Muhuri, Pradip (SAMHSA/CBHSQ) wrote: > Dear Anthony, > > Yes, I can follow the example code you have given. But, do you know from the > code shown below (followi

Re: [R] Retrieve hypergeometric results in large scale

2012-10-01 Thread William Dunlap
order() is usually a lot more useful than sort(), since, as you noticed, sort() drops information about where each element in its output came from. Your example was incomplete so I made up one which I think is similar. > n <- 10 ; p <- 0.7 ; k <- 0:n ; d <- dbinom(k, n, p) > plot(k, d) # densi

[R] clustering spline-based models

2012-10-01 Thread Wyatt McMahon
Hello playeRs! I'm working on a project for a client. She's modeling hormone levels periodically, and trying to develop a model and fit her data to that model, and subsequently she's trying to cluster individuals based on how well each fits the model. I've been looking at grofit for this,

Re: [R] Problem with nls regression fit

2012-10-01 Thread Jean V Adams
You have not specified a nonlinear formula. There are no parameters to estimate in the formula you provide, y1~dist. What is the nonlinear relation you are trying to fit? Look at the help file for nls to see some examples worked. ?nls Jean Gyanendra Pokharel wrote on 10/01/2012 10:27:23

Re: [R] ffbase, help with %in%

2012-10-01 Thread Christiaan Pauw
Hi Lucas I don't know the ff package very well but here is what I found. Maybe there is a clue in here > z <- as.Date("1970-01-01")+1:10 > zff <- as.ff(z) > z %in% zff [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #but > z %in% zff[1:length(zff),] [1] TRUE TRUE TRUE TRUE T

Re: [R] (senza oggetto)

2012-10-01 Thread peter dalgaard
On Oct 1, 2012, at 20:28 , MYRIAM TABASSO wrote: > hi, can I help me to cancel my name in this list? Sure, just go to the mailman site listed in the footer (look near bottom of page). > Thanks > > [[alternative HTML version deleted]] > > __ >

[R] (senza oggetto)

2012-10-01 Thread MYRIAM TABASSO
hi, can I help me to cancel my name in this list? Thanks [[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 http://www.R-project.org/posting-gui

Re: [R] calculating probability from the density function

2012-10-01 Thread Greg Snow
You may find it easier to use the logspline density fits (logspline package) rather than the kernel density estimators for this. On Mon, Oct 1, 2012 at 7:46 AM, Eugene Kanshin wrote: > Hello, > I have a data x with normal (or very close to normal) distribution, I can > plot a density distribution

Re: [R] modified Ward method

2012-10-01 Thread David L Carlson
You asked this question before. I think you need to tell us what "modified ward method" you are talking about and what you are trying to accomplish. I did a quick Google Scholar search and turned up only a few papers using that phrase, but they were not defining it in the same way. --

Re: [R] enquiry

2012-10-01 Thread Rui Barradas
Hello, Or maybe %in%. x <- Sys.Date() + 1:10 y <- Sys.Date() + 7:15 x %in% y # logical index into 'x' x[x %in% y] # common x[!x %in% y] # not common setdiff(x, y) # doesn't keep class Date Hope this helps, Rui Barradas Em 01-10-2012 15:57, R. Michael Weylandt escreveu: On Monday, October

[R] ffbase, help with %in%

2012-10-01 Thread Lucas Chaparro
Hello to everyone. I'm trying to use the %in% to match to vectors in ff format. a<-as.ff(data[,1]) %in% fire$fecha > aff (open) logical length=3653 (3653) [1][2][3][4][5][6][7][8][3646] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE : FALSE [36

Re: [R] Retrieve hypergeometric results in large scale

2012-10-01 Thread Rui Barradas
Hello, See the differences. k <- 3 p <- 0.95 m <- 90; n <- 10 dhyper(0:k, m, n, k) # Prob(X = x), with x = 0:k phyper(0:k, m, n, k) # Prob(X <= x) # quantiles, what you want qhyper(p, m, n, k) # inverse of phyper m <- 50; n <- 50 dhyper(0:k, m, n, k) phyper(0:k, m, n, k) qhyper(p, m, n, k)

Re: [R] Transform pairwise observations into a table

2012-10-01 Thread Rui Barradas
Hello, Try the following. dat <- read.table(text=" ind1 ind2 coef 1 1 1 1 2 0.25 1 3 0.125 1 4 0.5 2 2 1 2 1 0.25 2 3 0.125 2 4 0.5 3 3 1 3 1 0.125 3 2 0.125 3 4 0.5 4 4 1 4 1 0.5 4 2 0.5 4 3 0.5 ", header=TRUE) dat reshape(dat, v.names = "coef", idvar = "ind1", timevar = "ind2", direc

Re: [R] Hmisc describe error

2012-10-01 Thread David Winsemius
On Oct 1, 2012, at 10:27 AM, David Winsemius wrote: > > On Oct 1, 2012, at 9:48 AM, stephenb wrote: > >> The error is just a misleading error message. loading the data produced >> column sdate as >>> str(prostate) >> $ sdate :Classes 'labelled', 'dates' atomic [1:502] 2778 2820 2933 2999 >> 3

Re: [R] Hmisc describe error

2012-10-01 Thread Bond, Stephen
Just as a clarification: I downloaded 'prostate.sav' from F. Harrell's website. For some reason > data(prostate) Warning message: In data(prostate) : data set 'prostate' not found I don't have the prostate data set as is. -Original Message- From: David Winsemius [mailto:dwinsem...@comca

Re: [R] Hmisc describe error

2012-10-01 Thread David Winsemius
On Oct 1, 2012, at 9:48 AM, stephenb wrote: > The error is just a misleading error message. loading the data produced > column sdate as >> str(prostate) > $ sdate :Classes 'labelled', 'dates' atomic [1:502] 2778 2820 2933 2999 > 3002 ... > .. ..- attr(*, "format")= symbol ddmmmyy > .. ..- att

Re: [R] Transform pairwise observations into a table

2012-10-01 Thread Bert Gunter
You might be amused by this alternative: with(dat1,matrix(coef[order(ind2,ind1)],nr=4,nc=4)) It works because matrices are vectors stored in column major order. Cheers, Bert On Mon, Oct 1, 2012 at 9:53 AM, arun wrote: > Hi, > Try this: > > dat1<-read.table(text=" > ind1 ind2 coef > 1 1 1 > 1

Re: [R] svyboxplot - library (survey)

2012-10-01 Thread Anthony Damico
try svyboxplot( dthage ~ factor( xspd2 ) , subset(nhis, mortstat==1) , col="gray80", varwidth=TRUE , ylab="Age at Death" , xlab="SPD Status: 1-SPD, 2=No SPD" ) On Mon, Oct 1, 2012 at 11:28 AM, Muhuri, Pradip (SAMHSA/CBHSQ) < pradip.muh...@samhsa.hhs.gov> wrote: > D

Re: [R] Retrieve hypergeometric results in large scale

2012-10-01 Thread jas4710
Thanks Jeff~~~ In fact I do not know how to combine and extract vectors in R. ans<-sort(dhyper(x, m, n, k),decreasing=TRUE) rbind(ans,cumsum(ans) will show the first point that exceeds 95% threshold. The problem is: *information is lost* I can no longer identify where are the first few elements

Re: [R] Transform pairwise observations into a table

2012-10-01 Thread arun
Hi, Try this: dat1<-read.table(text=" ind1 ind2 coef 1 1 1 1 2 0.25 1 3 0.125 1 4 0.5 2 2 1 2 1 0.25 2 3 0.125 2 4 0.5 3 3 1 3 1 0.125 3 2 0.125 3 4 0.5 4 4 1 4 1 0.5 4 2 0.5 4 3 0.5 ",sep="",header=TRUE) mat1<-as.matrix(xtabs(coef~ind1+ind2,data=dat1)) #    ind2 #ind1     1

Re: [R] Hmisc describe error

2012-10-01 Thread stephenb
The error is just a misleading error message. loading the data produced column sdate as > str(prostate) $ sdate :Classes 'labelled', 'dates' atomic [1:502] 2778 2820 2933 2999 3002 ... .. ..- attr(*, "format")= symbol ddmmmyy .. ..- attr(*, "label")= chr "Date on study" prostate$sdate <- as.

Re: [R] Retrieve hypergeometric results in large scale

2012-10-01 Thread Bert Gunter
If you have not already done so, stop what you are doing and work through the Introduction to R tutorial that ships with R (or other R tutorial on the web that you may prefer). The tutorials are written to help you climb the R learning curve much more efficiently than the fooling around that you a

Re: [R] Transform pairwise observations into a table

2012-10-01 Thread Hadjixenofontos, Athena
Thank you. I had looked at xtabs but misunderstood the syntax. This is great. :) AHJ On Oct 1, 2012, at 12:53 PM, "arun" wrote: > Hi, > Try this: > > dat1<-read.table(text=" > ind1 ind2 coef > 1 1 1 > 1 2 0.25 > 1 3 0.125 > 1 4 0.5 > 2 2 1 > 2 1 0.25 > 2 3 0.125 > 2 4 0.5 > 3 3 1

Re: [R] Hmisc describe error

2012-10-01 Thread David Winsemius
On Oct 1, 2012, at 9:33 AM, Bond, Stephen wrote: > Describe fails for me with a message similar to what was an issue in 2008 and > got fixed according to posts. > > R version 2.15.0 (2012-03-30) > Copyright (C) 2012 The R Foundation for Statistical Computing > ISBN 3-900051-07-0 > Platform: i38

[R] Transform pairwise observations into a table

2012-10-01 Thread AHJ
Hi, I have a table of pairs of individuals and a coefficient that belongs to the pair: ind1ind2coef 1 1 1 1 2 0.25 1 3 0.125 1 4 0.5 2 2 1 2 1 0.25 2 3 0.125 2 4 0.5 3 3 1 3 1

Re: [R] Retrieve hypergeometric results in large scale

2012-10-01 Thread jas4710
Hi Bert. This is not a homework. If I can do some basic programming in R like Perl, then I'll have a better chance to accomplish this task but the matrix concept is not quickly comprehensible... -- View this message in context: http://r.789695.n4.nabble.com/Retrieve-95-coverage-of-results-from-

[R] Error messages when attempting to calculate polychoric correlation matrices

2012-10-01 Thread Kevin Cheung
Dear R users, I am a psychology postgraduate student who is relatively new to using R. I am currently developing a psychometric scale and have run into a few problems when using R to calculate a polychoric correlation matrix for my dataset. I am trying to produce a polychoric correlation matrix

Re: [R] Retrieve hypergeometric results in large scale

2012-10-01 Thread jas4710
Thanks Jeff The documentation pages, if I haven't missed any crucial points, illustrate how to get probability and cumulative probability values. I can first retrieve the data structures and use Perl (I don't know how to use R...) to sort the derived ratios and sum the probability values until th

Re: [R] nlme: spatial autocorrelation on a sphere

2012-10-01 Thread David Winsemius
On Oct 1, 2012, at 8:34 AM, Spencer Graves wrote: > On 10/1/2012 12:38 AM, David Winsemius wrote: >> > >> LMCTVTFY: http://cran.r-project.org/web/views/Spatial.html >> > > > What's LMCTVIFY? Please accept my apologies for attempting to be cute and I also apologize to Mr Bebber for rea

[R] Hmisc describe error

2012-10-01 Thread Bond, Stephen
Describe fails for me with a message similar to what was an issue in 2008 and got fixed according to posts. R version 2.15.0 (2012-03-30) Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i386-pc-mingw32/i386 (32-bit) # output truncated > options(chmhelp

Re: [R] calculating probability from the density function

2012-10-01 Thread David Winsemius
On Oct 1, 2012, at 6:46 AM, Eugene Kanshin wrote: > Hello, > I have a data x with normal (or very close to normal) distribution, I can > plot a density distribution with density(x,...). My question is is there > any way to calculate an area under this distribution (=probability) for > particular

Re: [R] can't create png graphics under linux anymore

2012-10-01 Thread Prof Brian Ripley
See the 'R Installation and Administration Manual'. And yes, it is related to the actions of whoever installed R, so please discuss it with them. On 01/10/2012 14:54, Tobias Pilz wrote: Hi, since my update of Linux from opensuse 11.4 to 12.1 and the update of R to 2.15.1 I can't produce grap

Re: [R] calculating probability from the density function

2012-10-01 Thread Bert Gunter
Forget density(). Smooth the ecdf instead. ?lowess ?smooth.spline ?monotone.smooth (in package fda, for monotone smoothing, which may be preferable) ?locfit (in package locfit) ... and many many others -- Bert On Mon, Oct 1, 2012 at 6:46 AM, Eugene Kanshin wrote: > Hello, > I have a data x wit

Re: [R] svyboxplot - library (survey)

2012-10-01 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Dear Anthony, Yes, I can follow the example code you have given. But, do you know from the code shown below (following Thomas Lumley's "Complex Surveys") why I am getting the boxplot of dthage for just xspd=1, not xspd2=2? My intent is the make this code work so that I can generate similar plo

[R] Problem with nls regression fit

2012-10-01 Thread Gyanendra Pokharel
Hi all, I got following problem in fitting the data. Any kind of suggestions are welcome > beta <- 3.5 > d <- seq(0.1,62.5,0.1) > y <- exp(-beta*d) > y1 <- y > x <- read.table("epidist.txt", header = TRUE) > data.nls <- as.data.frame(cbind(y1,x)) > #attach(data.nls) > nls.fit <- nls(y1~dist,data.

Re: [R] Retrieve hypergeometric results in large scale

2012-10-01 Thread Bert Gunter
Homework? There's a no homework policy on this list. -- Bert On Mon, Oct 1, 2012 at 8:10 AM, Jeff Newmiller wrote: > Perhaps you should read > > ?dhyper > > and if you have a hard time parsing that, then read > > ?Distributions > > and then go back to > > ?dhyper > --

Re: [R] Retrieve hypergeometric results in large scale

2012-10-01 Thread Jeff Newmiller
Perhaps you should read ?dhyper and if you have a hard time parsing that, then read ?Distributions and then go back to ?dhyper --- Jeff NewmillerThe . . Go Live... DCN:Bas

[R] Retrieve hypergeometric results in large scale

2012-10-01 Thread jas4710
I'm going to use dhyper(x, m, n, k) to get a 95% coverage. Let me use an example to explain my problem: Suppose I have a urn containing 90 red and 10 black balls. Now I wanna remove 3 from the urn. By the following codes: m<-90;n<-10;k<-3; x<-0:3 dhyper(x,m,n,k) I can obtain the probability

Re: [R] enquiry

2012-10-01 Thread R. Michael Weylandt
On Monday, October 1, 2012, Karan Anand wrote: > hi, > I am new to using R ,I have 2 datasets with dates common in them ,how > can i take out the common dates within them. > > Depending on what you mean by 'out' either merge() or setdiff() RMW > karan > > [[alternative HTML version

Re: [R] which() with multiple conditions

2012-10-01 Thread R. Michael Weylandt
On Monday, October 1, 2012, pdb wrote: > I hope someone can point me in the right direction please. > > I have a data frame with a column containing names. I want to identify the > columns that contain names in a list. > > namestofind <- c('fred','bill',a long list) > > If I only wanted to id

[R] calculating probability from the density function

2012-10-01 Thread Eugene Kanshin
Hello, I have a data x with normal (or very close to normal) distribution, I can plot a density distribution with density(x,...). My question is is there any way to calculate an area under this distribution (=probability) for particular range of x values, let's say for x from 0 to 2? I was not able

[R] enquiry

2012-10-01 Thread Karan Anand
hi, I am new to using R ,I have 2 datasets with dates common in them ,how can i take out the common dates within them. karan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-h

[R] can't create png graphics under linux anymore

2012-10-01 Thread Tobias Pilz
Hi, since my update of Linux from opensuse 11.4 to 12.1 and the update of R to 2.15.1 I can't produce graphics with png() or similar (like tiff, jpeg etc.) anymore. The following error occurs: > png() Error in X11(paste("png::", filename, sep = ""), g$width, g$height, pointsize, : unable

[R] which() with multiple conditions

2012-10-01 Thread pdb
I hope someone can point me in the right direction please. I have a data frame with a column containing names. I want to identify the columns that contain names in a list. namestofind <- c('fred','bill',a long list) If I only wanted to identify a single name I would use which(z$name == 'bi

Re: [R] Better way of Grouping?

2012-10-01 Thread Charles Determan Jr
Thank you Jeff, The main purpose I am looking to use these subsets for is to do comparisons between groups and/or timepoints within groups. For example the difference in means between 3 and 4, or the percent difference between group L an D within group 3. The code I have provided is almost exact

Re: [R] adjust font in ggplot2 to LaTeX document

2012-10-01 Thread Brian Diggs
On 9/30/2012 11:38 AM, Jonas Stein wrote: Hi, how can i adjust the font in a ggplot2 qplot so that it will look similar to the LaTeX font? Computer Modern Sans Serif in the same size would be nice. My output device is ggsave(filename="test.pdf", width=5.5, height=3, dpi=300) and i will include

Re: [R] svyboxplot - library (survey)

2012-10-01 Thread Anthony Damico
using a slight modification of the example shown in ?svyboxplot # load survey library library(survey) # load example data data(api) # create an example svydesign dstrat <- svydesign(id = ~1, strata = ~stype, weights = ~pw, data = apistrat, fpc = ~fpc) # set the plot window to display 1 plo

Re: [R] installing a package from Archive

2012-10-01 Thread Duncan Murdoch
On 01/10/2012 10:02 AM, gra...@stat.columbia.edu wrote: On Mon, 1 Oct 2012, Duncan Murdoch wrote: Thanks a lot. Following your suggestions, I have done the following: zercona:Downloads graziapittau$ R CMD INSTALL blme 0.01-4.tar.gz Warning: invalid package ‘0.01-4.tar.gz’ The filename should

Re: [R] installing a package from Archive

2012-10-01 Thread grazia
On Mon, 1 Oct 2012, Duncan Murdoch wrote: Thanks a lot. Following your suggestions, I have done the following: zercona:Downloads graziapittau$ R CMD INSTALL blme 0.01-4.tar.gz Warning: invalid package ‘0.01-4.tar.gz’ * installing to library ‘/Library/Frameworks/R.framework/Versions/2.15/Resourc

[R] svyboxplot - library (survey)

2012-10-01 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Hello, I have used the library (survey) package for boxplots using the following code. Could anyone please tell me why I am getting only 1 boxplot instead of 2 boxplots (1-SPD, 2-No SPD). What changes in the following code would be required to get 2 boxplots in the same plot frame? Thank

Re: [R] lme help configuring random effects

2012-10-01 Thread Ben Bolker
Julie Lee-Yaw yahoo.ca> writes: > [snip] > I am trying to run a mixed effects model in R using the lme > package. My experiment is such that I am interested in the effects > of Temperature (2 levels) and Species (3 levels) on Growth. I > collected individuals from three populations within ea

Re: [R] merge.zoo returns unmatched dates

2012-10-01 Thread arun
HI, You can also try this: Vup<-read.table(text="     Date, Velocity_m/s  2010-01-21 07:42:00,    1.217943  2010-01-21 07:43:00,    1.624395  2010-01-21 07:44:00,    1.526379  2010-01-21 07:45:00,    1.456831  2010-01-21 07:46:00,    1.245390  2010-01-21 07:47:00,    1.374330 ",sep=","

Re: [R] installing a package from Archive

2012-10-01 Thread Prof Brian Ripley
On 01/10/2012 12:48, gra...@stat.columbia.edu wrote: Dear all, I'm trying to install in R the package blme that has been removed from R cran but it is still in the Archive: http://cran.r-project.org/src/contrib/Archive/blme/ I have a Mac OSX and I have been trying with the following command from

Re: [R] installing a package from Archive

2012-10-01 Thread Duncan Murdoch
On 01/10/2012 7:48 AM, gra...@stat.columbia.edu wrote: Dear all, I'm trying to install in R the package blme that has been removed from R cran but it is still in the Archive: http://cran.r-project.org/src/contrib/Archive/blme/ I have a Mac OSX and I have been trying with the following command fr

[R] installing a package from Archive

2012-10-01 Thread grazia
Dear all, I'm trying to install in R the package blme that has been removed from R cran but it is still in the Archive: http://cran.r-project.org/src/contrib/Archive/blme/ I have a Mac OSX and I have been trying with the following command from the Shell: R CMD INSTALL --build http://cran.r-

Re: [R] adjust font in ggplot2 to LaTeX document

2012-10-01 Thread Ben Bolker
Jonas Stein jonasstein.de> writes: > > Hi, > > how can i adjust the font in a ggplot2 qplot so that it will look > similar to the LaTeX font? > Computer Modern Sans Serif in the same size would be nice. > > My output device is > ggsave(filename="test.pdf", width=5.5, height=3, dpi=300) > an

Re: [R] nlme: spatial autocorrelation on a sphere

2012-10-01 Thread David Winsemius
On Oct 1, 2012, at 12:59 AM, Dan Bebber wrote: > Thanks, but the problem is quite specific and not addressed on the Spatial > Data taskview page. > Quite specifically, I would like to know how to edit corSpatial functions to > calculate great circle distances. > The Bayesian equivalent, georamp

Re: [R] nlme: spatial autocorrelation on a sphere

2012-10-01 Thread Spencer Graves
1. Have you consulted Pinheiro and Bates (2000) Mixed-Effects Modeling in S and S-Plus (Springer)? It does not has much information on the cor* constructor functions, but it does have some. "corExp" is discussed on p. 238, and information on other cor* functions should be in pages near

Re: [R] [Fwd: REML - quasipoisson]

2012-10-01 Thread Simon Wood
Hi Greg, For quasi families I've used extended quasi-likelihood (see Mccullagh and Nelder, Generalized Linear Models 2nd ed, section 9.6) in place of the likelihood/quasi-likelihood in the expression for the (RE)ML score. I hadn't realised that this was possible before the paper was published.

Re: [R] REML - quasipoisson

2012-10-01 Thread Greg Dropkin
hi the explanation seems to be that fix.family.ls is invoked to define a saturated log likelihood for quasi families, which means that the F2q term which I had thought to be undefined, is actually defined in this example as F2q<--500 * log(phiq)/2 The formula then becomes F1q-F2q+F3q-F4q which

Re: [R] merge.zoo returns unmatched dates

2012-10-01 Thread Vindoggy !
You nailed it, It was a tz issue. Thanks! > Date: Mon, 1 Oct 2012 09:41:35 +0200 > From: achim.zeil...@uibk.ac.at > To: vindo...@hotmail.com > CC: r-help@r-project.org > Subject: Re: [R] merge.zoo returns unmatched dates > > On Mon, 1 Oct 2012, Vindoggy ! wrote: > > > > > Sorry for the lack o

[R] adjust font in ggplot2 to LaTeX document

2012-10-01 Thread Jonas Stein
Hi, how can i adjust the font in a ggplot2 qplot so that it will look similar to the LaTeX font? Computer Modern Sans Serif in the same size would be nice. My output device is ggsave(filename="test.pdf", width=5.5, height=3, dpi=300) and i will include the graphic with 5.5 inch in LaTeX. I fo

Re: [R] nlme: spatial autocorrelation on a sphere

2012-10-01 Thread Dan Bebber
Thanks, but the problem is quite specific and not addressed on the Spatial Data taskview page. Quite specifically, I would like to know how to edit corSpatial functions to calculate great circle distances. The Bayesian equivalent, georamps in the ramps package, is able to do this, therefore I im

Re: [R] merge.zoo returns unmatched dates

2012-10-01 Thread Achim Zeileis
On Mon, 1 Oct 2012, Vindoggy ! wrote: Sorry for the lack of reproducible data, but this seems to be a problem inherent to my dataset and I can't figure out where the issue is. I have several data frames set up as a time series with identical POSIXct date formats. If I keep the original data

Re: [R] nlme: spatial autocorrelation on a sphere

2012-10-01 Thread David Winsemius
On Sep 30, 2012, at 6:48 PM, Dan Bebber wrote: > I have spatial data on a sphere (the Earth) for which I would like to run an > gls model assuming that the errors are autcorrelated, i.e. including a > corSpatial correlation in the model specification. > > In this case the distance metric shoul

Re: [R] install.packages on windows

2012-10-01 Thread Heramb Gadgil
You can look for different versions of that package and try manually installing the lower version. On Fri, Sep 28, 2012 at 11:25 PM, Uwe Ligges < lig...@statistik.tu-dortmund.de> wrote: > > > On 28.09.2012 00:32, Duncan Murdoch wrote: > >> On 12-09-27 2:53 PM, Anju R wrote: >> >>> Sometimes when

[R] lme help configuring random effects

2012-10-01 Thread Julie Lee-Yaw
Hi Everyone,  Sorry to ask what I think is a basic question but I really haven't found my answer yet in the archives.  I am trying to run a mixed effects model in R using the lme package. My experiment is such that I am interested in the effects of Temperature (2 levels) and Species (3 levels)

[R] merge.zoo returns unmatched dates

2012-10-01 Thread Vindoggy !
Sorry for the lack of reproducible data, but this seems to be a problem inherent to my dataset and I can't figure out where the issue is. I have several data frames set up as a time series with identical POSIXct date formats. If I keep the original data in data frame format and merge them usin

[R] Error in JohnsonFit

2012-10-01 Thread prajamitra bhuyan
Dear Sir/Madam, As mentioned in help, R reports error while fitting Johnson distribution by method of moments. I have used moments from Weibull distribution and hence it is well within the feasible area and try to fit Johnson distribution using method of moments. As for example, shape=0.5 # Sh