Re: [R] Nonlinear Regression Parameter Shared Across Multiple DataSets

2010-10-15 Thread Keith Jewell
, Jared Blashka evilamaran...@gmail.comwrote: Thanks so much! It works great. I had thought the way to do it relied on combining the data sets, but I couldn't figure out how to alter the formula to work with the combination. Jared On Tue, Oct 12, 2010 at 7:07 AM, Keith Jewell k.jew

Re: [R] Changing sign on absolute numbers 0 problems

2010-10-21 Thread Keith Jewell
Sadz A sadz_a1...@yahoo.co.uk wrote in message news:419230.77523...@web24610.mail.ird.yahoo.com... Hi, I am trying to do some calculations turning DMS data to decimal degrees using the formula (D+(M/60)+(S/3600)), some of the D's involve -ve numbers, the easiest way to do the calculation

Re: [R] Changing sign on absolute numbers 0 problems

2010-10-21 Thread Keith Jewell
In case it helps... test - c(-0:00:53, -0:01:10., -0:01:26., -0:01:38., -0:01:43, + -0:01:59., -0:03:50., -0:04:46, -0:05:01., -0:05:16., + 3:41:33.0, 3:43:09.4, 3:44:26.3, 3:47:26.0, 3:48:19.3, + 3:52:13.4, 3:57:10.2, 4:29:37.6, 5:01:28.4, 5:08:45.6 ) require(sp)

Re: [R] Is there a way to have 'comment' keep a list?

2010-11-09 Thread Keith Jewell
I hadn't seen 'comment' before, so don't take my suggestion as authoritative. It looks useful, so I investigated a bit. This technique seems to work and is (perhaps?) easier than names: tlist - list(a=c(1:3), b=7) comment(x) - unlist(sapply(tlist, as.character)) or in one line

Re: [R] Installing R and an editor on a USB drive

2010-11-10 Thread Keith Jewell
As I recall (my memory may be faulty), Tinn-R installation required admin privileges, but running does not and the installation does not include the specific file path in any files. To make Tinn-R available on a machine where I do not have admin privileges I have a) installed onto a machine

Re: [R] How to get a specific named element in a nested list

2010-11-11 Thread Keith Jewell
Neat! I think replacing out - rmatch(el, name) with out - Recall(el, name) will avoid the dependence of the code on the function name Keith J Michael Bedward michael.bedw...@gmail.com wrote in message news:aanlktikv9zepxipbp7ftr8vmpgsjaptjyj_dudy-m...@mail.gmail.com... On 11 November

[R] nls with some coefficients fixed

2010-07-19 Thread Keith Jewell
I'm using nls to fit a variety of different models. Here I use SSgompertz as an example. I want the ability to fix one (or more) of the coefficients that would normally be optimised (e.g. fix b3=0.8). Examples; based on and using data from example(SSgompertz) #- # vanilla

Re: [R] nls with some coefficients fixed

2010-07-20 Thread Keith Jewell
nas...@uottawa.ca wrote in message news:33466.129.6.253.2.1279634282.squir...@webmail02.uottawa.ca... For nls, the fixing (or masking) of parameters is not, to my knowledge, possible. This is something I've been trying to get in such routines for over 2 decades. Masks are available, but not

Re: [R] nls with some coefficients fixed

2010-07-21 Thread Keith Jewell
Gabor Grothendieck ggrothendi...@gmail.com wrote in message news:aanlktilszaicycu3lz2f5d_bxq1g8m8f7jsjsbj2l...@mail.gmail.com... On Tue, Jul 20, 2010 at 9:58 AM, nas...@uottawa.ca wrote: For nls, the fixing (or masking) of parameters is not, to my knowledge, possible. This is something

Re: [R] nls with some coefficients fixed

2010-07-21 Thread Keith Jewell
Gabor Grothendieck ggrothendi...@gmail.com wrote in message news:aanlktilszaicycu3lz2f5d_bxq1g8m8f7jsjsbj2l...@mail.gmail.com... On Tue, Jul 20, 2010 at 9:58 AM, nas...@uottawa.ca wrote: For nls, the fixing (or masking) of parameters is not, to my knowledge, possible. This is something

Re: [R] Where the data file is stored?

2010-08-12 Thread Keith Jewell
You're not seeing the .Rdata file containing the data objects. Try: list.files(getwd(),full.name=TRUE, all.files=TRUE) Stephen Liu sati...@yahoo.com wrote in message news:961426.85478...@web113203.mail.gq1.yahoo.com... - Original Message From: Alain Guillet alain.guil...@uclouvain.be

Re: [R] Calculating with tolerances (error propagation)

