[R] Trouble with tibbles

2018-06-14 Thread Kevin E. Thorpe
_1.5 [33] scales_0.5.0 rvest_0.3.2 assertthat_0.2.0 mnormt_1.5-5 [37] colorspace_1.3-2 stringi_1.2.3lazyeval_0.2.1 munsell_0.5.0 [41] broom_0.4.4 crayon_1.3.4 -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael

Re: [R] Trouble building R 3.5.0 under Ubuntu 18.04

2018-05-23 Thread Kevin E. Thorpe
home/steve/src/R/R-3.5.0/src/main' Makefile:135: recipe for target 'R' failed How does one set the -fPIC flag? I have never had trouble compiling under Mint, which is based on Ubuntu. Thanks! Steve -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHR

Re: [R] Converting a list to a data frame

2018-05-04 Thread Kevin E. Thorpe
;- do.call(rbind, lapply(names(x), function(z) ata.frame(type=z, x[[z]]))) #Error in ata.frame(type = z, dat[[z]]) : still cannot find function "ata.frame"? *William H. Poling, Ph.D.* *From:* R-help [mailto:r-help-boun...@r-project.org] *On Behalf Of *Huzefa Khalil *Sent:* Wednesday,

Re: [R] Converting a list to a data frame

2018-05-03 Thread Kevin E. Thorpe
4), B = data.frame(x = 5:6, y = 7:8) ) dplyr::bind_rows(l, .id = "type") #> type x y #> 1A 1 3 #> 2A 2 4 #> 3B 5 7 #> 4B 6 8 This also has the advantage of returning a data frame when the inputs are data frames. Hadley I _clearly_ need to

Re: [R] Converting a list to a data frame

2018-05-03 Thread Kevin E. Thorpe
p and David Carlson is beautifully elegant. Thanks again, Kevin -Original Message- From: R-help On Behalf Of David L Carlson Sent: Wednesday, May 2, 2018 3:51 PM To: William Dunlap ; Kevin E. Thorpe Cc: r-help mailing list Subject: Re: [R] Converting a list to a data frame Or add th

[R] Converting a list to a data frame

2018-05-02 Thread Kevin E. Thorpe
nd'ed together and the element name becomes a new variable. For example, I would like to turn the list above into a data frame that looks like this: data.frame(type=c("A","A","B","B"),x=c(1:2,5:6),y=c(3:4,7:8)) Appreciate any pointers. Kevin -- Kevi

[R] Package ddalpha is not building for me in R 3.5.0

2018-04-27 Thread Kevin E. Thorpe
LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.5.0 tools_3.5.0tcltk_3.5.0 -- Kevin E. Thorpe Head of Biostatistic

Re: [R] unable to move temporary installation of package

2018-03-28 Thread Kevin E. Thorpe
virus running). Thanks all for the advice! Paul -Original Message- From: Paul Lantos Sent: Tuesday, March 27, 2018 8:35 PM To: Kevin E. Thorpe ; Jeff Newmiller Cc: r-help@r-project.org Subject: RE: [R] unable to move temporary installation of package Thanks, Kevin. I have done that but no

Re: [R] unable to move temporary installation of package

2018-03-27 Thread Kevin E. Thorpe
mented, minimal, self-contained, reproducible code. --- Jeff Newmiller The ..... . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Li

[R] Unexpected behaviour in rms::lrtest

2018-02-14 Thread Kevin E. Thorpe
3.4.3 nnet_7.3-12 data.table_1.10.4-3 [28] foreign_0.8-69 multcomp_1.4-8 TH.data_1.0-8 [31] latticeExtra_0.6-28 magrittr_1.5codetools_0.2-15 [34] MASS_7.3-48 scales_0.5.0backports_1.1.2 [37] htmltools_0.3.6 splines_3.4.3 colorspace_1.3-2 [40] quantreg_5.34

Re: [R] Cox Regression : Spline Coefficient Interpretation?

