, 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
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
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)
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
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
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
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
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
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
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
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
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
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
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
\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
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,
}
---
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
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
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
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
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
!
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
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
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
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
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
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
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
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
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,
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
] //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
.
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
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
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
)
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
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
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
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
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
.
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
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
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
) 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
) 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
!) 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
, 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
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
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),
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
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
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
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
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
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
)
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
?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
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
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
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
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
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
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,
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,
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.
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
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
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%
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
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
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 -
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
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 -
]
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
(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
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:
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,
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 :
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,
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
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 - 100 of 131 matches
Mail list logo