2010-09-09 Thread Keith Jewell
Jan private jrheinlaen...@gmx.de wrote in message news:1284029454.2740.361.ca...@localhost.localdomain... Hello Bernardo, - If I understood your problem this script solve your problem: q-0.15 + c(-.1,0,.1) h-10 + c(-.1,0,.1) 5*q*h [1] 2.475 7.500 12.625 - OK, this

Re: [R] How to generate a particular sequence ?

2010-09-13 Thread Keith Jewell
Ted Harding ted.hard...@manchester.ac.uk wrote in message news:xfmail.100913104250.ted.hard...@manchester.ac.uk... On 13-Sep-10 09:19:21, Feng Li wrote: Dear R, I have a vector, say a = c(1,2,4,5,6,8). Can I generate a vector or array (2-by-3-by-3) of this form

Re: [R] efficient list indexing

2010-09-22 Thread Keith Jewell
Also, it may be that you want bigfred to be a list of 5 lists each of 2 elements (happy and name) rather than a list of 10 elements. Thus (also using double bracketing) fred- list(happy = 1:10, name = squash) bigfred - replicate(5, fred, FALSE) bigfred[[2]][[2]] hth Keith J Patrick Burns

Re: [R] boundary check

2010-09-24 Thread Keith Jewell
\tab inside hull\cr 0 \tab on hull (to precision indicated by tol) }} \references{ \url{http://www.mathworks.com/matlabcentral/fileexchange/10226-inhull} } \author{ Keith Jewell 2009 } \note{ submitted for inclusion in geometry package~ } %% ~Make other sections like Warning with \section{Warning

Re: [R] Nonlinear Regression Parameter Shared Across Multiple Data Sets

2010-10-12 Thread Keith Jewell
Jared Blashka evilamaran...@gmail.com wrote in message news:aanlktinffmudugqnkudvr=fmf0wrrtsbjxjexuki_...@mail.gmail.com... I'm working with 3 different data sets and applying this non-linear regression formula to each of them. nls(Y ~ (upper)/(1+10^(X-LOGEC50)), data=std_no_outliers,

[R] Problem with NLSstClosestX; and suggested fix

2009-10-14 Thread Keith Jewell
} --- Comments/corrections welcome. Keith Jewell = sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252

[R] multidimensional point.in.polygon??

2009-12-04 Thread Keith Jewell
thought convhulln must need to do that often! Thanks in advance for any pointers, Keith Jewell __ 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

Re: [R] multidimensional point.in.polygon??

2009-12-10 Thread Keith Jewell
in the dark :-( Any hints? Thanks in advance, Keith Jewell - baptiste auguie baptiste.aug...@googlemail.com wrote in message news:de4e29f50912040550m71fbffafnfa1ed6e0f4451...@mail.gmail.com... Hi, Yet another one of my very naive ideas

[R] mutlidimensional in.convex.hull (was multidimensional point.in.polygon??)

2009-12-10 Thread Keith Jewell
speak Matlab, but this looks non-trivial to code in R. I'll do it if I have to, but if it already exists it would be nice. If I do have to code it, I'd really appreciate an expression in algebra rather than Matlab! Any pointers will be much appreciated, Keith Jewell Duncan Murdoch murd

Re: [R] mutlidimensional in.convex.hull (was multidimensionalpoint.in.polygon??)

2009-12-11 Thread Keith Jewell
and code the Matlab algorithm, but this is a small part of a much bigger task, on which I must progress. So I'll thank Baptiste, Duncan and Charles for their invaluable help and move on. Best regards, Keith Jewell __ R-help@r-project.org mailing list https

Re: [R] mutlidimensional in.convex.hull (wasmultidimensionalpoint.in.polygon??)

2009-12-18 Thread Keith Jewell
! Keith Jewell inhull - function(testpts, calpts, hull=convhulln(calpts), tol=mean(mean(abs(calpts)))*sqrt(.Machine$double.eps)) { # # R implementation of the Matlab code by John D'Errico 04 Mar 2006 (Updated 30 Oct 2006) # downloaded from http://www.mathworks.com

Re: [R] mutlidimensional in.convex.hull(wasmultidimensionalpoint.in.polygon??)

2009-12-18 Thread Keith Jewell
Syntax suggestions implemented. Inhull's original author consulted. Function submitted for potential inclusion in geometry package. Seasons greetings to all. Keith Jewell - baptiste auguie baptiste.aug...@googlemail.com wrote in message

[R] Problem with expand.grid

2009-12-22 Thread Keith Jewell
for backwards compatibility. but I don't think that's relevant, I have no factors. I'm probably being silly. Can anyone point out where? Best... Keith Jewell --please do not edit the information below-- Version: platform = i386-pc-mingw32 arch = i386 os = mingw32 system = i386

Re: [R] Problem with expand.grid

2009-12-22 Thread Keith Jewell
rows, data has 10 Keith Jewell k.jew...@campden.co.uk wrote in message news:hgqqja$rk...@ger.gmane.org... Hi All, This example code dDF - structure(list(y = c(4.75587, 4.8451, 5.04139, 4.85733, 5.20412, 5.92428, 5.69897, 4.78958, 4, 4), t = c(0, 48, 144, 192, 240, 312, 360, 0

Re: [R] Problem with expand.grid

2009-12-22 Thread Keith Jewell
bangs head on desk Thanks, Prof Ripley (and everyone else who's responding while I type this!). I thought I was being stupid. What I wanted was: expand.grid(lapply(dDF, unique)) which works fine! hangs head in shame Seasonal greetings to all, Keith Jewell Prof Brian Ripley rip

Re: [R] find the corresponding mean y

2010-01-12 Thread Keith Jewell
Not very clear what you want, but perhaps... ?sortedXyData ...might help. hth KJ luciferyan anniehyh...@googlemail.com wrote in message news:1263231740556-1011427.p...@n4.nabble.com... Hello, I have 49 paired data, x, y. I have sampled x (where replacement is true), and find its mean. How

[R] Capturing buffered output from Rterm

2010-06-10 Thread Keith Jewell
an error nls() - I surmise this is due to output buffering (?). In an S-Plus version I turned off buffering with guiSetOption(option.name=BufferOutputWindows, value.string=F) but I don't think this is available in R (?). Has anyone any suggestions? Thanks in advance, Keith

Re: [R] Capturing errors [not buffered output] from Rterm

2010-06-10 Thread Keith Jewell
me kindly! Prof Brian Ripley rip...@stats.ox.ac.uk wrote in message news:alpine.lfd.2.00.1006101333520.25...@gannet.stats.ox.ac.uk... On Thu, 10 Jun 2010, Keith Jewell wrote: In MS Windows I a) invoke Rterm from a batch file (test.bat) b) to execute commands from a script (m:\test.rsc) c

Re: [R] Using if statement on function

2010-06-28 Thread Keith Jewell
You could also consider isTRUE(all.equal(FUN, mean)) isTRUE(all.equal(mean, mean)) [1] TRUE isTRUE(all.equal(mean, median)) [1] FALSE HTH Keith J Patrick Burns pbu...@pburns.seanet.com wrote in message news:4c28777f.1040...@pburns.seanet.com... If I understand the problem properly,

[R] update.packages on MS Windows with //server/share paths

2010-01-26 Thread Keith Jewell
see the problem in V2.9.2 . I do see the problem in V2.10.1, V2.10.1 Patched (2010-01-24 r51030) V2.11.0 Under development (unstable) (2010-01-24 r51030) Grateful for any suggestions, Keith Jewell - Version: platform = i386-pc-mingw32

Re: [R] update.packages on MS Windows with //server/share paths

2010-01-26 Thread Keith Jewell
] //Server02/stats/R/library/2.10 ... is controlled by R (in this example the former fails with ...not found, the latter opens the folder in Windows Explorer). Best regards, Keith Jewell - Gabor Grothendieck ggrothendi...@gmail.com wrote in message news

[R] locfit: max number of predictors?

2010-02-25 Thread Keith Jewell
. Can anyone confirm or deny the existence of a 'crisp' upper limit on the number of predictors in locfit? If it is 5, or thereabouts, can anyone suggest an alternative which can handle a few more? (I'm using it for multidimensional interpolation). Best regards, Keith Jewell

Re: [R] Find multiple elements in a vector

2009-07-23 Thread Keith Jewell
Try which(x %in% y) HTH KJ Philip Twumasi-Ankrah nana_kwadwo_der...@yahoo.com wrote in message news:519822.56196...@web39502.mail.mud.yahoo.com... This should work which((x==2)|(x==3)) --Quotable Quotes- A Smile costs Nothing But Rewards Everything - Anonymous

Re: [R] What does .[foo] really mean?

2009-08-03 Thread Keith Jewell
It's a place holder. See http://en.wikipedia.org/wiki/Foo HTH KJ Simon Tian simon...@gmail.com wrote in message news:2119d1440908012150j373bfaf5v9d498bded94f...@mail.gmail.com... Hi R users, I really want to know what exactly .[foo] means. Thanks in advance. -Simon [[alternative HTML

Re: [R] Unexpected nls behaviour: Solved

2008-08-04 Thread Keith Jewell
) names(Lval) - mCall[Coeffs] Lval } , parameters = c(Coeffs) ) Sorry for wasting anyones time. Keith Jewell - Keith Jewell [EMAIL PROTECTED] wrote in message news:... Hi everyone, I thought that for a selfStart function, these two should be exactly

[R] Fix for nls bug???

2008-08-05 Thread Keith Jewell
in advance, Keith Jewell --- sessionInfo() R version 2.7.0 (2008-04-22) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 attached base

Re: [R] Opening R from Tinn without setting directory each time

2008-08-06 Thread Keith Jewell
time I start Tinn-R (but it's still worth it!). Hope that helps someone Keith Jewell bartjoosen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you first install a newer version of R and aftwards remove a previous version, Tinn-R gives this behaviour. Doesn't matter if you activate

Re: [R] Fix for nls bug??? [already fixed in R-patched]

2008-08-08 Thread Keith Jewell
Dear Prof. Ripley, Thanks for that. Just to wrap up the thread, I confirm that my problem is fully fixed in R-patched. Best regards, Keith Jewell --- Prof Brian Ripley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Fri, 8 Aug 2008, Keith Jewell wrote: Dear Prof

[R] nested getInitial calls; variable scoping problems

2008-08-18 Thread Keith Jewell
eval(... parent.frame()) will find the argument? Or, at least I could attach the argument to the dataframe as a parameter. But this all seems a but clumsy, and I feel there must be a better way. Any comments and/or advice will be welcome. Thanks in advance; Keith Jewell

Re: [R] Upgrade 'R'

2008-09-02 Thread Keith Jewell
. Keith Jewell --- Leon Yee [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, Kevin You can get some hints by browsing in this mailist with the subject of Upgrading R means I lose my packages, which were posted several days ago. HTH

Re: [R] Upgrade 'R'

2008-09-02 Thread Keith Jewell
Prof Brian Ripley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, 2 Sep 2008, Keith Jewell wrote: As possible help to others, and also as a request for comments on how I might do things better, I describe how I've recently altered my system to handle this. I'm

Re: [R] Bug in is ?

2008-09-24 Thread Keith Jewell
7 is an integer, but it's also a real. In R '?is' and '?is.integer' are clear that you're testing the class(es) of objects, not their values. I can't comment on the relationship with S Programming hth Keith J [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] This is really

Re: [R] Bug in is ?

2008-09-24 Thread Keith Jewell
) to tell R that 7 is an integer. Thanks again Chunhao Quoting Martin Maechler [EMAIL PROTECTED]: KJ == Keith Jewell [EMAIL PROTECTED] on Wed, 24 Sep 2008 09:46:08 +0100 writes: KJ 7 is an integer, but it's also a real. KJ In R '?is' and '?is.integer' are clear that you're

[R] The 'data' argument and scoping in nls

2008-09-26 Thread Keith Jewell
) rather than a list. I'm getting into waters which are a bit too deep for me. Can anyone point me in the right direction? Thanks in advance, Keith Jewell __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] recursively divide a value to get a sequence

2008-07-09 Thread Keith Jewell
a.start - 15000 a.step - 5 a.length - 9 c(a.start*a.step^-(0:(a.length-2)),0) Anne-Marie Ternes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, if given the value of, say, 15000, I would like to be able to divide that value recursively by, say, 5, and to get a vector of a

Re: [R] Start preferred RGui

2008-07-11 Thread Keith Jewell
the RGui path each time I start Tinn-R. I anyone else has any suggestions, I'd appreciate them! Regards, Keith Jewell marciarr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dear R users, I have been having a problem since I installed the new versions of TinnR and R on my computer

Re: [R] Start preferred RGui

2008-07-11 Thread Keith Jewell
Hi All, This didn't work for me :-( [Tinn-R 1.19.5.7, R 2.7.0, Windows Server 2003, Standard x64 Edition] When I edited Tinn.ini to have the right path it worked the first time I startedd Tinn-R, but when I closed Tinn-R it replaced Tinn.ini with a new file without my edits, so the next start

[R] Unexpected nls behaviour

2008-08-01 Thread Keith Jewell
of nls in R (I hesitate to use the b*g word). Thanks in advance, Keith Jewell -- I don't think it's relevant but, for completeness: sessionInfo() version 2.7.0 (2008-04-22) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United

Re: [R] Wilcoxon nonparametric p-values

2009-05-19 Thread Keith Jewell
I just tried it in Minitab and got -- Test of median = 8.500 versus median not = 8.500 N for Wilcoxon Estimated N Test Statistic P Median C1 20 19 80.5 0.573 8.460 - One tailed gave me closer to the textbook, but still

Re: [R] Merging

2009-03-17 Thread Keith Jewell
Is this what you want it to do? (aDF is the original data frame) aDF V1V2 V3 V4 1 2006-02-22 16:28:18 useractivity_act 8 0 2 2006-02-22 16:28:26 4 2 0 3 2006-02-22 16:28:28 3 3 0 4 2006-02-22 16:28:31

Re: [R] Merging

2009-03-17 Thread Keith Jewell
understand what you exactly want to do, but it seemed at least to me that Keith's suggestion (see again below) pretty much does what you want. If not, could you please specify *EXACTLY* what you want to do. Thanks! Annette From: Keith Jewell k.jewell_at_campden.co.uk Date: Tue, 17 Mar 2009 12

Re: [R] Merging

2009-03-17 Thread Keith Jewell
the aggregate, but does need the dataframe name. Because the dataframe name is specified inside the aggregate, we don't need the with(). HTH Keith J Keith Jewell k.jew...@campden.co.uk wrote in message news:gpoc8f$jl...@ger.gmane.org... Looks as if you copied my code without modifying to suit your

Re: [R] Merging

2009-03-17 Thread Keith Jewell
OK, I can't see anything wrong with that. a) post the results of ... sessionInfo() ... so we can check you're using a reasonably up to date system b) send a copy of your data set to me at... k.jewell at campden.co.uk ... and I'll see if I can reproduce your error. I can take most common

Re: [R] Factor to continuous

2009-04-14 Thread Keith Jewell
I suspect the OP is looking for FAQ 7.10 http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors-to-numeric_003f HTH Keith J Luc Villandre villa...@dms.umontreal.ca wrote in message news:49e495fe.1090...@dms.umontreal.ca... Hi, You'll need to be more specific about the nature

[R] nls with plinear and function on RHS

2008-10-02 Thread Keith Jewell
without starting value in 'data': Ca, Cb, Cc Can anyone tell me a) why putting the RHS into a function broke the plinear algorithm b) if there's a better approach to my problem Thanks in advance, Keith Jewell - I'm using V2.7.2... sessionInfo() R version 2.7.2 (2008-08-25) i386