2017-11-02 Thread Kevin E. Thorpe
pspline(OPTION), nonlin 1747.1295 3.05 <0.0002> Iterations: 8 outer, 19 Newton-Raphson> Theta= 0.991 > Degrees of freedom for terms= 4 > Likelihood ratio test=2136 on 4.05 df, p=0 n= 3390429 > * Thanks, KS -- Kevin E. Thorpe Head of Biostatistics, Appli

Re: [R] Converting SAS Code

2017-09-29 Thread Kevin E. Thorpe
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, self-contained, reproducible code. --- This email has been checked for viruses by AVG. http://www.avg.com -- Kevin E. Thorpe Head of Biostat

[R] Reversing table()

2017-03-17 Thread Kevin E. Thorpe
I am wondering if there is a way to undo the results of table(). For example if you had a table that looked like the result of table(x, y) or table(x, y, z) is there a simple/elegant way to reverse the process to get the "original" x, y and z vectors? Thanks, Kevin -- Kevin E. T

Re: [R] rms::latex.anova broken?

2017-02-09 Thread Kevin E. Thorpe
correctly. Kevin On 02/07/2017 02:23 PM, Kevin E. Thorpe wrote: I am re-running some logistic regression analyses using lrm from the rms package but latex(anova(...)) appears to be broken on my system. Here is some anova() output followed by the latex() error for two models since the error c

[R] rms::latex.anova broken?

2017-02-07 Thread Kevin E. Thorpe
s_1.0.5 htmltools_0.3.5 [34] splines_3.2.3 assertthat_0.1 colorspace_1.3-2 [37] quantreg_5.29 sandwich_2.3-4 stringi_1.1.2 [40] acepack_1.4.1 lazyeval_0.2.0 munsell_0.4.3 [43] zoo_1.7-14 -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li

[R] Converting a list to a data frame

2016-11-04 Thread Kevin E. Thorpe
2 3 8 2 8 3 3 Obviously, for 2 elements the simple rbind works but I would like a general solution for arbitrary length lists. Hopefully that is clear. Kevin -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael&#

[R] Error installing packages

2016-10-19 Thread Kevin E. Thorpe
CLC_TIME=English_Canada.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] Formula_1.2-1 survival_2.39-4 lattice_0.20-33 loaded via a namespace (and not attached): [1] Matrix_1.2-6 tools_3.3.1 gtabl

[R] Multistate survival models

2016-05-20 Thread Kevin E. Thorpe
v() object. It did not give an error and produced a result but I don't know if it did a competing risk analysis or not. Thanks. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Hospital Assistant Professo

Re: [R] factor variables in logistic regression

2016-05-11 Thread Kevin E. Thorpe
pts a factor outcome but if not, you would need to re-code it to 0/1. Kevin -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Hospital Assistant Professor, Dalla Lana School of Public Health University of Tor

Re: [R] R-help mailing list activity / R-not-help?

2016-01-25 Thread Kevin E. Thorpe
to create a new "R-not-help" list where, as in a Monty Python skit, people could be directed there to be insulted and all these unhelpful replies could be sent. A milder alternative is to encourage some R-help subscribers to click the "Don't send" or "Save"

Re: [R] package broom

2016-01-06 Thread Kevin E. Thorpe
mailing list -- To UNSUBSCRIBE and more, see 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, self-contained, reproducible code. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Re

Re: [R] Correct notation for functions, packages when using LaTex

2015-12-10 Thread Kevin E. Thorpe
Courier) so that's what I follow. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@utoronto.ca Tel: 416.864

Re: [R] Issues with loading csv file

2015-05-25 Thread Kevin E. Thorpe
the working directory to the directory (folder) where your CSV file is. There is a menu option for this. Kevin -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of

Re: [R] Randomly interleaving data frames while preserving order

