Hi,
Try this:
dat1-structure(1243792800, class = c(POSIXct, POSIXt), tzone = GMT)
dat2-as.POSIXlt(dat1)
dat2$mday-dat2$mday-10
dat2
#[1] 2009-05-21 18:00:00 GMT
A.K.
- Original Message -
From: chuck.01 charliethebrow...@gmail.com
To: r-help@r-project.org
Cc:
Sent: Monday, October
On Oct 30, 2012, at 05:34 , Jean Jang wrote:
Hi R - listers,
I am receiving an error. Does anyone know what this means? J
This command:
ggplot(subset(foo, Rayos != Rayos.NA), aes(x=HTL, y=DevelopIndex,
colour=TotalEggs)) +geom_point() +geom_jitter() +
facet_grid(Aeventexhumed ~
On 29/10/2012 19:39, Cory Lowe wrote:
Does anyone know where I can download the GTK_2.18.5-X11.pkg? It has been
removed from r.research.att.com/libs/ and I need it to use the RQDA package on
my mac. Is there anyone who can direct me to someone who might have the file?
Any help would be
On 2012-10-29 11:34, Bernie Wone wrote:
ok got it to work, but my original question was, is it possible to set
the radii or axes one line type and the circles another type (please
see attached)? Thanks!
That wasn't clear in your original request. But it's easy.
To provide arguments for setting
Dear R users,
I have a Hadamard matrix 16x15 and i want to put 16x5 submatrices in an array
put i have an error.
A1-matrix(c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
+ 0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,
+ 1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,
+ 0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,
+
Hello,
According to your script, the dimension of AA should be 16x3x161051.
Best Regards,
Pascal
Le 30/10/2012 16:30, Haris Rhrlp a écrit :
Dear R users,
I have a Hadamard matrix 16x15 and i want to put 16x5 submatrices in an array
put i have an error.
(1) Think about what you are doing.
(2) Try your ideas out with a *simple* example. For instance
take A - matrix(1:50,ncol=5).
Then create all possible submatrices consisting of 3 distinct columns
of A. There won't be nearly so many of these as in your real example,
so the resulting output is
Dear Madam or Sir
I am writing you hoping, that you can help me with a problem concerning the
output of regressions done with the function lme in R.
I would need the standard deviations for intercepts and predictors, but in the
output I can only find those for the intercepts. Could it be, that
Hi,
I very frequently end up in a situation where I have a named list of
data.frames that I wish to combine. e.g.
l - list(A=data.frame(x=rnorm(5),
y=rnorm(5)),
B=data.frame(x=rnorm(3),y=rnorm(3)),
C=data.frame(x=rnorm(4),y=rnorm(4)),
Hello Chris,
I 've found two other issues
with MAE and CRPS, giving warning when running examples.
I've the same issue on my data.
Hope that you could find some time to take a
look here.
Thank you
Anna
library(ensembleBMA)
Loading required package: chron
example(MAE)
MAE
Dear Sylvia,
R-sig-mixed-models is a better list for questions about mixed models.
The summary gives you the standard error for the fixed effects. See the output
in your mail. E.g. AGQ has a standard error of 0.044
Have a look at http://glmm.wikidot.com/faq, it covers some topics on mixed
Moved to r-help.
On Mon, Oct 29, 2012 at 8:11 PM, jose ramon mazaira jram...@gmail.com wrote:
Hi. I'm trying to write an application to retrieve financial data
(specially bonds data) from FINRA. The web page is served dynamically
from an asp.net application:
Imagine a list of two arrays. The first array is like a vector that
contains ten 2x2 matrices. The second array contains two vectors of 2x2
matrices of length five and three, respectively. I run the code and it
gives me what I want for the first array. However, it disappoints me for
the second
Sorry for the noise. PD said to keep this on R-devel. If this sparks
any interest, send replies there.
M
On Tue, Oct 30, 2012 at 9:44 AM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
Moved to r-help.
On Mon, Oct 29, 2012 at 8:11 PM, jose ramon mazaira jram...@gmail.com wrote:
Hi.
Olá,
Há um R-Help em português, aqui está enganado. O endereço é
http://br.groups.yahoo.com/group/R_STAT/
Além disso aqui não fazemos trabalhos de casa.
Boa sorte,
Rui Barradas
Em 29-10-2012 23:53, kamisama escreveu:
Olá amigos tudo bem ? Espero que sim.
Sou novo aqui e gostaria muito da
Hello,
There's nothing inelegant in your solution, you're using vectorized
instructions.
But there's a bug. The argument to rep should be 'each', not 'times'.
l2$name - rep(names(l), each=sapply(l,nrow))
Hope this helps,
Rui Barradas
Em 30-10-2012 08:16, Mark Payne escreveu:
Hi,
I very
Hi all!
I have two survival data sets looking at similar effects in different settings.
One data set is only right censored, but the other is interval censored. In the
right censored data set, there is an effect of one factor that causes very
different shapes in survival curves (and
Hello everybody,
how can I reduce e.g. 30 days from a date?
When I do the following 2011-05-01 CEST -2011-04-01 CEST I get:
Time difference of 30 days
an thats fine.
But when I try 2011-05-01 CEST - 30 I get nonsense.
So how can I subtract some days, month or years from a date?
thanking
Hello,
You're right, sorry for the misleading post. It's even documented:
|times||A |integer vector giving the (non-negative) number of times to
repeat each element if of length |length(x)|
As for a one liner, use within().
within(do.call(rbind, l), name - rep(names(l), times=sapply(l,
Hi everybody
I am trying to run the next code but I have the next problem
Y1-cbind(score.sol, score.com.ext, score.pur)
vol.lm-lm(Y1~1, data=vol14.df)
library(MASS)
stepAIC(vol.lm,~fsex+fjob+fage+fstudies,data=vol14.df)
Start: AIC=504.83
Y1 ~ 1
Error in addterm.mlm(fit, scope$add, scale =
panel.lmline returns intercept and slope of y ~ x subsetted to the
combination of conditioning factors given to xyplot in lattice.
for instance:
xyplot(Xvalues ~ log(Qvalues)|Tfac, data = df7, panel = panel.lmline)
I am looking to find the equivalent formulation for lm() proper. If I do
this:
Hello,
Ok, try the following.
fun - function(x, d, last){
new - last
if(any(d)){
ii - which(d)
for(i in ii){
new - new + 1
old - x$ID[i]
x$ID[i] - new
x$FA_ID[x$FA_ID == old] - new
x$MO_ID[x$MO_ID == old] - new
Hello,
I don't get it, this seems to work as expected.
d - as.Date(2011-05-01 CEST)
d - 30
[1] 2011-04-01
Hope this helps,
Rui Barradas
Em 30-10-2012 10:25, paladini escreveu:
Hello everybody,
how can I reduce e.g. 30 days from a date?
When I do the following 2011-05-01 CEST -2011-04-01
Hi
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of paladini
Sent: Tuesday, October 30, 2012 11:26 AM
To: r-help@r-project.org
Subject: [R] subtract a time period from a date
Hello everybody,
how can I reduce e.g. 30 days
HI,
Try this:
dat1-2011-05-01 CEST
dat2-as.POSIXlt(dat1)
dat2$mday-dat2$mday-30
dat2
#[1] 2011-04-01
A.K.
- Original Message -
From: paladini palad...@beuth-hochschule.de
To: r-help@r-project.org
Cc:
Sent: Tuesday, October 30, 2012 6:25 AM
Subject: [R] subtract a time period from a
it looks like
facet_grid(Aeventexhumed ~ Rayos)
+ geom_smooth(method=lm, fill=NA) + ylim(c(0, 7))
should read
facet_grid(Aeventexhumed ~ Rayos) +
geom_smooth(method=lm, fill=NA) + ylim(c(0, 7))
In ggplot the + must be on the preceding line.
John Kane
Kingston ON Canada
Let's say I have a package that consists of a set of functions, fig1(),
fig2(), fig3() ..., each of which
produces a plot, and perhaps some printed output, e.g.,
fig1 - function() plot(1:10)
fig2 - function() plot(10:1)
fig3 - function() {y-sample(1:10,10); plot(y); y}
I'd like to produce a
Dear all
I have a question about quantiles standard error, partly practical
partly theoretical. I know that
x-rlnorm(10, log(200), log(2))
quantile(x, c(.10,.5,.99))
computes quantiles but I would like to know if there is any function to
find standard error (or any dispersion measure) of
Thanks for the helpful comments from others.
The KNOWNHOST variable lists the types of file that are known to work
with the read.sas7bdat function. It's likely that most files written on
Windows platforms will work, even if not listed in KNOWNHOST. If you're
feeling experimental, you might just
But I need to work with the names of the figure functions instead, something
like
figlist - paste0(fig, 1:3)
Are the functions exported or internal?
# Use for internal functions
pkg - asNamespace(mypackage)
# Use for exported functions:
pkg - package:mypackage
# Find functions matching a
Petr:
1. Not an R question.
2. You want the distribution of order statistics. Search on that. It's
basically binomial/beta.
-- Bert
On Tue, Oct 30, 2012 at 6:46 AM, PIKAL Petr petr.pi...@precheza.cz wrote:
Dear all
I have a question about quantiles standard error, partly practical
partly
Petr,
You can do:
require(quantreg)
summary(rq(x ~ 1, tau = c(.10,.50,.99))
url:www.econ.uiuc.edu/~rogerRoger Koenker
emailrkoen...@uiuc.eduDepartment of Economics
vox: 217-333-4558University of Illinois
fax: 217-244-6678
Dear R users,
I have 2 matrices dim(16x5) below and i want to write an algorithm that check
the 2 matrices if they are isomorphic ones (Isomorphic matrices: if I change
the rows or/and columns or/and zeros into 1 and 1 into zeros in a row(s) or
column(s) are the 2 matrices identical).
0 0
Dear List,
Java Exception error while reading large data in R from DB using RJDBC.
I am trying to read large data from DB table(Vectorwise), using RJDBC
connection.
I have tested the connection with small size data and was able to fetch DB
tables using same connection(conn as in my code).
Take a look at ?assign
Bart
--
View this message in context:
http://r.789695.n4.nabble.com/Creating-dataframes-with-unique-sequential-names-tp4647863p4647864.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org
Suppose I want to create a structure containing the following values:
0.8,0.9,1.0,1.1,1.2
If I use
env - list(0.8,0.9,1.0,1.1,1.2)
then R returns
env
[[1]]
[1] 0.8
[[2]]
[1] 0.9
[[3]]
[1] 1
[[4]]
[1] 1.1
[[5]]
[1] 1.2
But, if I try to 'save some key-strokes', and use
env -
Hi everybody,
I am quite new to data imputation, but I would like to use the R package '
Amelia II: A Program for Missing Data '. However, its unclear to me how
the input for amelia should look like:
I have a data frame consisting of numerous coulmns, which represent
different experimental
Hi, I would like to create a trellis plot (3x2) of 6 individual box plots.
It would look like this:
(Created semi-manually)
http://r.789695.n4.nabble.com/file/n4647878/Figure8.jpg
What would be the most elegant way to do this?
Thank you!
--
View this message in context:
hello , I am new user in R . I have datafile (class = data.frame) which has
825 columns with unique column name i want extract 200 selected column from
datafile how can I do this?
my datafile look like..
Mi RBN RBFnDB nX
3 2.6225979 0.53132756
Hi Barry
Thank you very much for your reply. I changed my scripts according to your
suggestions - this is how they look now:
#!/bin/bash
VARIABLES=( a b c d )
for i in ${VARIABLES[@]}; do
export VARIABLENAME=$i
Rscript -e 'source(myscript.R)'
done
and in the R program, I used
Dear Friends,
I'm contributing to a paper on a new R package for a clinical (medicine,
ophthalmology) audience, and part of the mission is to encourage people who
might be occasional users of Excel or SPSS, to become more familiar with R.
I'd really appreciate any pointers to more recent papers
Hi,
I have two global raster maps, each of the same variable but from different
sources. The values range from 0 to 5 in whole numbers. Is there a
statistical test in R that can quantify the similarity of the spatial
patterns (i.e., highs and lows)?
Thanks,
--
View this message in context:
From: roberta...@hotmail.it
To: smartpink...@yahoo.com
Subject: RE: [R] replace repeated id in a pedigree list
Date: Tue, 30 Oct 2012 09:51:50 +0100
You are right! I want to replace the second 6 with a new ID. For example I
have id 6 which is repeated 2 times. In family 1 it appears one
any can please tell me how to remove 10%,15%,25% and 50% of the data randomly
by using R programme???
can anyone please show me the coding?
do i need to install any package?
--
View this message in context:
Dear Members
I am Writing to you because I need help to compute the Malmquist Luenberger
index with R with my panel data of 10 central Africa countries from the year
1980 to 2008. I have three inputs and 2 outputs which one is undesirable (CO2)
and the other (GDP for agriculture is the
You first example is a list of 5 items, each item is a number
The second example is a list with one item: a vector with 5 elements.
You'll need c() to make a vector of the item to get the same result.
all.equal(list(c(0.8,0.9,1.0,1.1,1.2)), list(seq(0.8, 1.2, by = 1.1)))
ir. Thierry Onkelinx
Dear list:
I would like to recreate how the artificial data set BregFix was generated
in package flexmix (thanks Bettina and Friedrich). The data set is
thoroughly described in Grun and Leisch's Computational Statistics Data
Analysis 51(11) :5247-5252 but references to the appropriate seed
s - seq(0.8, 1.2, by = 0.1)
as.list(s)
to get the first type of list from the sequence.
On 30.10.2012, at 16:51, ONKELINX, Thierry wrote:
You first example is a list of 5 items, each item is a number
The second example is a list with one item: a vector with 5 elements.
You'll need c() to
On Tue, Oct 30, 2012 at 2:03 PM, sophie melanie.bi...@bluewin.ch wrote:
Hi Barry
Thank you very much for your reply. I changed my scripts according to your
suggestions - this is how they look now:
#!/bin/bash
VARIABLES=( a b c d )
for i in ${VARIABLES[@]}; do
export
Nope, you can do it easily along the lines of
dat[sample(NROW(dat), NROW(dat)*(1 - 0.1)),]
But you need to spend the time understanding what all that does. Lots
of important and powerful R ideas in that little bit.
Michael
On Tue, Oct 30, 2012 at 3:12 PM, Eugenie leemean...@hotmail.com wrote:
Is this what you want:
x - read.table(text = Mi RBN RBFnDB
nX
+ 3 2.6225979 0.53132756 -0.80599902 -1.4471864 -0.5705269
+ 10 0.4818746 -1.72143092 -2.19579027 2.0118824 -0.5705269
+ 12 2.8519611 1.88298265 0.09614617 0.6282549 -0.5705269
+
First your response in the formula is a matrix which causes the lm
function to return an object of type 'mlm' for multivariate linear
model. Then when you run the stepAIC function it runs the addterm
function which looks for a method(function) to add terms to mlm
objects. However nobody has
On Tue, Oct 30, 2012 at 2:22 PM, Paul Artes paul_h_ar...@yahoo.co.uk wrote:
Dear Friends,
I'm contributing to a paper on a new R package for a clinical (medicine,
ophthalmology) audience, and part of the mission is to encourage people who
might be occasional users of Excel or SPSS, to become
On Tue, Oct 30, 2012 at 3:08 PM, nikalk nik...@gmail.com wrote:
Hi, I would like to create a trellis plot (3x2) of 6 individual box plots.
It would look like this:
(Created semi-manually)
http://r.789695.n4.nabble.com/file/n4647878/Figure8.jpg
What would be the most elegant way to do this?
A look at the tutorial might help here, but anyway:
Say you have that dataframe down there with the name myData (you should use
dput() to give us the data btw),
then you can subset that by using myData[rows,columns], where left of the comma
you define which rows you want, and right of the
You can use the lmList function in the nlme package to do several
seperate regressions, or use a model that allows for multiple
intercepts. Possibly Xvalues ~ 0 + log(Qvalues)*Tfac or Xvalues ~ 0 +
Tfac + log(Qvalues):Tfac (assuming Tfac is a factor).
On Tue, Oct 30, 2012 at 5:53 AM, Alex van
I'm running XLConnect 0.2-1 that depends on rJava 0.9-3. I am only able to
work with 2 workbooks before I get this error...
SppRich = wb[SpeciesRichness] # This command calls an Excel
spreadsheet
Error: OutOfMemoryError (Java): GC overhead limit exceeded
I have tried...
rm(list = ls())
Hello
Just add c() collector as follows :
env - list(c(0.8,0.9,1.0,1.1,1.2))
Cheers
Guillaume
--
View this message in context:
http://r.789695.n4.nabble.com/Re-newbie-embeding-seq-in-a-list-tp4647884p4647896.html
Sent from the R help mailing list archive at Nabble.com.
Hi,
I am working with the RCurl package and I am using the curlPerform
function for an soap-query.
The problem is that the code is usually working well, but sometimes the
connection gets lost.
So I wrote a while-loop to repeat the query if anything might happened
so that the same query runs
Pass a vector to list() instead of individual values:
env - list(c(0.8,0.9,1.0,1.1,1.2))
env
[[1]]
[1] 0.8 0.9 1.0 1.1 1.2
-
David L Carlson
Associate Professor of Anthropology
Texas AM University
College Station, TX 77840-4352
-Original Message-
Please read the Introduction to R tutorial that ships with R to get
started with R. Quoting Rolf Turner:
Learn something about R; don't just hammer and hope. Read the
introductory manuals and scan the FAQ.
Cheers,
Bert
On Tue, Oct 30, 2012 at 7:09 AM, alex_123 deepak.j...@gmail.com wrote:
On Tue, Oct 30, 2012 at 8:00 AM, Bart Joosen bartjoo...@hotmail.com wrote:
Take a look at ?assign
Then read fortune(236)
Then learn about lists and environments to learn better methods.
Bart, without context it is harder for use to contribute useful advice.
Bart
--
View this message
Hi Barry,
I already tried adding print commands, but even if I put the print command
right under myscript - function(), there is no printed output in the
shell...
sophie
--
View this message in context:
http://r.789695.n4.nabble.com/export-variable-from-bash-to-R-tp4647749p4647897.html
Sent
As usual, Google is your friend!
Google on growth of R software. The first 2 hits are relevant, and
there are others further down.
-- Bert
On Tue, Oct 30, 2012 at 9:05 AM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
On Tue, Oct 30, 2012 at 2:22 PM, Paul Artes
You mention trellis, so I will assume that you already know about the
trellis graphics functions (in the lattice package).
If you are creating all the plots from a single dataset using
conditioning then you can just use the 'layout' argument to specify
the 3x2 arrangement (note that this
On Tue, Oct 30, 2012 at 4:34 PM, sophie melanie.bi...@bluewin.ch wrote:
Hi Barry,
I already tried adding print commands, but even if I put the print command
right under myscript - function(), there is no printed output in the
shell...
If your script is just:
myscript - function(){
#
Hi Elisa,
Simply create a data frame with the columns you want to use and then run the
amelia() function on that data frame.
Say, you've creasted the data frame MyDF with the 3 columns you want amelia to
perform the imputation. Then type
a.out - amelia(MyDFl, m =M)
(where M is the number of
For a single response variable tools like LASSO, LARS, ridge
regression, elasticnet, model averageing, and other penalized methods
(packages lasso2, lars, rms, elasticnet, MASS, BMA, and probably
others implement these tools) are preferred to stepwise methods. I
don't know if any of these have
I'm not sure it is the most elegant way but you can do this with ggplot2
You may have to install it, (install.packages(ggplot2)
A very basis example:
library(ggplot2)
mydata - data.frame(aa = rep(letters[1:6], each = 11), bb = rep( c(x,
y), 11),
cc - rnorm(66))
p -
Greetings all,
Ran into a strange problem with the krige function from geoR. The
problem that I am having is that while the krige function seems to
work well, the resulting predicted values are all NAs. Given the size
of the datasets I am working with can't attach it, but I can provide
snippets
On 30-Oct-2012 13:46:17 PIKAL Petr wrote:
Dear all
I have a question about quantiles standard error, partly practical
partly theoretical. I know that
x-rlnorm(10, log(200), log(2))
quantile(x, c(.10,.5,.99))
computes quantiles but I would like to know if there is any function to
Damn, I didn't read that before
but assign could get the job done if used wise, but without context it's hard
to say, I must admit
Date: Tue, 30 Oct 2012 10:50:40 -0600
Subject: Re: [R] Creating dataframes with unique, sequential names
From: 538...@gmail.com
To:
Hi,
Try this:
dat1-read.table(text=
V1 V2
1 5 10
2 6 3
3 8 4
4 9 20
5 15 30
6 25 40
7 2 4
8 3 1
9 1 5
10 8 10
,header=TRUE)
dat1[sample(1:nrow(dat1), 0.50*nrow(dat1)),] #50% of data
# V1 V2
#4 9 20
#6 25 40
#8 3 1
#10 8 10
#9 1 5
dat1[-sample(1:nrow(dat1), 0.90*nrow(dat1)),]
Hi,
when plotting a graphic i find that the surrounding box disappears if I
adjust the margins with par(mar=..). Ive tried reassigning it with box() but
it doesnt seem to make any difference. Does anyone know a way to overcome
this?
Thanks in advance
--
View this message in context:
Hello,
I think this is easy, but I can't seem to find a good way to do this in the R
help. I have a list of sites, with multiple years of data for each site id. I
want to create a new column that gives a number describing whether it is the
1st year (1 ) the data was collected for the site, the
Hi Barry,
OK, now I absolutely do feel like the newbie I am :-)
I added the function call, and - what a surprise - everything is working
fine.
Thanks a lot,
sophie
--
View this message in context:
http://r.789695.n4.nabble.com/export-variable-from-bash-to-R-tp4647749p4647912.html
Sent from
Hi,
You can also try this:
res-do.call(rbind,lapply(l,function(x)
data.frame(Name=names(l)[match.call()[[2]][[3]]],x)))
row.names(res)-1:nrow(res)
head(res)
# Name x y
#1 A -0.7326214 -0.8871683
#2 A 0.4761960 0.8245219
#3 A 0.2362935 -0.1427997
#4 A
More links on reproducible research:
Opinion: Open and Free: Software and Scientific Reproducibility
Seismological Research Letters
Volume 83 · Number 5 · September/October 2012
Reproducible Research in Computational Science
Roger D. Peng
Science 2 December 2011: 1226-1227.
albyn
On
Not without reproducible code and data.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Dear R users,
I want a help to write an algorithm for swapping rows and columns in a matrix
thanks in advance
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Hi all!
My question in about using mapply instead for loop. Below is a example with for
loop: Is it posible to give same results with mapply function?
Thanks for help!
OV
x - 1:10
y - 1:10
xyz - data.frame(expand.grid(x,y)[1], expand.grid(x,y)[2], z = rnorm(100))
names(xyz) - c(x, y, z)
noob here
trying to make boxplots of some data
i would like to separate the boxplots according to conditons of various
levels
for example:
i have
group:1 and 2, each group performed tests consisting of
condition A,B,C,D
side: left and right
time: 1 to 10
I would like separate boxplots of the
Does the builtin function 't' work for your needs?
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Haris Rhrlp
Sent: Tuesday, October 30, 2012 3:00 PM
To: R-help@r-project.org
Subject: [R] Swap rows and columns in a matrix
Dear R
Is this what you want?
withinGroupIndex - function(group, ...) ave(integer(length(group)), group,
..., FUN=seq_along)
site - c(A,A,C,D,C,A,B)
data.frame(site, index=withinGroupIndex(site))
site index
1A 1
2A 2
3C 1
4D 1
5C 2
6A
On 31/10/12 07:59, Haris Rhrlp wrote:
Dear R users,
I want a help to write an algorithm for swapping rows and columns in a matrix
thanks in advance
?t
(???)
cheers,
Rolf Turner
__
R-help@r-project.org mailing list
Not quite,
I need it like this, a new number for each ordered year in the sequence within
each site, regardless of what the years are, and to retain the RchID column.
RchID siteyearindex
1 A 20021
2 A 20042
3 A 20053
4 B
The new version of rms is now on CRAN (for Mac and Windows probably
tomorrow). You can now do p - Predict(...); plot(p, ~ x2, nlines=TRUE,
type='p') to get what you want.
Frank
stephsus wrote
Hi Frank,
Thanks for your reply! Using p - Predict(f, x2); plot(p, ~x2,
nlines=TRUE)
makes a
Your data was, in R-readable format (from dput())
d - data.frame(
RchID = 1:9,
site = factor(c(A, A, A, B, B, B, C,
C, C), levels = c(A, B, C)),
year = c(2002L, 2004L, 2005L, 2003L, 2006L, 2008L,
2002L, 2003L, 2004L),
index = c(1L, 2L, 3L, 1L,
Care to tell us why you think you need such an index? I suspect you do not.
Cheers,
Bert
On Tue, Oct 30, 2012 at 12:21 PM, Meredith, Christy S -FS
csmered...@fs.fed.us wrote:
Not quite,
I need it like this, a new number for each ordered year in the sequence
within each site, regardless of
HI,
You can also use this:res-do.call(rbind,lapply(split(d,d$site),function(x)
data.frame(x,newindex=1:nrow(x
rownames(res)-1:nrow(res)
res
# RchID site year index newindex
#1 1 A 2002 1 1
#2 2 A 2004 2 2
#3 3 A 2005 3 3
#4 4 B
Hi everyone,
i'm looking for a NA-friendly operator
I explain :
vec-c(3,4,5,NA,1,NA,9,NA,1)
vec[vec == 1] # NA 1 NA NA 1
I dont want the NA's :
vec[vec == 1 ! is.na(vec)]# 1 1
is the same as
vec[vec %in% 1] # 1 1
%in% is NA-friendly :)
But if i want 2
Here's one option:
vec-c(3,4,5,NA,1,NA,9,NA,1)
subset(vec, vec 2)
[1] 3 4 5 9
subset(vec, vec == 1)
[1] 1 1
Sarah
On Tue, Oct 30, 2012 at 5:08 PM, vincent guyader
vincent.guya...@gmail.com wrote:
Hi everyone,
i'm looking for a NA-friendly operator
I explain :
On 30-10-2012, at 22:08, vincent guyader wrote:
Hi everyone,
i'm looking for a NA-friendly operator
I explain :
vec-c(3,4,5,NA,1,NA,9,NA,1)
vec[vec == 1] # NA 1 NA NA 1
I dont want the NA's :
vec[vec == 1 ! is.na(vec)]# 1 1
is the same as
On Oct 30, 2012, at 2:25 PM, Berend Hasselman wrote:
On 30-10-2012, at 22:08, vincent guyader wrote:
Hi everyone,
i'm looking for a NA-friendly operator
I explain :
vec-c(3,4,5,NA,1,NA,9,NA,1)
vec[vec == 1] # NA 1 NA NA 1
I dont want the NA's :
vec[vec
Instead of ignore-NA versions of , , ==, etc., I prefer to factor out
the ignore-NA part of things:
is.true - function(x) !is.na(x) x
is.false - function(x) !is.na(x) !x
used as
is.false(c(1,2,NA,4) 3)
[1] TRUE TRUE FALSE FALSE
is.true(c(1,2,NA,4) 3)
[1] FALSE FALSE
Unless there is a good reason not to, you should keep discussions
on-list.
On 31/10/12 08:29, Haris Rhrlp wrote:
thank you for your answer but i dont want the transpose of matrix. I
want to swap rows seperatly and columns the same
Then I am afraid that your question is all Greek to me. :-)
Eek!
Just a bit simpler would be (á la Dr. Dunlap): (d is the data frame):
d - within(d,index - ave(year,site, FUN = order))
(This assumes exactlly one data collection per each year that appears, though.)
Cheers,
Bert
On Tue, Oct 30, 2012 at 12:56 PM, arun smartpink...@yahoo.com wrote:
HI,
On Oct 30, 2012, at 11:59 AM, Haris Rhrlp wrote:
Dear R users,
I want a help to write an algorithm for swapping rows and columns in a matrix
This will shuffle columns, although 'randomly permute' is the more common
word for this;operation:
set.seed(123)
mat[, sample(dim(mat)[2] ]
This
HI everyone,
I try to get some bootstrap CIs for coefficients obtained by quantile
regression. I have influencial values and thus switched to quantreg..
The data is clustered and within clusters the variance of my DV = 0..
Is this sensible for the below data? And what about the warnings?
Thanks
Hi Florian
Yes, there are several options for a curl operation that control the timeout.
The timeout option is the top-level general one. There is also timeout.ms.
You can also control the timeout length for different parts of the
operation/request
such as via the connecttimeout for just
1 - 100 of 116 matches
Mail list logo