Re: [R] sapply and median, possible or not ?

2008-11-07 Thread Keith Jewell
I haven't looked at the detail, but I guess the answer is that mean works on a data frame while median doesn't. ?mean snip For a data frame, a named vector with the appropriate method being applied column by column. - I guess to use median you'll need nested '[l/s]apply's, the

Re: [R] arithmetic comparison over corresponding values from two vectors

2009-02-10 Thread Keith Jewell
sapply(trgroup, function(x) which(x=starts x =ends)) works for your example data, but there's probably a better way HTH KJ T Joshi tejalonl...@gmail.com wrote in message news:11417a880902100902w53664a3dq11aee64a963d8...@mail.gmail.com... Hi, I have scenario in which I wish to check whether

Re: [R] Statistic community?

2009-02-25 Thread Keith Jewell
You might also try... http://groups.google.com/group/sci.stat.consult http://groups.google.com/group/sci.stat.edu http://groups.google.com/group/sci.stat.math Although I can't swear these don't overlap with some already mentioned. HTH Keith J Heather Turner heather.tur...@warwick.ac.uk wrote in

[R] rpart with interval censored data crashes R

2009-01-09 Thread Keith Jewell
minded to replace the interval censored data by the mid points of the intervals. Does anyone have any comments on such an approach? Any comments gratefully received. Keith Jewell == Version: platform = i386-pc-mingw32 arch = i386 os = mingw32 system