2015-03-31 Thread Kevin E. Thorpe
On 03/31/2015 01:44 PM, Duncan Murdoch wrote: On 31/03/2015 1:05 PM, Kevin E. Thorpe wrote: Hello. I am trying to simulate recruitment in a randomized trial. Suppose I have three streams (strata) of patients represented by these data frames. df1 <- data.frame(strat=rep(1,10),id=1:10,pid=1

[R] Randomly interleaving data frames while preserving order

2015-03-31 Thread Kevin E. Thorpe
01 22 2 2 2002 I hope what I'm trying to accomplish makes sense. Maybe I'm missing something obvious, but I really have no idea at the moment how to achieve this elegantly. Since I need to simulate many trial recruitments it needs to be general and compact. I appreciate any ad

Re: [R] Use of R for Hypothesis Testing

2015-02-14 Thread Kevin E. Thorpe
t and ANOVA? -- Thank you Sike Li (Lydia) [[alternative HTML version deleted]] -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of Public Health University of Tor

Re: [R] the less-than-minus gotcha

2015-02-01 Thread Kevin E. Thorpe
ttp://tim-smith.us/arrgh/syntax.html Whitespace is meaningless, unless it isn't. Some parsing ambiguities are resolved by considering whitespace around operators. See and despair: x<-y (assignment) is parsed differently than x < -y (comparison)! -- Kevin E. Thorpe Head of Biostatistics, Ap

Re: [R] Injecting a column of characters to a matrix of numerics

2014-10-29 Thread Kevin E. Thorpe
"0.330147" "0.741404" "" rating "-0.077856" "0.014466" "5.381925" "0""" Use data frames instead. out<-data.frame(round(cbind(me,se,t,p),digits)); out<-cbind(out,disc) names(out)<-c("estima

Re: [R] R for Android

2014-05-08 Thread Kevin E. Thorpe
Thanks. I guess I could have searched for that. Apologies. I'll have to try it on my tablet. Kevin On 05/08/2014 11:57 AM, Jeremy Miles wrote: It exists: https://play.google.com/store/apps/details?id=com.appsopensource.R No graphics. Jeremy On 8 May 2014 05:44, Kevin E. T

[R] R for Android

2014-05-08 Thread Kevin E. Thorpe
uns on all commonly used platforms. If chromebooks and android devices get into greater use, it would be cool if R were available. Kevin -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Da

Re: [R] 'rms' package error

2014-04-03 Thread Kevin E. Thorpe
on to fit the parametric model. You can still obtain hazard ratio estimates from that model with a little bit of calculation (e.g. exp(-beta/scale)). -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistan

Re: [R] Syntax for order()

2014-03-25 Thread Kevin E. Thorpe
ives Error in order(val) : object 'val' not found dat1[order(dat1[,2]), ] # Works just fine. John Kane Kingston ON Canada I don't think the behaviour has changed. I bet dat1[order(dat1$val), ] works just fine. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Resear

Re: [R] A 'good' way to build a matrix from a sequence of integers?

2013-10-15 Thread Kevin E. Thorpe
lternative 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-guide.html and provide commented, minimal, self-contained, reproducib

Re: [R] Memory limit on Linux?

2013-08-13 Thread Kevin E. Thorpe
On 08/13/2013 03:06 PM, Stackpole, Chris wrote: From: Kevin E. Thorpe [mailto:kevin.tho...@utoronto.ca] Sent: Monday, August 12, 2013 11:00 AM Subject: Re: [R] Memory limit on Linux? What does "ulimit -a" report on both of these machines? Greetings, Sorry for the delay. Other fire

Re: [R] Memory limit on Linux?

2013-08-12 Thread Kevin E. Thorpe
with that. It could be a RHEL vs CentOS thing, but that seems very strange to me. 2) When I compile from source to test this, is there a specific option I should pass to ensure max usage? Thank you. Chris Stackpole What does "ulimit -a" report on both of these machines? -- Kevin E. Tho

Re: [R] help

2013-05-17 Thread Kevin E. Thorpe
nks What do you mean it doesn't run? Is there an error message? What is it? Also, you do not need to put RX in strata() in the survfit() function. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assist

Re: [R] Strange graphical pattern when using hist() function

2013-04-23 Thread Kevin E. Thorpe
ing. Take a look at the ?hist to understand how the bins are constructed. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.

Re: [R] t-statistic for independent samples

2013-04-17 Thread Kevin E. Thorpe
se to each other. Try your simulations again with variance ratios exceeding 2 and see what happens. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of Public Health Univer

Re: [R] update.packages(checkBuilt = TRUE) fails in updating rpanel_1.1-1 due to missing package BWidget

2013-03-26 Thread Kevin E. Thorpe
;], l, contriburl = contriburl, : Installed is tcl-8.6.0-r1 and tk-8.6.0 in a GENTOO environment. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of Public

