[R] RSQLite: Tracking an error message to its source

2014-01-04 Thread Andrew Hoerner
Dear folks-- I am not sure if this should be framed as a question about RSQLite, about debugging, about SQLite, or about how to write a good question. I have a little function (copied below beneath the error messages along with my data), that is supposed to read a csv file and write it out to

Re: [R] APA two-way bar-chart

2014-01-04 Thread Jim Lemon
On 01/04/2014 03:08 AM, Benjamin Telkamp [via R] wrote: Dear R-users, I'm struggling with APA formatted two way BAR-charts according to apa-style i should have the legend in the background of my plot (so above the bars and not beside the picture/plot itself) and the background should be

Re: [R] p value of trends for odds ratios (or hazard ratios)

2014-01-04 Thread Uwe Ligges
On 04.01.2014 06:39, zhu yao wrote: Dear Sir Many papers calculated the p value of trends for odds ratios of ordered category variables. I have found the tabodds command in Stata. But how to do it in R? Depends on the method you want to use ... and most ladies and gents on this list won't

Re: [R] p value of trends for odds ratios (or hazard ratios)

2014-01-04 Thread peter dalgaard
On 04 Jan 2014, at 12:53 , Uwe Ligges lig...@statistik.tu-dortmund.de wrote: On 04.01.2014 06:39, zhu yao wrote: Dear Sir Many papers calculated the p value of trends for odds ratios of ordered category variables. I have found the tabodds command in Stata. But how to do it in R?

[R] zero-inflated negative binomial model with random effects

2014-01-04 Thread Santiago Guallar
Hi, I'd like to incorporate a random intercept in a zero-inflated negative binomial model. Package pscl is great but does not allow random effects, and package MCMCglmm doesn't support the negative binomial. I'm aware that package glmmADMB supported both random effects and the negative binomial

Re: [R] APA two-way bar-chart

2014-01-04 Thread Benjamin Telkamp
Hi Jim, thanks for your response, i really appreciate it, I'm attaching a picture of a two way bar chart made by excel (i hate excel and i want to be desperately able to do these things with R) hope you could give me some command lines that will help me, Thanks Again. Benjamin Telkamp On 4

Re: [R] R crashes with memory errors on a 256GB machine (and system shoes only 60GB usage)

2014-01-04 Thread Milan Bouchet-Valat
Le vendredi 03 janvier 2014 à 22:40 +0200, Xebar Saram a écrit : Hi again and thank you all for the answers i need to add that im a relatively R neewb so i apologize in advance i started R with the --vanilla option and ran gc() this is the output i get: gc() used (Mb) gc

Re: [R] zero-inflated negative binomial model with random effects

2014-01-04 Thread Ben Bolker
Santiago Guallar sguallar at yahoo.com writes: Hi, I'd like to incorporate a random intercept in a zero-inflated negative binomial model. Package pscl is great but does not allow random effects, and package MCMCglmm doesn't support the negative binomial. I'm aware that package glmmADMB

Re: [R] APA two-way bar-chart

2014-01-04 Thread Dr. Thomas W. MacFarland
Hi Benjamin: If the problem is legend location, then look at the legend help page and note the beginning statement: legend {graphics} R Documentation This function can be used to add legends to plots. Note that a call to the function locator(1) can be used in place of the x and y

Re: [R] CAPER pgls() anova not working with variable as factor

2014-01-04 Thread Ben Smit
Hi Bianca I have exactly the same problem! I see you posted this almost a year ago and didn't get any response Could you figure out what the problem was in the end? I am running a PGLS model with categorical factors. In one model the factor has two levels and the anova function works fine.

Re: [R] APA two-way bar-chart

2014-01-04 Thread Benjamin Telkamp
Hi Tom, How nice of you to take a look, i really want to understand this for once and for all. I have attached the SPSS data file and the picture i got. the code i used i have put below, can you see what i need to get the legend above the bars in the picture, (maybe my y-axis needs to be longer

Re: [R] p value of trends for odds ratios (or hazard ratios)

2014-01-04 Thread peter dalgaard
On 04 Jan 2014, at 13:56 , zhu yao mailzhu...@gmail.com wrote: Thanks for the suggestion. The results is presented in following table. The authors calculated p value for linearity and trend and they stated in the methods: Linear and nonlinear trends of BMI associated with each mortality

Re: [R] RSQLite: Tracking an error message to its source

2014-01-04 Thread Andrew Hoerner
Andrew Hoerner ahoerner at rprogress.org writes: Dear folks-- I am not sure if this should be framed as a question about RSQLite, about debugging, about SQLite, or about how to write a good question. I have a little function (copied below beneath the error messages along with my data),

Re: [R] RSQLite: Tracking an error message to its source

2014-01-04 Thread Ista Zahn
dbGetQuery doesn't like the . in your index name. Change to something else, e.g., command -paste(CREATE INDEX IF NOT EXISTS , DBname_c, _, indexName_c, ON , yourTable_c, (, paste(indexVars_C, collapse=, ), ), sep='') } Best, Ista On Sat, Jan 4, 2014

[R] change the reference level in plot(summary(cph-fit))

2014-01-04 Thread zhu yao
I have use the plot(summary(cph-fit)) to plot the hazard ratio plot. *Can I change the reference level in the plot, for example, use [1999, 2002) as the reference level?* *Thanks* *Yao Zhu* *Department of Urology Fudan University Shanghai Cancer CenterShanghai, China* [[alternative

Re: [R] change the reference level in plot(summary(cph-fit))

2014-01-04 Thread David Winsemius
On Jan 4, 2014, at 8:37 PM, zhu yao wrote: I have use the plot(summary(cph-fit)) to plot the hazard ratio plot. *Can I change the reference level in the plot, for example, use [1999, 2002) as the reference level?* I do not think we have enough information to be sure what you mean, but I

Re: [R] RSQLite: Tracking an error message to its source

2014-01-04 Thread Andrew Hoerner
Thanks, Ista! That did the job. Though I admit that it bothers me that, although the SQLite syntax documentation for CREATE INDEX, here: http://www.sqlite.org/lang_createindex.html does say the database name is optional, it also says that, if you include it, the period the period between the db

Re: [R] robust definition of \code{} for a knitr-produced document

2014-01-04 Thread Yihui Xie
Perhaps \code{} was redefined somewhere in your book project (the document class, certain packages, ...). Can you try to minimize your project and track down the problem? e.g. remove the body, keep the preamble, and use only one instance of \code{something} in the body. It is difficult to see what

Re: [R] RSQLite: Tracking an error message to its source

2014-01-04 Thread Jeff Newmiller
I recommend that you NOT try to go down that particular rabbit hole unless you are very confident in your computer science skills... database engines are very complicated. Learn to work with the error messages provided to you, and think in SQL when working with a SQL database.