Re: [R] rpart with interval censored data crashes R

2009-01-13 Thread Keith Jewell
Thanks for such a complete answer, that is very helpful. Best regards, Keith Jewell Terry Therneau thern...@mayo.edu wrote in message news:200901121858.n0ciw0g06...@hsrnfs-101.mayo.edu... Thank you for the input on rpart -- I just saw the message today. 1. You are right, it should

Re: [R] forward slash vs double backslash R and Tinn-R

2009-01-23 Thread Keith Jewell
I'm on Windows XP and it works fine for me, so the only apparent reason for the failure may not be the real reason. BUT IT FAILS isn't very explicit. If your .trPaths definition works for you, why not use it? As Duncan Murdoch said, you're really asking in the wrong place. There's a forum

[R] How should a SelfStart function handle illegal parameter values?

2009-09-04 Thread Keith Jewell
optimisation tool (such as optim) because this fits into a much bigger picture predicated on nls. I'd appreciate any suggestions. Keith Jewell sessionInfo() R version 2.9.1 (2009-06-26) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United

[R] How to use nls when [selfStart] function returns NA or Inf??

2009-09-21 Thread Keith Jewell
bad parameter values, equivalent to very large errors in 'y' values I really do want to use nls rather than a bounded optimisation tool (such as optim) because this fits into a much bigger picture predicated on nls. I'd appreciate any suggestions. Keith Jewell