Re: [R] Excuse me

2013-03-21 Thread Kevin E. Thorpe
row.names=false when we output csv data. But there exists that parameter in R help. Hoping for your reply! Best regards! B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B Li Nan -- Kevin E. Thorpe

Re: [R] How to get the t-stat for arima()?

2013-03-20 Thread Kevin E. Thorpe
On 03/20/2013 03:49 AM, Prof Brian Ripley wrote: If things are not readily available in R it is always good to pause and reflect if there might be a good reason. I nominate this as a fortune candidate. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka

Re: [R] On p-values presented in the summary of Linear Models

2013-02-07 Thread Kevin E. Thorpe
ve 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-guide.html and provide commented, minimal, self-contained, reproducible code. -- Kevin E. Thorpe Head of Biostatistics,

Re: [R] Relative Risk in logistic regression

2013-01-30 Thread Kevin E. Thorpe
On 01/30/2013 11:26 AM, John Sorkin wrote: If you use a log link, you are not, I believe, performing a logistic regression! I guess strictly speaking, that is true. I was being a little sloppy in terminology. "Kevin E. Thorpe" 1/30/2013 11:22 AM >>> On 01/30/2013 11

Re: [R] Relative Risk in logistic regression

2013-01-30 Thread Kevin E. Thorpe
always use that myself, but if you use the log link, you get RR. As for why you would, I would suggest it's because physicians think they understand a RR better than and OR. "Kevin E. Thorpe" 1/30/2013 11:14 AM >>> On 01/30/2013 09:02 AM, nalluri pratap wrote: > Rel

Re: [R] Relative Risk in logistic regression

2013-01-30 Thread Kevin E. Thorpe
imal, self-contained, reproducible code. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@utoronto.ca Tel: 41

Re: [R] how to suppress the intercept in an lm()-like formula method?

2013-01-29 Thread Kevin E. Thorpe
cept removed cc <- cancor.formula(cbind(SAT, PPVT, Raven) ~ n + s + ns + na + ss, data=Rohwer) ## Error in chol.default(Rxx) : ## the leading minor of order 1 is not positive definite #this works as is cc <- cancor.formula(cbind(SAT, PPVT, Raven) ~ -1 + n + s + ns + na + ss, data=Rohwer) cc

Re: [R] 1-KM and Cumulative incidence

2012-11-12 Thread Kevin E. Thorpe
rsk package for one approach. -- Kevin E. Thorpe Biostatistician/Trialist, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@utoronto.ca Tel: 416.86

Re: [R] linux

2012-05-23 Thread Kevin E. Thorpe
will usually need to run "make install" as root, unless you modify the installation location. One reason I do this is, that I figure if my system has the tools to compile R, I likely won't have concerns about installing packages that require some compilation as well. Kevin

Re: [R] Loading the stupid dataset--help!!!

2012-05-19 Thread Kevin E. Thorpe
ould not find function "sqlFetch" close(chan) I am sure there is a simple answer to this. Thanks. -- Kevin E. Thorpe Biostatistician/Trialist, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School

