[R] Errors running spdplyr example

2017-06-07 Thread Shige Song
Dear All, When I tried to run the following code (taken from the *spdplyr* package vignettes): library(spdplyr) library(maptools) data(wrld_simpl) worldcorner <- wrld_simpl %>% mutate(lon = coordinates(wrld_simpl)[,1], lat = coordinates(wrld_simpl)[,2]) %>% filter(lat < -20, lon > 60) %>%

Re: [R] R STUDIO crashing

2016-05-18 Thread Shige Song
One thing for sure: It's not the fault of R nor Rstudio (because they are doing fine on other people's computers, mine included). You can probably get some help on the Rstudio support forum. On Wed, May 18, 2016 at 6:37 PM, rezvan hatami via R-help < r-help@r-project.org> wrote: > Hi there > I ha

Re: [R] R Running slow on Ubuntu

2014-03-15 Thread Shige Song
Installing the openbals library may help. Shige On Sat, Mar 15, 2014 at 12:00 PM, Jeff Newmiller wrote: > Comparing with an unspecified benchmark makes answering this too hard. > Following instructions in the Posting Guide will lead to more accurate Q > and A. > > Note that you may not need to

Re: [R] Problem with figures

2012-12-03 Thread Shige Song
! LaTeX Error: Option clash for package preview. > > The log file is at figure/fig1.log by default in your case. > > Regards, > Yihui > -- > Yihui Xie > Phone: 515-294-2465 Web: http://yihui.name > Department of Statistics, Iowa State University > 2215 Snedecor Hall, A

Re: [R] Problem with figures

2012-12-03 Thread Shige Song
gt; > ! LaTeX Error: Option clash for package preview. > > The log file is at figure/fig1.log by default in your case. > > Regards, > Yihui > -- > Yihui Xie > Phone: 515-294-2465 Web: http://yihui.name > Department of Statistics, Iowa State University > 2215 Sn

Re: [R] Problem with figures

2012-12-02 Thread Shige Song
Easiest way: copy and paste the code into Rstudio and hit "compile pdf". >From the command line, I believe you can do "knit2pdf example.Rnw". Shige On Sun, Dec 2, 2012 at 6:12 PM, Duncan Murdoch wrote: > On 12-12-02 5:42 PM, Shige Song wrote: > >> I am having

[R] Problem with figures