Re: [R] How to use nls when [selfStart] function returns NA or Inf??

2009-09-22 Thread Keith Jewell
!) value when the right answer is NA Any suggestions/comments gratefully received. Keith Jewell === Gabor Grothendieck ggrothendi...@gmail.com wrote in message news:971536df0909210923r3fd13fb0we72850bf73232...@mail.gmail.com... With a small number of parameters just use brute

Re: [R] locfit: max number of predictors = 6? How interpolate in 5-10D?

2010-02-26 Thread Keith Jewell
, not shouting, just highlighting key points for those skimming quickly) Keith Jewell Liaw, Andy andy_l...@merck.com wrote in message news:b10baa7d28d88b45af82813c4a6ffa934ce...@usctmx1157.merck.com... Well, I should think there's an obvious (if not elegant) way to test it: n - 5e3 m - 20 x

[R] update.packages with UNC library path

2010-02-26 Thread Keith Jewell
Hi all, I hit a small snag. Here is my workaround (copied verbatim from my aide memoire) in case it helps others. (or anyone knows a better way... ;-) Best regards, Keith Jewell. The site library file is defined (in Renviron.site R_LIBS_SITE=//Server02/stats/R/library

Re: [R] Error Running TinnR with R

2010-03-12 Thread Keith Jewell
Many people seem to have trouble defining '.trPaths' which is the set of file names which TinnR uses to communicate with R; the user must be able to create/write/read these files/folders. In my Rprofile.site I have the single assingment: .trPaths - paste(paste(Sys.getenv(APPDATA),

Re: [R] how to update R files included assource ?

2010-03-29 Thread Keith Jewell
Hi, I'm afraid I really don't have time to enter into a dialogue :-{ but this fragment from a function of mine might help... -- outfile - sub(Rd$, html, hfile, ignore.case=TRUE) # name of corresponding html out.mod - file.info(outfile)[,mtime] # if html absent

Re: [R] list.files recursively to find files in a specific way...

2011-07-20 Thread Keith Jewell
construction (where I did escape '.') as: list.files(path=file.path(list.files(path=.libPaths(), full.names=TRUE), etc), pattern=^menus\\.txt$, full.names=TRUE) Does that look OK? Best regards, Keith Jewell Prof Brian Ripley rip...@stats.ox.ac.uk wrote in message news:alpine.lfd

[R] UNC windows path beginning with backslashes: normalizePath bug??

2011-08-11 Thread Keith Jewell
the feeling I'm being silly and making hard work of all this. Any comments? Suggestions? Best regards, and thanks in advance/ Keith Jewell Keith Jewell k.jew...@campden.co.uk wrote in message news:... Hi, Back in 2010 I had a problem with 'update.packages()', which I worked around by mapping

[R] UNC windows path beginning with backslashes: normalizePath bug??

2011-08-12 Thread Keith Jewell
the feeling I'm being silly and making hard work of all this. Any comments? Suggestions? Best regards, and thanks in advance/ Keith Jewell Keith Jewell k.jew...@campden.co.uk wrote in message news:... Hi, Back in 2010 I had a problem with 'update.packages()', which I worked around by mapping

Re: [R] UNC Windows path beginning with backslashes: normalizePath bug??

2011-08-12 Thread Keith Jewell
a drive where I can. I posted in the hope of learning from and perhaps helping those with similar problems. I hope that it is permissible to discuss non-canonical use of R on this list, I certainly did not intend disrespect for the R developers (or to make typing errors). Best regards Keith Jewell

Re: [R] UNC Windows path beginning with backslashes

2011-08-18 Thread Keith Jewell
still think I've probably re-invented a wheel and ended up with something square, but it is going round. Best regards, Keith Jewell Keith Jewell k.jew...@campden.co.uk wrote in message news:j22q11$9u9$1...@dough.gmane.org... Thanks Uwe. I'm aware (and have been forcefully reminded) that using

Re: [R] UNC Windows path beginning with backslashes

2011-08-19 Thread Keith Jewell
) Thanks for your interest, Keith Jewell - Henrik Bengtsson h...@biostat.ucsf.edu wrote in message news:cafdcvcqe3uukmmqsjj0fpevfjgrabrgbt1g8drcxgpnsjeb...@mail.gmail.com... I think you can also do this from within R (e.g. in your .Rprofile) using the R.utils

Re: [R] error in nls, step factor reduced below minFactor

2011-03-29 Thread Keith Jewell
?nls.control warnOnly a logical specifying whether nls() should return instead of signalling an error in the case of termination before convergence. Termination before convergence happens upon completion of maxiter iterations, in the case of a singular gradient, and in the case that the

Re: [R] QQ plot for normality testing

2011-05-03 Thread Keith Jewell
I have found this web page useful http://www.cms.murdoch.edu.au/areas/maths/statsnotes/samplestats/qqplot.html Your mileage may vary. Keith J Matevz Pavlic matevz.pav...@gi-zrmk.si wrote in message news:ad5ca6183570b54f92aa45ce2619f9b901208...@gi-zrmk.si... Hi all, I am trying to test

Re: [R] Sorting strings

2012-02-20 Thread Keith Jewell
Petr Savicky savi...@cs.cas.cz wrote in message news:20120220105153.gc21...@cs.cas.cz... On Mon, Feb 20, 2012 at 02:18:42AM -0800, statquant2 wrote: Hi all, I am having difficulties to understand how R sort strings: If I do R) sort(c(X.,X0B)) [1] X. X0B So for me, as far as

Re: [R] how to run system command

2012-03-07 Thread Keith Jewell
Works for me: -- sessionInfo() R version 2.14.1 (2011-12-22) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252LC_MONETARY=English_United Kingdom.1252 [4] LC_NUMERIC=C

Re: [R] how to run system command

2012-03-08 Thread Keith Jewell
PATH's contents. You can look at it with strsplit(Sys.getenv(PATH), .Platform$path.sep)[[1]] Bill Dunlap -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Keith Jewell Sent: Wednesday, March 07, 2012 1:02 AM To: r-h

Re: [R] Creating polygons from scattered points

2012-03-14 Thread Keith Jewell
No time to really think about this, but: a) to convert scattered point distributions to polygons you might look at convex hulls; e.g. convhulln {geometry} b) to identify islands some kind of cluster analysis Hope that helps a little. KJ Louise Mair lm...@york.ac.uk wrote in message