Re: [R] Finding the median

2012-03-12 Thread Kevin E. Thorpe
ing the median = element x in terms of n (say (n + 1)/2 or whatever it would be) if there is an even amount of elements, or x in terms of n (with a different way of saying how many n) if there is an odd amount of elements? Much appreciated -- Kevin E. Thorpe Biostatistician/Trialist, Applie

Re: [R] Multiple Correspondence Analysis

2012-03-09 Thread Kevin E. Thorpe
> > But the plot was overcrowded. Anyway, I must first complete the first > step, this was just to make some practice on it. > > As you can see, until now I didn't succeed. > > I hope someone will be so gentle to give it a try. Attached you are > the data-set > Thank y

Re: [R] R help

2012-01-18 Thread Kevin E. Thorpe
LEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Kevin E. Thorpe Biostatistician/Trialist, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant P

Re: [R] net classification improvement?

2012-01-17 Thread Kevin E. Thorpe
ems to like my data inputs just fine and relies on HMISC and ROCR, both packages I know well. Thanks jonah On 1/17/12 11:49 AM, "Kevin E. Thorpe" wrote: On 01/17/2012 07:16 AM, Essers, Jonah wrote: Thanks for the reply. I think more the issue is whether it can be applied to cross

Re: [R] net classification improvement?

2012-01-17 Thread Kevin E. Thorpe
ld be fine. On 1/16/12 10:23 PM, "Kevin E. Thorpe" wrote: On 01/16/2012 08:10 PM, Essers, Jonah wrote: Greetings, I have generated several ROC curves and would like to compare the AUCs. The data are cross sectional and the outcomes are binary. I am testing which of several models p

Re: [R] net classification improvement?

2012-01-16 Thread Kevin E. Thorpe
nction in Hmisc that does this will also work on binary data. Thanks Pencina MJ, D'Agostino RB Sr, D'Agostino RB Jr, Vasan RS. Evaluating the added predictive ability of a new marker: from area under the ROC curve to reclassification and beyond. Stat Med 2008;27:157-172 -- Kevin

Re: [R] mgcv 1.7-12 crashes R

2011-12-16 Thread Kevin E. Thorpe
ther attached packages: [1] mgcv_1.7-11 loaded via a namespace (and not attached): [1] Matrix_1.0-2 grid_2.14.0lattice_0.20-0 nlme_3.1-102 -- Kevin E. Thorpe Biostatistician/Trialist, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Ass

Re: [R] Weird Excel Time Format

2011-11-29 Thread Kevin E. Thorpe
dates in excel, especially when multiple computers are involved. When someone has data in excel, I now require them to make the csv file on their system and manually verify the dates but opening the file in notepad. -- Kevin E. Thorpe Biostatistician/Trialist, Applied Health Research Centre

Re: [R] avoiding the sample in built function

2011-11-23 Thread Kevin E. Thorpe
I cannot find the solution to this problem. Can someone give me a hint? Thanks very much! Bye, sarah The only reason I can think of you wanting to avoid sample() is because this is homework and the list is not for homework. If I have misjudged the intent of your post, please forgive me.

Re: [R] oversampling code

2011-11-01 Thread Kevin E. Thorpe
://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, self-contained, reproducible code. -- Kevin E. Thorpe Biostatistician/Trialist, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge

Re: [R] SPlus to R

2011-10-05 Thread Kevin E. Thorpe
So, when you say you get no output when you 'run' the code, what exactly do you mean by 'run' the code? What I would do is: 1. Put the code in a file called 'whatever.R'. 2. Start R, and do source("whatever.R"). That defines the functions. do "ls()"

Re: [R] Meta-analysis of test statistics in "metafor" package?

2011-10-03 Thread Kevin E. Thorpe
statistics. Best, David I believe the MAd package may have what you are looking for. It can call metafor for you. Kevin -- Kevin E. Thorpe Biostatistician/Trialist, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana Sc

