> x <- c(12,13,15,20,33)
> x
[1] 12 13 15 20 33
> x[x != 15]
[1] 12 13 20 33
> c(x,1,2,3,4)
[1] 12 13 15 20 33 1 2 3 4
>
On Sat, Sep 20, 2008 at 10:19 PM, Severino Salmo III
<[EMAIL PROTECTED]> wrote:
>
> hi,
>
> i have a simple question.
>
> if i have a set of numbers within a given list, how
Hello all,
I'm dealing with geochemical analyses of some rocks.
If I use the full composition (31 elements or variables), I can get
reasonable separation of my 6 sources. Then when I go onto do LDA with the
6 groups, I get excellent separation.
I feel like I should be reducing the variables to
hi,
i have a simple question.
if i have a set of numbers within a given list, how do i remove a number
within that list.
Like, if I have
water(10, 15, 20, 25, 30)
what is the command to remove 15?
what is the command to add new numbers?
thanks so much,
sev
--
View this message in context:
Hello,
I've searched all the standard spots, and I can't find any
implementation of the Ng-Perron test for unit roots. I am aware of
the PP tests in urca. Anybody know of something I missed?
Thanks,
Ben
__
R-help@r-project.org mailing list
https://sta
use "split' to split your dataframe by country and then do the diff.
On Sat, Sep 20, 2008 at 8:54 PM, Gabriel Paul Mihalache
<[EMAIL PROTECTED]> wrote:
> I was suggested that more details with help re: my question on first
> differences in panel data...
> The data set in question is PWT6.2:
>
>> s
> This doesn't help you immediately, but in the next couple of days I'll
> be releasing the plyr function which would allow you do something
> like:
Thank you! I'm looking forward to it!
Meanwhile, Mark Leeds sent me exactly the code I needed. (Using
split() to get df-s by country and then just u
Hi Gabriel,
On Sat, Sep 20, 2008 at 7:54 PM, Gabriel Paul Mihalache
<[EMAIL PROTECTED]> wrote:
> I was suggested that more details with help re: my question on first
> differences in panel data...
> The data set in question is PWT6.2:
>
>> str(pwt6.2)
> 'data.frame': 10340 obs. of 27 variables:
Dear Chris,
If 'x' is your matrix, you could try this:
tail(sort(apply(x,1,max)),2)
HTH,
Jorge
On Sat, Sep 20, 2008 at 8:48 PM, Chris82 <[EMAIL PROTECTED]> wrote:
>
> Hello R users,
>
> is there a possibility to get the relativ maximum of a matrix?
> To get the absolut maximum I use max(matri
Hello, everyone!
I'd like to find out how I can do first log differences in a panel?
(The Penn World Table data that's available in the PWT package)
The regular diff() function ignores the country/index/"panel unit",
with depressing results.
A second request, how can I best "filter" the data (e.g.
I was suggested that more details with help re: my question on first
differences in panel data...
The data set in question is PWT6.2:
> str(pwt6.2)
'data.frame': 10340 obs. of 27 variables:
$ country: Factor w/ 188 levels "Afghanistan",..: 1 1 1 1 1 1 1 1 1 1 ...
$ isocode: Factor w/ 188 leve
Hello R users,
is there a possibility to get the relativ maximum of a matrix?
To get the absolut maximum I use max(matrix)
For example:
The absolut maximum of this matrix is 6[3,6], but the relativ maximum is
6[3,6] and 4[7,6], because both values are the highest value in comparison
to their e
stephen sefick wrote:
I am not sure if I am exaggerating or not read title as hyperbola
On Sat, Sep 20, 2008 at 2:20 PM, stephen sefick <[EMAIL PROTECTED]> wrote:
I have got a data set that is Gross Primary Productivity ~ Total
Suspended Solids it is a hyperbola just like:
plot(1/c(1:1000))
yes, yes! I'm out of my mind.
Thank you.
-Original Message-
From: hadley wickham [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 20, 2008 5:49 PM
To: Ling, Gary (Electronic Trading)
Cc: r-help@r-project.org
Subject: Re: [R] fast value replacement in (numeric) vector
On Sat, Sep 20,
On Sat, Sep 20, 2008 at 4:41 PM, Ling, Gary (Electronic Trading)
<[EMAIL PROTECTED]> wrote:
> Hi R users,
> What is the fastest way to replace a(some) value(s) in a (numeric)
> vector?
> I checked ?replace, but its output is another vector.
> 1) I wonder if there's any function to perform in-place
On 20 Sep 2008, at 23:41, Ling, Gary (Electronic Trading) wrote:
Hi R users,
What is the fastest way to replace a(some) value(s) in a (numeric)
vector?
I checked ?replace, but its output is another vector.
1) I wonder if there's any function to perform in-place replacement?
How about
L[n] <-
Hi R users,
What is the fastest way to replace a(some) value(s) in a (numeric)
vector?
I checked ?replace, but its output is another vector.
1) I wonder if there's any function to perform in-place replacement?
2) Or any other function would do what I'm looking for with faster
speed?
# here is so
?sample
efficient enough?> system.time(z <- sample(1:5, 50, TRUE,
prob=c(.05,.05,.05,.05,.8)))
user system elapsed
0.120.020.14
> table(z)
z
1 2 3 4 5
24800 24771 25039 25022 400368
>
On Sat, Sep 20, 2008 at 3:43 PM, John Sorkin <[EMAIL PROTECTED]>
R 2.6
Windows XP
I need to select from the integers 1,2,3,4,5 with some pre-determined
probability, e.g. probability of selecting 5 80%, probability of selecting 1 or
2 or 3 or 4 20%. Any suggestions for how I might accomplish this? I need to
do it very efficiently as I will be doing it 500,0
I am not sure if I am exaggerating or not read title as hyperbola
On Sat, Sep 20, 2008 at 2:20 PM, stephen sefick <[EMAIL PROTECTED]> wrote:
> I have got a data set that is Gross Primary Productivity ~ Total
> Suspended Solids it is a hyperbola just like:
> plot(1/c(1:1000))
>
> how do I model thi
I have got a data set that is Gross Primary Productivity ~ Total
Suspended Solids it is a hyperbola just like:
plot(1/c(1:1000))
how do I model this relationship so that I can get all of the neat
things that lm gives residuals etc. etc. so that I can see if my
eyeball model stands up. Thanks for
> x <- 'Mr Jones ate lunch and Mr Smith was tied'
> gsub('(Mr\\.*)\\s+\\w+', "\\1 ", x)
[1] "Mr ate lunch and Mr was tied"
>
>
On Sat, Sep 20, 2008 at 2:24 AM, Bob Green <[EMAIL PROTECTED]>wrote:
>
> Hello,
>>
>
> I am hoping for advice as to how I could remove all words immediate
Dear Miltinho,
Since you don´t have absence, I think that you cannot calculate the AUC.
However, you can create pseudoabsences (by selecting areas from where you
know that the species is not present) at random and use them as surrogates
of absences data. This process has its drawbacks, which have
Hi all,
This is both a general and r specific question. I am analyzing some
morphological data and have performed a MANOVA on the 5 groups with 5
measured morphological traits. The results provide me with some pairwise
comparisons, but I would like to run a multiple comparison test on the
result
Dear all,
I have statistics related question. What type of modeling technique to be
used when dependent variable (Y) is continuous but with 99% zero.The other
1% (+ve , don't have -ve values) values are huge.
If I take DGP of dependent variable as Pareto type distribution, will it be
ok? Your hel
Jim Lemon wrote:
Seth W Bigelow wrote:
Ok, thanks to Carl Witthoft I now know that to color spaces between and
below a pair of lines in xyplot, I will need to redefine the lines as
polygons, and use the lpolygon panel function, as in the following
library(lattice)
p <- c(1,10,10,1) # ve
dear baptiste,
thank you very much, that was excatly what i was looking for:-)
best regards
Andreas
baptiste auguie wrote:
Hi,
I think you want to Vectorize integrate(), not integrand(). Here's a
way using mapply,
integrand <- function(z)
{
return(z * z)
}
vec1<-1:3
vec2<-2:4
mapply
Hi,
I think you want to Vectorize integrate(), not integrand(). Here's a
way using mapply,
integrand <- function(z)
{
return(z * z)
}
vec1<-1:3
vec2<-2:4
mapply(integrate, lower=vec1, upper=vec2, MoreArgs=list(f=integrand) )
baptiste
On 20 Sep 2008, at 13:08, Andreas Wittmann wrote:
D
Dear R useRs,
i try to integrate the following function for many values
"integrand" <- function(z)
{
return(z * z)
}
i do this with a for-loop
for(i in 2:4)
{
z <- integrate(integrand, i-1, i)$value
cat("z", z, "\n")
}
to speed up the computation for many values i tried vectors
in integrat
Thank you very much, yes maybe its worth working on it.
best regards
Andreas
Uwe Ligges wrote:
Andreas Wittmann wrote:
Dear R useRs,
i have the following code to compute values needed for a contour plot
"myContour" <- functio
Seth W Bigelow wrote:
Ok, thanks to Carl Witthoft I now know that to color spaces between and
below a pair of lines in xyplot, I will need to redefine the lines as
polygons, and use the lpolygon panel function, as in the following
library(lattice)
p <- c(1,10,10,1) # vector of x values
q
john crepezzi wrote:
Is there any way to determine if a plot exists before running lines()?
Hi John,
I use :
if(dev.cur()==1)
which usually indicates that the current device is the null device, and
therefore no plot windows are active. See the code for triax.plot.
Jim
_
Hi,
I would like to fit a GLM model with GEE on clustered data.
I tried to use gee in the GEE package on a twin data set. All cluster
are of size 2. I removed the missing data and ordered by IDENTIF2 first.
library(gee)
mod.pc <- gee(Y ~ X1 + X2 , id = IDENTIF2, family = binomial, corstr
= "unstr
Dear list,
I have produced a fairly intricate plot arrangement for use in a
publication using layout() and gridBase, and out of curiosity I'd like
to learn whether a more elegant and robust solution could be obtained
with grid to avoid the layout() function.
library(gridBase)
x <- seq(
hadley,
thanks for the example, that put it much better into perspective. I'm
gonna make some coffee and read through this page and see how deep it
goes. I might even be able to use this for some other things we're
doing.
Thanks!
--John Crepezzi
hadley wickham wrote:
> I really would encourage
34 matches
Mail list logo