Re: [R] colname refered by a variable

2010-12-03 Thread Keith Jewell
or even shorter df[,paste(A,C,sep=)] Santosh Srinivas santosh.srini...@gmail.com wrote in message news:aanlktikcjy7bvyfbwuwmrq4dhg4pbdau+qh_7+k+b...@mail.gmail.com... try this .. df[,colnames(df)==paste(A,C,sep=)] On Fri, Dec 3, 2010 at 12:05 PM, Yuan Jian jayuan2...@yahoo.com wrote: Hello,

Re: [R] String to array

2010-12-09 Thread Keith Jewell
Romildo Martins romildo.mart...@gmail.com wrote in message news:aanlktinbiaexcobzyqdbtr62xr9q=kjvwaazaqi-k...@mail.gmail.com... Hello, how convert x in xarray (numbers)? x [1] 0 - 13 y [1] 11 - 23 z [1] 220 - 9 xarray [1] 0 13 yarray [1] 11 23 zarray [1] 220 9 Thanks,

Re: [R] how to wrap a long line in R scripts?

2011-01-10 Thread Keith Jewell
Jonathan P Daily jda...@usgs.gov wrote in message news:of588e803b.869e9aff-on85257814.004d298d-85257814.004d4...@usgs.gov... a - rey lo ong charrr Although the indentation is just personal preference.