Re: [R] X11 problem

2011-08-25 Thread Kevin E. Thorpe
On 08/25/2011 08:49 AM, carol white wrote: Thanks for your reply. I used the following commands: sudo apt-get update sudo apt-get install r-base Is that how you installed R-2-10 or how you tried to install 2.13.1? - Original Message - From: Kevin E. Thorpe To: carol white Cc: &quo

Re: [R] X11 problem

2011-08-25 Thread Kevin E. Thorpe
d not require the headers. I don't use Ubuntu, so I don't know what the name of packages you need for the headers. Typically the packages have the devel versions separate, you you need those. -- Kevin E. Thorpe Biostatistician/Trialist, Applied Health Research Centre (AHRC) Li Ka

Re: [R] assign using =

2011-06-27 Thread Kevin E. Thorpe
example or explanation, why getting used to "=" is not a good idea? Or is it? Thanks ahead, Berry As a top-level expression, it probably doesn't matter too much. I always use <- myself. Here is an example where = does not equal <- print(fit <- lm(...)) is very di

Re: [R] Merge matrix

2011-04-12 Thread Kevin E. Thorpe
t 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, self-contained, reproducible code. -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of

Re: [R] Sweave with pdf(): how to remove mention "null device"

2011-01-27 Thread Kevin E. Thorpe
v.off() > >> > >> How can one get rid of this? The only workaround I found is to place > >> it into a if() loop: > >> > >> for(i in 1:1){ > >> pdf() > >> plot(runif()) > >> dev.off() > >> } > >> > >> so

Re: [R] (OT) Change of email address

2010-09-29 Thread Kevin E. Thorpe
. -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@utoronto.ca Tel: 416.864.5776 Fax: 416.864.3016 __ R-help@r-project.org mailing

Re: [R] reshape is re-ordering my variables

2010-09-22 Thread Kevin E. Thorpe
it","FTy","FTm","PTy","PTm"), direction = 'long') So, thanks again for pointing me in the right direction here. Kevin The list contains the subgroups of the variables you want combined and v.names, as you appear to know, provide

[R] reshape is re-ordering my variables

2010-09-21 Thread Kevin E. Thorpe
other values are shifted left. The attributes in the result are correct, but the contents of rcl$PTm are what I expected in rcl$init. > sessionInfo() R version 2.11.1 Patched (2010-07-21 r52598) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_US LC_NUMERIC=C LC_TIME=en_US

Re: [R] survfit question

2010-09-09 Thread Kevin E. Thorpe
urv.all) plot(surv.all) I would really appreciate any assistance. Thank you. Regards, Andre -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@utoronto.ca Tel: 416.

Re: [R] ESS question. How to get rid of ess-smart-underscore?

2010-08-09 Thread Kevin E. Thorpe
W Eryk Wolski wrote: Hi, ESS replaces "_" by "<-". How can I switch off this feature? I need to be able to type the underscore Thanks Eryk Pressing the underscore a second time gives you the underscore. -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Transl

Re: [R] Help installation lme4a,

2010-08-05 Thread Kevin E. Thorpe
t least I had to. Kevin -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@utoronto.ca Tel: 416.864.5776 Fax: 416.864.3016 _

Re: [R] Sweave: The opposite of tangle

2010-06-25 Thread Kevin E. Thorpe
Kevin E. Thorpe wrote: stefan.d...@gmail.com wrote: Hi, I am using Sweave to write an article. If I want to convert the *.rnw to a *.tex file I have to run Sweave which might take a long time. Is there away to get a tex-file as result without (evaluating) the R-chunks, i.e. the opposite of

Re: [R] Sweave: The opposite of tangle

2010-06-25 Thread Kevin E. Thorpe
-chunk). Thanks, Stefan This is untested, but does Sweave("file.rnw", eval=FASLE) do what you want? -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@utoron

Re: [R] Latex and r