2012-12-02 Thread Shige Song
I am having problem making ggplot2, tikzDevice, and knitr working together. I used a very simple example: ---example.Rnw- \documentclass[preview]{standalone} \begin{document} \begin{figure} <>= library(ggplot2) qplot(displ, hwy, data = mpg, colo

[R] Two questions about R2BayesX package

2012-10-05 Thread Shige Song
Dear All, I have two questions regarding the use of the R2BayesX package for Bayesian analysis. First, is it possible to generate predictions based on the fitted model? According to Gelman and Hill (2007, pp. 361-363), there are at least two ways to do this in BUGS: (1) generate additional data p

Re: [R] Debugging using RStudio or any other R editor

2012-02-21 Thread Shige Song
Both ESS (with ess-tracebug) and StatET (an R plug-in for Eclipse) has debugger function. Shige On Tue, Feb 21, 2012 at 8:16 AM, R. Michael Weylandt wrote: > ?findLineNum in conjunction with ?setBreakpoint and ?traceback or > options(error=recover) seems like a good strategy within R. Not sure >

Re: [R] Plotting a date variable after GAM

2011-12-14 Thread Shige Song
Dear Jean, That is a simple and effective solution. Thank you! Best, Shige On Tue, Dec 13, 2011 at 4:16 PM, Jean V Adams wrote: > > Shige Song wrote on 12/12/2011 07:49:39 PM: > > >> Dear All, >> >> I am fitting a simple GAM model using the "gam" fun

[R] Plotting a date variable after GAM

2011-12-12 Thread Shige Song
Dear All, I am fitting a simple GAM model using the "gam" function in the "mgcv" package. The only independent variable is a continuous variable representing the time of the event (in year and month) coded so that "0" represents January 1960, "1" represents February 1960, etc. Now when I try to pl

Re: [R] Plotting GEE confidence bands using "predict"

2011-10-17 Thread Shige Song
Hi Jason, I would go for Zelig package to get simulated values and confidence intervals. It can handle gee model. Shige On Mon, Oct 17, 2011 at 9:38 AM, JASON M. HILL wrote: > Hello Fellow R > Users,I have > spent the last week trying to find a work around to this problem and I can't > seem to

[R] OpenBUGS and glmmBUGS package

2011-06-27 Thread Shige Song
Dear All, I am trying to use the glmmBUGS package with OpenBUGS under Linux. Here is a short list of code I modified from the diseasemapping package document: library(diseasemapping) data(popdata) data(casedata) model = getRates(casedata, popdata, ~age*se

Re: [R] Performance Difference? Windows vs. Linux

2011-03-18 Thread Shige Song
One thing that Linux makes trivially easy is to interpolate R with C++ through the Rcpp package. The GCC compiler collection is part of all mainstream Linux distro. This is, however, not the case with Windows: you may be able to do it eventually (not sure about this point), but it takes quite some

Re: [R] Rstudio question

2011-03-04 Thread Shige Song
Why don't you post the question to the RStudio support forum? The folks there are quite responsive and very helpful. Shige On Fri, Mar 4, 2011 at 9:05 AM, Robert Kinley wrote: >  I really like RStudio ... > > ... but I wish it wouldn't automatically reload the last .RData it had. > > Anyone know

[R] Recoding using the memisc package

2011-02-13 Thread Shige Song
Dear All, I am trying to recode a variable using the functions provided by "memisc" package. Actually I am following the examples on page 9-10 of the vignette: -- d.fig <- within(d.fig,{ sev <- recode(sev, 1 ->

Re: [R] Changes titles in ggplot2 plot

2011-02-13 Thread Shige Song
rillo > Supervisory Fishery Biologist > Department of the Interior > US Fish & Wildlife Service > California, USA > http://www.fws.gov/redbluff/rbdd_jsmp.aspx > > > > > - Original Message >> From: Shige Song >> To: r-help Help >> Sent: S

[R] Changes titles in ggplot2 plot

2011-02-12 Thread Shige Song
Dear Colleagues, In the following simple ggplot2 code: m <- ggplot(d.fig, aes(time, prob)) m + stat_summary(fun.data = "median_hilow", conf.int = .95, geom = "smooth") + facet_wrap(~ Cohort, nrow=1) + coord_cartesian(ylim = c(0, .03)) --

Re: [R] RGtk2 compilation problem

2011-01-06 Thread Shige Song
is called on your system) when >> installing the tarball. >> >> For those packaging source packages: in the unusual event that your >> package sources contains symbolic (or even hard) links, don't use GNU tar >> 1.24 or 1.25. >> >> On Thu, 6 Jan 2011, Sh

Re: [R] RGtk2 compilation problem

2011-01-06 Thread Shige Song
c 29, 2010 at 6:44 AM, Shige Song wrote: >> >> Dear All, >> >> I am trying to compile&install the package "RGtk2" on my Ubuntu 10.04 >> box. I did not have problem with earlier version

Re: [R] iPhone 3G App For R?

2011-01-02 Thread Shige Song
Does iphone even support the GNU tool chain? Shige On Sun, Jan 2, 2011 at 9:25 PM, Ben Ward wrote: > On 02/01/2011 23:28, Mkip wrote: >> >> Does anyone know if a free iphone 3G app for R is available now? >> >> Thanks, >> Matilda Gogos >> >> __ >> R-he

[R] R-forge is down?

2010-12-30 Thread Shige Song
I realized that r-forge has been down for a couple of days. Does anybody know when it will come back? Shige __ 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/posti

[R] RGtk2 compilation problem

2010-12-29 Thread Shige Song
Dear All, I am trying to compile&install the package "RGtk2" on my Ubuntu 10.04 box. I did not have problem with earlier versions, but with the new version, I got the following error message : - * insta

Re: [R] How to turn the colour off for lattice graph?

2010-11-13 Thread Shige Song
e-looking b&w figure from the X11 display but still cannot get the same thing from tikz output. I guess it's something about the connection between lattice and tikz that I was unable to identify. Shige On Sat, Nov 13, 2010 at 11:31 AM, David Winsemius wrote: > > On Nov 13, 2010, at 10

Re: [R] Question about the "effects" package

2010-11-13 Thread Shige Song
cmaster.ca/jfox > > >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On >> Behalf Of Shige Song >> Sent: November-13-10 10:14 AM >> To: r-help Help >> Subject: [R] Question about the "effe

[R] Question about the "effects" package

2010-11-13 Thread Shige Song
Dear All, I am using the "effects" package to produce predicted probability from a logistic regression. The graph looks really good. I soon realized that the y-axis is not spaced equally. For example, in my case, the distance between 0.02 and 0.04 is much greater than that between 0.06 and 0.08. I

[R] How to turn the colour off for lattice graph?

2010-11-13 Thread Shige Song
Dear All, I am trying to plot a lattice figure and include it in a LaTeX document via the TikZDevice package. I think the journal I am submitting to does not like colour figure, so I need to get rid of all the colours in the figure. If I directly generate PDF or EPS, the option "trellis.device(col

Re: [R] Where to get rcom for Linux

2010-11-06 Thread Shige Song
isn't COM a Windows-only technology? Shige On Sat, Nov 6, 2010 at 12:12 PM, Stephen Liu wrote: > Hi folks, > > Debian 600 64-bit > > Is rcom for Linux available? > > rcom > rcom: R COM Client Interface and internal COM Server > http://cran.r-project.org/web/packages/rcom/index.html > > If YES pl

Re: [R] Question about ggplot2

2010-11-02 Thread Shige Song
ustment, use > coord_cartesian(): > > year.plot + stat_summary(fun.y = "mean", geom = "line") + >  coord_cartesian(xlim = c(0, 0.1)) > > HTH, > > Josh > > On Tue, Nov 2, 2010 at 5:20 PM, Shige Song wrote: >> Dear Josh and Abhijit, >> >> Thanks

Re: [R] Question about ggplot2

2010-11-02 Thread Shige Song
stat_summary(fun.y = "mean", geom = "line") + >  scale_y_continuous(limits = c(0, .1)) > > where limits may be whatever you like for the y axis. > > Cheers, > > Josh > > On Tue, Nov 2, 2010 at 6:57 AM, Shige Song wrote: >> Dear All, >> >

[R] Question about ggplot2

2010-11-02 Thread Shige Song
Dear All, I am trying to graph a simple scatter plot where the x axis is year and the y axis is a percentage (percentage of infant death). Instead of plotting the raw data, I want to plot summary statistics such as mean and median. Here is the problem: the value range of y is between 0 and 1, but

Re: [R] writing an R code for a given model

2010-10-01 Thread Shige Song
Hi Abderrahim, I find this book particularly helpful: http://www.meb.ki.se/~yudpaw/likelihood/likelihood-index.htm Shige On Fri, Oct 1, 2010 at 12:15 PM, abderrahim youssef wrote: > Dear R help list, > > I am desperately looking for any reference explaining by examples how to > write  R codes i

Re: [R] Linux Editor

2010-08-02 Thread Shige Song
X11 > interface, and I'll see if that works. > > On what platform would you want it to work, linux? > > Michael > > > On 3 Aug 2010, at 1:38AM, Shige Song [via R] wrote: > >> Michael, >> >> Does TexMacs works with the latest R? >&

Re: [R] Linux Editor

2010-08-02 Thread Shige Song
Michael, Does TexMacs works with the latest R? Shige On Tue, Aug 3, 2010 at 1:16 AM, Michael Lachmann wrote: > > [shameless plug] > I use TeXmacs with R. You can have R in a session. And you can even insert > graphs into your session. > > http://www.texmacs.org/tmweb/plugins/statistics.en.html#

[R] Random slope with npmlreg

2010-07-21 Thread Shige Song
Dear All, I am trying to estimate a mixed effect model with random slope with npmlreg. To make my question clear, I use the sample data set that was used in the vignettes (as part of the package "nlme"). -

[R] Data preparation for MCMCbinaryChange

2010-05-17 Thread Shige Song
Dear All, Since no one has answered my previous question, let me revise it a little and ask again. My data set contains about 10,000 women born in 60 months. The outcome variable is a binary variable indicating whether one has certain health problems. My hypothesis is that the 60 months in which

[R] Poisson change point model with offset

2010-05-17 Thread Shige Song
Dear All, I am trying to do a Bayesian change point analysis. My dependent variable is a proportion, so the natural choice will be a Poisson model with offset. Now the two options for change point model with R is MCMCpack and bcp, but neither seems to be able to handle such model, am I right? Are

[R] Where is the splines package

2010-05-02 Thread Shige Song
Dear All, I noticed that the "splines" package is no longer available on CRAN. Has it been replaced by something else? is it still available in some other locations? Thanks. Shige __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

[R] Question on StatET

2010-04-26 Thread Shige Song
Dear All, Does anyone know how to get StatET to do automatic word wrapping for Sweave document? I am new to StatET, so please pardon me if I missed something obvious. Many thanks. Best, Shige __ R-help@r-project.org mailing list https://stat.ethz.ch/ma

Re: [R] Getting Started with Bayesian MCMC

2010-04-13 Thread Shige Song
Hi Ben, Before you begin playing with BUGS/JAGS, there are several native R packages that deal with a wide variety of Bayesian models that worth considering. Among many others, I find MCMCpack, DPpackage, and MCMCglmm very useful (and convenient). Best, Shige On Tue, Apr 13, 2010 at 7:49 PM, Ben

Re: [R] MCMC results into LaTeX

2010-04-12 Thread Shige Song
Dear Dieter, That sounds like a good solution, thanks. Shige On Mon, Apr 12, 2010 at 2:27 AM, Dieter Menne wrote: > > > Shige Song wrote: >> >> >> What is the preferred way to get Bayesian analysis results (such as >> those from MCMCpacki, MCMCglmm

[R] MCMC results into LaTeX

2010-04-11 Thread Shige Song
Dear All, What is the preferred way to get Bayesian analysis results (such as those from MCMCpacki, MCMCglmm, and DPpackage) into LaTeX table automatically? I have been using the "apsrtable" package and similar functions in "memisc" package, but neither seems to handle MCMC output directly. Many t

Re: [R] False convergence of a glmer model

2010-02-16 Thread Shige Song
ta did not have any difficulties estimating this model, which makes feel that I might get some very basic specification wrong in my R model... Best, Shige On Tue, Feb 16, 2010 at 10:29 AM, Douglas Bates wrote: > On Tue, Feb 16, 2010 at 9:05 AM, Shige Song wrote: >> Dear All, >

[R] False convergence of a glmer model

2010-02-16 Thread Shige Song
Dear All, I am trying to fit a 2-level random intercept logistic regression on a data set of 20,000 cases. The model is specified as the following: m1 <- glmer(inftmort ~ as.factor(cohort) + (1|code), family=binomial, data=d) I got "Warning message: In mer_finalize(ans) : false convergence (8)

[R] False convergence of a glmer model

2010-02-16 Thread Shige Song
Dear All, I am trying to fit a 2-level random intercept logistic regression on a data set of 20,000 cases. The model is specified as the following: __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

Re: [R] Get rid of the first row of the LaTeX table generated by xtable

2010-02-14 Thread Shige Song
Dear Livlu and Uwe, This is exactly what I need, thanks. Shige On Sun, Feb 14, 2010 at 10:11 AM, Uwe Ligges wrote: > See ?print.xtable and its argument "include.rownames". > > Uwe Ligges > > On 14.02.2010 16:06, Shige Song wrote: >> >> Dear All, >> &g

[R] Get rid of the first row of the LaTeX table generated by xtable

2010-02-14 Thread Shige Song
Dear All, I am trying to generate a LaTeX table from a small data frame using xtable. I have three variable and 10 records. However, the resulted LaTeX table has four columns (instead of three), of which the first column seems to be an automatically generated ID. Is there a way to get rid of this

Re: [R] Anthropometric calculations with R

2009-10-28 Thread Shige Song
Dear David, This information is very helpful, thanks. Best, Shige On Wed, Oct 28, 2009 at 10:55 AM, David Winsemius wrote: > > On Oct 28, 2009, at 10:18 AM, David Winsemius wrote: > > You might want to take a look at this article by WEI, PERE, KOENKER, AND >> HE. Its in the research files of

[R] Disable summary statistics in LaTeX tables using MEMISC package

2009-07-26 Thread Shige Song
Dear All, The "mtable" function in "memisc" package is very useful in producing publication quality tables directly from estimated models. There are cases where only the estimated coefficients and standard errors are needed in the table but not the summary staitstics such as N, value of the likeli

Re: [R] Sweave, cacheSweave, and data frame

2009-07-26 Thread Shige Song
wrote: > Another thing you can do to save time is to use the --no-vignettes switch > when you build the package. > > On Sat, Jul 25, 2009 at 11:05 PM, Shige Song wrote: > > Dear All, > > > > I have been using Sweave (mainly via the Sweave.sh script) and really > like >

[R] Sweave, cacheSweave, and data frame

2009-07-25 Thread Shige Song
Dear All, I have been using Sweave (mainly via the Sweave.sh script) and really like it. I am working a paper (using Sweave, of course) which includes several time-consuming computations, and it gets tedious to re-compile the whoel thing every time I made changes. Then I discover the "cacheSweave"

Re: [R] Best 64-bit Linux distro for R?

2009-02-08 Thread Shige Song
I have been compiling R from source tar balls on Ubuntu for many years and like the way Ubuntu manges dependency. Best, Shige On Sun, Feb 8, 2009 at 3:09 PM, Dirk Eddelbuettel wrote: > > On 8 February 2009 at 17:27, Stavros Macrakis wrote: > | The R FAQ is very helpful about installing R on var

Re: [R] odfweave

2008-11-12 Thread Shige Song
You are probably using Windows and do not have a compatible unzip program on your path. Shige On Wed, Nov 12, 2008 at 8:01 AM, Irina Ursachi < [EMAIL PROTECTED]> wrote: > Dear all, > > I am trying to use the function odfWeave. Unfortunately I cannot get > beyond the folllowing error message: > "

Re: [R] Editor for Mac

2008-07-22 Thread Shige Song
Try Komodo Edit and SciviewsK. They work on Windows, Linux, and Mac. Shige On Wed, Jul 23, 2008 at 1:48 AM, Angelo Scozzarella < [EMAIL PROTECTED]> wrote: > Thanks for the answers, > but I'm looking for an editor like Tinn-R. > > Is there something like it for Mac? > > > Angelo Scozzarella > > _

Re: [R] Is there a good package for multiple imputation of missing values in R?

2008-06-30 Thread Shige Song
Robert, Try Amelia, which can be used with Zelig for post-imputation estimation. I find it a very helpful combination. Shige On Mon, Jun 30, 2008 at 3:02 PM, Robert A. LaBudde <[EMAIL PROTECTED]> wrote: > I'm looking for a package that has a start-of-the-art method of imputation > of missing va

Re: [R] Why R is 200 times slower than Matlab ?

2008-05-01 Thread Shige Song
So RA has to be installed in "c:\program files\R\RXXX"? I have R installed on another partition, but RA failed to locate it. Shige On Thu, May 1, 2008 at 9:47 PM, Zhandong Liu <[EMAIL PROTECTED]> wrote: > Great. Thanks a lot. > ZD > > On Wed, Apr 30, 2008 at 7:31 PM, Nelson Castillo <[EMAIL PROT

Re: [R] Why R is 200 times slower than Matlab ?

2008-05-01 Thread Shige Song
Will the use of jit improve performance of use contributed packages such as lme4? Thanks. Shige On Thu, May 1, 2008 at 7:31 AM, Nelson Castillo <[EMAIL PROTECTED]> wrote: > On Wed, Apr 30, 2008 at 6:27 PM, Gabor Grothendieck > <[EMAIL PROTECTED]> wrote: > > Aside from optiming your code by makin