Re: [R] median by geometric mean

2011-01-17 Thread Keith Jewell
Just in case some of x are negative (the desired median still exists, as long as the two middle values are non -ve), how about: x - runif(20, -1, 100) exp(median(log(pmax(0,x It'll give -Inf if the two middle values are negative, when I guess we should get NaN, but I can't see a 1-line way

Re: [R] median by geometric mean -- are we missing what's important?

2011-01-18 Thread Keith Jewell
or an odd number of negative numbers it becomes 0 or imaginary (please do correct me if I'm wrong)? sqrt(prod(c(2, 0, 54))) sqrt(prod(c(-2, 2))) Greg Snow, what is the scientific question? What is the model? Cheers, Bert On Mon, Jan 17, 2011 at 9:13 AM, Keith Jewell k.jew

Re: [R] subsets

2011-01-20 Thread Keith Jewell
I don't think Ivan's solution meets the OP's needs. I think you could do it using %in% and the approriate logical operations e.g. aDF - data.frame(id=c(1,2,2,2,3,3,4,4,4,5), diagnosis=c(ah, ah, ihd, im, ah, stroke, ah, ihd, angina, ihd)) aDF[with(aDF,(id %in% id[diagnosis==ah]) (id %in%

Re: [R] subsets

2011-01-20 Thread Keith Jewell
I did try it. It gave me [[1]] id diagnosis 1 1ah 5 3ah 7 4ah 8 4 ihd 10 5 ihd [[2]] id diagnosis 1 1ah 2 2ah 5 3ah 7 4ah [[3]] id diagnosis 3 2 ihd 8 4 ihd 10 5 ihd Which isn't what

Re: [R] Adding a year to existing date

2011-11-17 Thread Keith Jewell
Just looking at the ambiguity in adding a year dates - as.Date(c('2007-03-01','2008-02-29')) tmp - as.POSIXlt(dates) tmp$year - tmp$year+1 dates2 - as.Date(tmp) dates2 [1] 2008-03-01 2009-03-01 dates2 - dates Time differences in days [1] 366 366 KJ MacQueen, Don macque...@llnl.gov wrote

Re: [R] unique combinations

2011-12-21 Thread Keith Jewell
OK, someone point it out to me; my wife tells me I can't see what's in front of me :-} I read ?expand.grid carefully, went to ?combn and ?choose but still couldn't see an easy way to get what the OP asked for. The neatest I can get (which isn't very neat!) is: myVec - c(1,2,3) eg -

Re: [R] unique combinations

2011-12-21 Thread Keith Jewell
to a solution. I used [, which I couldn't see suggested on ?expand.grid. I thought I'd missed a neater solution in the help pages, and hoped someone could point it out. Best regards, Keith Jewell -- Uwe Ligges lig...@statistik.tu-dortmund.de wrote in message news

Re: [R] How to capture console output in a numeric format

2011-06-24 Thread Keith Jewell
If you don't want the information as character, why are you printing it rather than storing it in a matrix? Why not something along the lines of this... fr - function(x) { ## Rosenbrock Banana function on.exit(aMatrix - rbind(aMatrix,(cbind(x1, x2, f x1 - x[1] x2 - x[2] f -

Re: [R] How to capture console output in a numeric format

2011-06-27 Thread Keith Jewell
] On Behalf Of Keith Jewell Sent: Friday, June 24, 2011 11:49 AM To: r-h...@stat.math.ethz.ch Subject: Re: [R] How to capture console output in a numeric format If you don't want the information as character, why are you printing it rather than storing it in a matrix? Why not something along the lines

[R] Sys.glob() doesn't handle a UNC windows path beginning with backslashes

2011-06-30 Thread Keith Jewell
(list.files(path=.libPaths(), full.names=TRUE), etc), pattern=^menus\\.txt$, full.names=TRUE) a reasonable replacement for the Sys.glob() construction in Rcmdr? I don't want to suggest to Prof. Fox an amendment which fixes my problem but 'breaks' it for others! Thanks in advance, Keith Jewell R

Re: [R] function coverage

2013-01-15 Thread Keith Jewell
On 14/01/2013 22:25, Hadley Wickham wrote: I think codetools could do this reasonably well with the walkCode function, but I've never done it so I don't have sample code, and walkCode is mostly an internal function. There are a couple of approaches here:

Re: [R] approxfun values

2013-02-14 Thread Keith Jewell
Alternatively, with approx() use xout to specify which interpolated values you want returned: approx(dat, xout=dat$V1[is.na(dat$V2)]) KJ On 14/02/2013 11:43, Rui Barradas wrote: Hello, In what follows I've changed your df name to 'dat', to save some keystrokes. approxfun returns a function,

Re: [R] precision warning in delaunayn function

2012-07-26 Thread Keith Jewell
Does delaunayn(scale(coord),options=Qbb) help? Keith J On 26/07/2012 08:26, Jean-Luc Dupouey wrote: Dear R helpers, I try to use the 'delaunayn' function in the 'geometry' package for Delaunay triangulation in 2 dimensions. For the four following points, I get a warning message :

Re: [R] Tendonitis and R users

2012-09-04 Thread Keith Jewell
When I suffered from wrist pain I found changing from a standard mouse to a cordless trackball gave rapid and complete relief. Your mileage may vary. Keith J I think I've avoided tendonitis by carefully stretching the affected area when I begin to feel discomfort and, as John suggests,

Re: [R] Mailing List

2012-09-05 Thread Keith Jewell
You might prefer to read list via the web or a news reader or an RSS feed, in which case http://dir.gmane.org/gmane.comp.lang.r.general might be helpful. Keith J On 05/09/2012 13:47, David Winsemius wrote: On Sep 5, 2012, at 3:00 AM, Marcus Tullius wrote: Hello there, is there a way I

Re: [R] princomp/prcomp packages not available for 3.0.2

2014-02-19 Thread Keith Jewell
On 19/02/2014 15:47, Rich Shepard wrote: Running 3.0.2 on Slackware here. Tried to install.packages() for both princomp and prcomp (Principal Components Analysis) but R responded by telling me neither is available for this version of R. Has anyone an idea when either (but especially

  1   2   >