2010-06-16 Thread Kevin E. Thorpe
command not found I believe there is something in the latex help page in the rms package that talks about preview difficulties on MAC. -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto e

Re: [R] ICD9 codes

2010-05-29 Thread Kevin E. Thorpe
mplement it yourself and share the result, as your question is an important one. Also, please be sure to state your affiliation on your notes. Frank On 05/28/2010 02:19 PM, Vishwanath Sindagi wrote: Hello: I am working on getting some statistics related to clinical trials and stuff. I have

Re: [R] R eat my data

2010-05-25 Thread Kevin E. Thorpe
mented 3 line 2 4 line 3 5 #nother comment 6 line 4 just a guess. hard to tell without the file... Barry -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto em

[R] BRugs under Linux?

2010-05-17 Thread Kevin E. Thorpe
s and have that installed also, but until I become a bit more familiar with this software I'm starting from BUGS. Kevin -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho

Re: [R] sample size for survival curves

2010-05-06 Thread Kevin E. Thorpe
average length of follow-up time anticipated in the study. Kevin -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@utoronto.ca Tel: 416.864.5776 Fax: 416.864.3016

Re: [R] 1 - Survival Plot

2010-03-25 Thread Kevin E. Thorpe
TC", "TT"), lty = c(3, 2, 1), title "LAT4H") Thanks! In the help file for plot.survfit you can read about the fun argument. fun="event" does what you want. -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dal

Re: [R] R on Linux - a primer

2010-03-16 Thread Kevin E. Thorpe
ive. It's a good way to get a feeling for a particular distribution without installing anything. -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@utoronto.ca T

Re: [R] Help on getting help from manuals

2010-03-12 Thread Kevin E. Thorpe
it appears (hence my terse reply the other day). Also, at the bottom of every r-help email is a link to the "Posting Guide." Following the instructions there, for example, creating a toy example that illustrates your problem is often very useful in helping you solve the problem wit

Re: [R] Deltas or changes

2010-03-10 Thread Kevin E. Thorpe
March 2010 20:19, Kevin E. Thorpe [via R] < ml-node+1587986-1699461774-180...@n4.nabble.com wrote: ManInMoon wrote: Hi, I am new to R. What does a negative amount in an index do? i.e. x[-lenght[x]] Why don't you try it and see for yourself? -- Kevin E

Re: [R] Deltas or changes

2010-03-10 Thread Kevin E. Thorpe
ManInMoon wrote: Hi, I am new to R. What does a negative amount in an index do? i.e. x[-lenght[x]] Why don't you try it and see for yourself? -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health Universi

Re: [R] how to make R plot under Linux

2010-02-22 Thread Kevin E. Thorpe
hould be an "enable X11 forwarding" (or something similar) option in your ssh client application. You should look e.g. in "connection settings". Kind regards, Kimmo Agree. Sounds like you are using a client on Windows. Also, Vojtech Zeisek's reply is perti

Re: [R] how to make R plot under Linux

2010-02-22 Thread Kevin E. Thorpe
X11cairo In addition: Warning message: In function (display = "", width, height, pointsize, gamma, bg, : unable to open connection to X11 display '' Would you give some clues what is going on? thanks Did you start ssh with the -X switch? -- Kevin E. Thorpe Biostatistician

Re: [R] Fonts in X11(type="Xlib"): Was: What font exactly is tkrplot looking for

2010-02-04 Thread Kevin E. Thorpe
Kevin E. Thorpe wrote: Hello. I am getting an error thrown from tkrplot. It is X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 12 could not be loaded > sessionInfo() R version 2.10.1 Patched (2009-12-29 r50852) i686-pc-linux-gnu locale: [1] LC_CTYPE=en

[R] What font exactly is tkrplot looking for

2010-02-03 Thread Kevin E. Thorpe
or the 100dpi version? I'm pretty sure I have the necessary fonts. I just may need to tell X where they are, so I'm wondering exactly which font(s) are being requested. Thanks. -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana

Re: [R] An R vs. SAS Discrepancy: How do I determine which is correct?

2009-12-01 Thread Kevin E. Thorpe
. Kevin E. Thorpe wrote: I was messing around with some data in R and SAS (the reason is unimportant) fitting a multiple linear regression and got a curious discrepancy. The data set is too big to post, but if someone wants it, I can send it. So, here are the (partial) results: From R

[R] An R vs. SAS Discrepancy: How do I determine which is correct?

2009-12-01 Thread Kevin E. Thorpe
3.6-0 lattice_0.17-25 loaded via a namespace (and not attached): [1] cluster_1.12.0 grid_2.8.0 -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@utoronto.c

Re: [R] From R to LaTeX to pdf?

2009-11-24 Thread Kevin E. Thorpe
ode above needs to be inside a \begin{document} ... \end{document} pair. Then, the pdflatex (I beilieve this exists in MiKTeX) command builds a pdf file. Kevin Best regards, Joel -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana

Re: [R] Collapse factor levels

2009-11-01 Thread Kevin E. Thorpe
Peter Dalgaard wrote: Kevin E. Thorpe wrote: I'm sure this is simple enough, but an R site search on my subject terms did suggest a solution. I have a numeric vector with many values that I wish to create a factor from having only a few levels. Here is a toy example. > x <

[R] Collapse factor levels

2009-11-01 Thread Kevin E. Thorpe
els. The results I would like to see from printing the value and summary(x) are: > x [1] A A A B B B C C C C Levels: A B C > summary(x) A B C 3 3 4 Hopefully this makes sense. Thanks, Kevin -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professo

Re: [R] Simple question, I think

2009-10-22 Thread Kevin E. Thorpe
line I am using, or do I need to have an additional line sciach$dummyba[sciach$ba==1] <- 1 Thanks in advance. David Try sciach$dummyba <- ifelse(sciach$ba==0,2,1) -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of

Re: [R] Help me...!!!

2009-05-26 Thread Kevin E. Thorpe
;mean", "Var" and "length" togheter? 3.)Find the minimum of this function: f(x)=(x-3)^4 with the Newton method. 4.) Define a function that is able to calculate the geometric mean of a seriation: Sorry for all these quest

Re: [R] Call R from Perl

2009-05-06 Thread Kevin E. Thorpe
Daniel Fernandez wrote: I'm not sure but my guess is that part isn't working... is that the way to call R from perl? It's the way I would call R in batch from the command line. In your call you are missing the CMD part. Sent from my iPhone On May 6, 2009, at 8:09 AM, &

Re: [R] Call R from Perl

2009-05-06 Thread Kevin E. Thorpe
BATCH regressExpr.spl temp` work? -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@utoronto.ca Tel: 416.864.5776 Fax: 416.864.6057

Re: [R] Difference between gam() and loess().

2009-03-20 Thread Kevin E. Thorpe
Kevin E. Thorpe wrote: Ravi Varadhan wrote: Good try, Kevin. But that doesn't seem to do it. set.seed(123) x <- sort(runif(100)) y <- sin(4*pi*x) + rnorm(100, sd=0.2) ans.lo2 <- loess(y ~ x, degree=2, span=0.75) ans.gam2 <- gam(y ~ lo(x, degree=2, span=0.75)) summa

Re: [R] Difference between gam() and loess().

2009-03-20 Thread Kevin E. Thorpe
an iterations argument which is related to the robustness of the estimates. I would think that could also account for tail departures especially. I don't gave the gam package installed, so can't test these myself at the moment. - Original Message - From: "Kevin E. Thorp

Re: [R] Difference between gam() and loess().

2009-03-19 Thread Kevin E. Thorpe
,span=0.75,degree=2)) and see if that helps. Kevin -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@utoronto.ca Tel: 416.864.5776 Fax: 416.864.6057

  1   2   >