Or maybe use assign?
> assign("natural_nums", 1:10)
> natural_nums
[1] 1 2 3 4 5 6 7 8 9 10
>
Cheers,
Simon.
On Fri, 2008-03-14 at 14:39 +1000, [EMAIL PROTECTED] wrote:
> I'm not sure why you would wish to do so, but it can be done:
>
> > natural_nums <- 1:10
> > even_nums <- seq(2,
Just like David said, I doubt you can get the symbology databased for free
(distribution license/fee reasons). (Or if you know any please let me know :-)
I'm sure nobody would like to prepare this mapping manually. This is what I
would try:
1. Get today's open or close price from Bloomberg f
I'm not sure why you would wish to do so, but it can be done:
> natural_nums <- 1:10
> even_nums <- seq(2,10, by = 2)
> types <- c("natural_nums", "even_nums")
> types <- lapply(types, as.name) ## list of variable names
> types
[[1]]
natural_nums
[[2]]
even_nums
> eval(types[[1]])
[1] 1 2
You may be looking for the get function.
See ?get
Ng Stanley wrote:
> Hi,
>
> For example,
>
> natural_nums <- 1:10
> even_nums <- seq(2,10, by = 2)
> types <- c("natural_nums", "even_nums")
>
> What functions can be performed on types[1] to turn it into a variable name
> and not a string ?
>
Dear R users,
I have two group of data (say X1 and X2) that (may) fit bivariate
normal distribution.
I used mvnxxx (a function in mclust library) to fit the data to a
bivariate normal
distribution.
Now I want to plot the data (each (X1, y1) represents a point on the
xy plane) and
the estimated biv
Andrew McFadden <[EMAIL PROTECTED]> writes:
> I am trying to determine the distances between two datasets of x and y
> points.
This can be done efficiently in the package 'spatstat'.
library(spatstat)
crossdist(x1, y1, x2, y2)
where x1, y1 are vectors of coordinates for the first set
Hi,
For example,
natural_nums <- 1:10
even_nums <- seq(2,10, by = 2)
types <- c("natural_nums", "even_nums")
What functions can be performed on types[1] to turn it into a variable name
and not a string ?
[[alternative HTML version deleted]]
_
Hi. I've installed the fSeries package, trying to do Arfima fitting.
Instructions in fSeries.pdf ask to use "ArfimaOxFit.ox" and "
ArfimaOxPredict.ox" files, which i'm unable to find (the suggested path
described in fSeries.pdf does not contains the files). Does any one can share
those files wi
Hi Mark, sorry for the late response. I am now moving to my new job... When
you use cor.balance() to estimate the correlation matrix, it is able to
handle many variables (genes) at one time. What is returned should be a 497
by 497 correlation matrix. But when you use cor.LRtest() to calculate
P-va
[EMAIL PROTECTED] wrote:
> I'm running lmer repeatedly on artificial data with two fixed factors (called
> 'gender' and 'stress') and one random factor ('speaker'). Gender is a
> between-speaker variable, stress is a within-speaker variable, if that
> matters.
> Each dataset has 100 rows from eac
All,
I have several years of longitudinal test scores for students (many who
switch schools at various points in time). I am using a mixed-effects model
with crossed random effects to model student trajectories. The model
includes time at level 1 and students crossed with schools at level 2. When
An example that included input and output would help. I'll take a guess but if
that's not it please clarify and provide that.
Also its helpful if you can provide the data in easily copied form
using dput(z).
I will assume that time(New) is a superset of time(Old) and "put them in" means
replace
Thanks to all for their suggestions. I apologize for not supplying a
self-contained example, I should not post questions when I'm on the way
out the door.
Martin's suggestion should work, but I need to put in on our
high-performance system next week. On my local 64-bit Linux box with 4GB
of RA
hi
I am having trouble figure out how to do the fisher scoring method in R
using "rgeom".
can anyone help?
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
On 13-Mar-08 22:56:16, Alfonso Pérez wrote:
> Hello, my name is Alfonso. My data are 0 and 1 values in
> the y axis and fish length in the x axis. I'm trying to get
> a graph where it could be fitted a logit curve to my data,
> how could I get it?
Have a look at
?glm
In particular (just go
Marina,
The way I would go about it would be to clarify, in order, the following
issues:
* What questions do I want to ask about the tree diameter incremental
process?
* What data do I have, or should I get, to address those questions?
* What analyses or models should I use to link the data to
I'm running lmer repeatedly on artificial data with two fixed factors (called
'gender' and 'stress') and one random factor ('speaker'). Gender is a
between-speaker variable, stress is a within-speaker variable, if that matters.
Each dataset has 100 rows from each of 20 speakers, 2000 rows in all.
Hi there,
Am try to find tree diameter increment in a hierarchical data with tree
diameter measurements, date of measurements, in plots that are located in
different region. How do I do it? am very new to R.
Thanks for you help.
Maina Kariuki
Level 3, 8 Nicholson Street
East Melbourne VIC 3
Hello, my name is Alfonso. My data are 0 and 1 values in the y axis and
fish length in the x axis. I'm trying to get a graph where it could be fitted a
logit curve to my data, how could I get it?
Thank you in advance.
_
> an unusual strategy would be to use lockBinding to make the symbol
> associated with the generic unchangeable.
>
This sounds nice, thanks. Why is it unusual ? Any side effect or just
the practice?
__
R-help@r-project.org mailing list
https://stat.
hello everybody
I'm a newbie with ordered probit and with polr too.
The problem is that I have a dependent variable I need to explain
with an ordered probit that is
> head(dfscale$sod.sit.ec.fam,100)
> [1] 5 7 5 6 5 5 6 8 6 8 8 8 6 6 6 5 0 5 NA 6
> [21] 7 NA NA 0 0 2 5
Hi all,
I installed all required packages for plm, but pdata.frame is not a
recognized function on R to start with.
I followed the first page of "introduction to plm" by Croissant&Millo, Here
are the messages:
*
> library(plm)
Loading required package: kinship
Loading required package: survival
L
Hello,
I have two zoo objects, new and old, indexed by chron objects. Their structure
is like this:
(05/25/06 00:00:00) NA NA NA
(05/25/06 00:02:00) 948.20 24.198 0
(05/25/06 00:04:00) 948.26 20.640 0
(05/25/06 00:06:00) 948.37 19.653 0
(05/25/06 00:08:00) 948.48 19.135 0
(05/2
This may be a silly question to ask, but, is it possible do do a
MANOVA-style analysis with a generalized linear model? I have a data
set that I'm working with that, for each variable (time in this case,
as it's a repeated measures MANOVA) is fit much better using glm
rather than a traditi
You should consult the summary
http://cran.r-project.org/bin/windows/contrib/checkSummaryWin.html
to answer such questions. These are not part of the install of R -- you
must have chosen to install some packages which depend on them. As to
whether you need them -- that depends if you need the
JAN FEB MAR APR MAY JUN JUL AUG
SEP OCT NOV DEC
1968NA 10.710.09.3 7.4 8.1 9.3 9.5 8.5
10.010.013.0
196913.09.9 7.0 5.9 NA 6.5 7.3 6.6 NA
NA
Greetings all:
Newcomer to R as I work on learning it to transfer my college classroom
stats training to something more useful and accurate then that spreadsheet
from Redmond which shall remain nameless.
I'm running v2.6.2 on a Win XP Home system that I keep up to date with all
the called for
Hello Limma users
A quick question, I hope:
I have dual-channel spotted expression arrays in a simple loop design
(no dye swaps), viz:
1 vs reference
2 vs 1
3 vs 2
reference vs 3
There are 4 replicate spots for each probe on each array.
It seems as if getting meaningful spot summary results u
?aggregate
tt <- matrix(c(rnorm(10), 1,1,2,2,1,3,3,3,3,2),
ncol=2))
aggregate(t[,1], by=list(t[,2]), mean)
should work
--- Ng Stanley <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a two columns data, the first column are
> values, and second column
> are the groups. For this example, there are
Try:
do.call(expand.grid, sapply(end, seq, from = 0))
On 13/03/2008, lamack lamack <[EMAIL PROTECTED]> wrote:
>
>
>
> Dear all, what is the best way to do this?
>
> end = c(2,6,4)
>
> I neeed: expand.grid(0:end[1],0:end[2],0:end[3])
>
> Best regards
>
>
> JL
> __
Dear all, what is the best way to do this?
end = c(2,6,4)
I neeed: expand.grid(0:end[1],0:end[2],0:end[3])
Best regards
JL
_
Confira vídeos com notícias do NY Times, gols direto do Lance, videocas[[elided
Hotmail spam]]
_
Blood ell ! Thanks very much, it does help give a
feel for what's happening. I'll have to do some
experimenting.
--- Henrique Dallazuanna <[EMAIL PROTECTED]> wrote:
> A example:
>
> x <- rnorm(5)
>
> x[3]
> `[`(x, 3)
> `[[`(x, 3)
>
> x[3:4]
> `[`(x, 3:4)
> `[[`(x, 3:4) # Error
>
>
> On 13/
A example:
x <- rnorm(5)
x[3]
`[`(x, 3)
`[[`(x, 3)
x[3:4]
`[`(x, 3:4)
`[[`(x, 3:4) # Error
On 13/03/2008, John Kane <[EMAIL PROTECTED]> wrote:
> Ah ?Extract. Thanks
>
> Unless I'm missing something there is nothing in the
> Usage or Examples to suggest to a naive reader like me
> that one
I don't think you can. What is your desired output?
You can always do c(1:2, 1:10)
--- Ng Stanley <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How to cbind or rbind different lengths
> vectors/arrays without repeating the
> elements of the shorter vectors/arrays ?
>
> > cbind(1:2, 1:10)
> [,1]
Ah ?Extract. Thanks
Unless I'm missing something there is nothing in the
Usage or Examples to suggest to a naive reader like me
that one can use an unbalanced [ or [[, that is
withoug a corresponding ] or ]].
I probably am just not understanding the details.
--- Henrique Dallazuanna <[EMAIL
On Thu, 13 Mar 2008, Dwayne Blind wrote:
> Thanks a lot.
>
> You were right :-)
>
> Professor Ripley can I use your SPLUS book for R too ?
'Modern Applied Statistics with S' and 'S Programming' both cover S and
its implementations in S-PLUS and R.
However, 'Modern Applied Statistics with S-PLUS
or the suggestive :)
?"["
b
On Mar 13, 2008, at 2:58 PM, Henrique Dallazuanna wrote:
On 13/03/2008, John Kane <[EMAIL PROTECTED]> wrote:
Can you point me to some documentation that discusses
these usages. I have seen them before but I have never
actually figured out how to use them.?
See ?
On 13/03/2008, John Kane <[EMAIL PROTECTED]> wrote:
> My thanks to Henrique Dallazuanna and Phil Spector.
> Both solutions worked well.
> Phil suggested that an alterative to my function would
> be
> vect1 = sapply(mylist,'[[',1)
> and I see that Henrique used `[` in his solution.
>
> Can you
My thanks to Henrique Dallazuanna and Phil Spector.
Both solutions worked well.
Phil suggested that an alterative to my function would
be
vect1 = sapply(mylist,'[[',1)
and I see that Henrique used `[` in his solution.
Can you point me to some documentation that discusses
these usages. I have se
Thanks to Stefan Grosse, Gabor Grothendieck, and Professor Ripley for
all this guidance. I have collected the details, concatenating them
below, for future reference. Sorry if attributions got muddled.
It is WinXP Pro in the primary, and there's no need to keep around older
versions. But there
On Thu, Mar 13, 2008 at 8:43 AM, R Help <[EMAIL PROTECTED]> wrote:
> Hello list,
> I've been reading through the archives and it seems as though, as
> of right now, there is no way to specify the correlation structure in
> lmer. I was wondering if anyone knows if this is going to be
> impl
Devred, Emmanuel mar.dfo-mpo.gc.ca> writes:
> I haven't found a way in the searchable archive to overplot a contour
> (lines) over a surface.
> I have a (n,m) matrix that represents sea surface temperature that I
> have plotted using image.plot(), filled.contour() or image(). I would
> like to o
Thanks a lot.
You were right :-)
Professor Ripley can I use your SPLUS book for R too ?
2008/3/12, Prof Brian Ripley <[EMAIL PROTECTED]>:
>
> On Wed, 12 Mar 2008, Dwayne Blind wrote:
>
>
> > Dear R users,
> >
> > I wrote the following toy example to explain my problem :
> >
> > a=0
> > f=functio
If I understand correctly, try this:
as.data.frame(lapply(mylist, `[`, 1:max(unlist(lapply(mylist, length)
On 13/03/2008, John Kane <[EMAIL PROTECTED]> wrote:
> I have a set of character vectors of uneven length
> that I have stored in a list. I can easily enough get
> any column of them
Ideally something like this:
==
t(cbind( c("cat" , "peach" , NA, NA), bbb <- c("dog"
, "apple" ,"iron", NA),
ccb <- c("rabbit" ,"orange" ,"zinc" , "silk" )))
==
Thanks
--- Erik Iverson <[
What would you want your output matrix to look like given mylist?
John Kane wrote:
> I have a set of character vectors of uneven length
> that I have stored in a list. I can easily enough get
> any column of them using lapply but what I want is to
> be able to create a matrix of them. Other tha
Thanks to Tony Plate, Vince Goulet, and Prof. Brian Ripley (I apologize for
not posting this to R-devel).
It is nice to know that there can be no unintended side-effects of this new
"ellipsical convention", other than the inconvenience of having to provide
complete names of arguments after the e
Dear R-users,
I haven't found a way in the searchable archive to overplot a contour
(lines) over a surface.
I have a (n,m) matrix that represents sea surface temperature that I
have plotted using image.plot(), filled.contour() or image(). I would
like to overplot this image with some contour line
If this _is_ Windows, the question is discussed in detail in the rw-FAQ.
That document also discusses how to install packages into a site or
personal library which can make upgrading easier.
Another consideration not told to us was whether one wants to keep around
a working copy of the older ver
I have a set of character vectors of uneven length
that I have stored in a list. I can easily enough get
any column of them using lapply but what I want is to
be able to create a matrix of them. Other than some
kind of brute force looping approach I have drawn a
blank.
Would somebody please su
Thanks for the tips and clarifications. I'm a newbie and don't always
have the terminology down correctly. My understanding is that one
should be able to use generalized linear mixed models to model response
variables that take any of the exponential family of distributions. The
beta distrib
On Thu, 13 Mar 2008, Mark W Kimpel wrote:
> I have a list (length 750), each element containing a vector of unique
> strings (unique gene ids), with length up to ~40 (median 15). I want to
> compile a matrix of all possible triplets and their frequency within
> gene elements. Using combn and a lot
There is an entry in the NEWS file for 2.6.0:
CHANGES IN R VERSION 2.6.0
SIGNIFICANT USER-VISIBLE CHANGES
o integrate(), nlm(), nlminb(), optim(), optimize() and uniroot()
now have '...' much earlier in their argument list. This
reduces the chances of unin
Try
> graphics::persp( . . .
Whin you run just persp, it runs the first copy it finds, with the
graphics:: on the front in specifically runs the one from the graphics
package.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(
I think Stefan has answered this so I will just
add this about batchfiles. In the batchfiles distrirbution:
http://batchfiles.googlecode.com
is a file Rgui.bat. If you put that anywhere in your path and make
your shortcut to that instead of to R itself then it will find the most
recent version
In this case you can simply do
cumsum(a[x,]+a[y,])
Julian
yoo wrote:
> Hi all, i have the following..
>
> a <- data.frame(data = seq(1,10))
>
> i have indices:
> x <- c(1, 5, 3, 9)
> y <- c(2, 7, 4, 10)
>
> I want the cumsum of a[1:2], a[5:7], a[3:4]...
>
> is there an elegant way to
> There has been a virtual population explosion of R books in recent years
> and we all have our favorites. You may wish to pick one oriented toward
> your specialty, but the absolute minimum lowest common denominator (by
> which I mean that it has the ground zero essential information that al
Hi all,
I loaded VGAM, which masks the persp function from graphics. How can I run the
persp function after running VGAM? I tried reloading graphics but it did not
work. Thank you.
quan
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailma
There was a discussion on this a while back, see:
http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22858.html
There is some good discussion there on why you may not want to do this
(adding the numbers at the tops of bars tends to distort the visual
comparison of heights, among other things). If yo
?text
tmp <- c(34,22,77)
tmp.labels <- c("cat", "dog", "sheep")
tmp2 <- barplot(tmp, ylim=c(0, max(tmp)+10))
text(1:3, tmp+2 , labels=tmp.labels)
--- Aimin Yan <[EMAIL PROTECTED]> wrote:
> I want to label each bar on the top of bars when
> using barplot.
>
> anyone know how to do this?
>
> th
For filenames you can do something like:
file = paste("resultsMatrix_', i, sep='')
For naming objects in the workspace, there is a way, but you really
don't want to do that. It is better to store them in a list, for
example:
resultList <- list()
for( i in 1:10){
resultList[[i]] <- ma
Thanks!
Double thanks to Phil, I used your guide to learn LaTeX many moons ago.
On Thu, Mar 13, 2008 at 1:26 PM, Greg Snow <[EMAIL PROTECTED]> wrote:
>
> For filenames you can do something like:
>
> file = paste("resultsMatrix_', i, sep='')
>
> For naming objects in the workspace, there is a
See ?paste and ?assign, those will get what you want done.
At least in the second case, you might consider using a list, however.
You can then avoid the use of 'for' loops by using functions such as lapply.
Best,
Erik Iverson
Economics Guy wrote:
> This is a question I have wanted to ask for a
On Thursday 13 March 2008 06:05:15 pm Galkowski, Jan wrote:
GJ> (1) How do people manage an upgrade, from 2.6.1, say, to 2.6.2? 2.6.2
GJ> will create its own subdirectory, obliging a copy of library contents to
GJ> the new spot. The documents are easier.
You forgot to enlighten us about your sys
Ravi Varadhan wrote:
> Hi,
>
> I have noticed that there is a change in the use of ellipses or . in R
> versions 2.6.1 and later. In versions 2.5.1 and earlier, the . were always
> at the end of the argument list, but in 2.6.1 they are placed after the main
> arguments and before method control a
Thank you, Vince.
Best,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor, The Center on Aging and Health
Division of Geriatric Medicine and Gerontology
Johns Hopkins University
Ph: (410) 502-2619
Fax: (410)
I want to label each bar on the top of bars when using barplot.
anyone know how to do this?
thanks
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide
This is a question I have wanted to ask for a while but hesitated
because I was sut sure I would find the answer on my own, but as of
yet...no dice.
1) Is there a way to use the loop number in naming things in R.
Specifically I have a simulation that has two loops. I would like to
be able to writ
From the NEWS file:
CHANGES IN R VERSION 2.6.0
SIGNIFICANT USER-VISIBLE CHANGES
o integrate(), nlm(), nlminb(), optim(), optimize() and uniroot()
now have '...' much earlier in their argument list. This reduces the
chances of unintentional partial matching but means that the later
arg
Like many software assemblies, R is updated frequently. Also, it
creates its own release-numbered directory when it is installed.
Packages get dumped into the subdirectory "library". I have a personal
habit of storing documents related to R packages in the "doc"
subdirectory.
Here are my questio
One thing that will probably speed things enormously
is to not grow objects (all.triplets, etc.). Instead create
them to be roughly the right size and do something like
double their size if they get full.
Patrick Burns
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poe
David,
The problem is with 1 - pghyp(.). Here is a better way to compute your
omega - I first compute a "complementary" pghyp, which is 1 - pghyp, and
then use this to compute the numerator. The denominator is okay as it is.
pghyp.c <- function(x) sapply(x, function(x){integrate(function(x)dghy
Hello Mark -
It may help if you provide a (small) set of example input and what you'd
like as your output.
Best,
Erik Iverson
Mark W Kimpel wrote:
> I have a list (length 750), each element containing a vector of unique
> strings (unique gene ids), with length up to ~40 (median 15). I want to
I have a list (length 750), each element containing a vector of unique
strings (unique gene ids), with length up to ~40 (median 15). I want to
compile a matrix of all possible triplets and their frequency within
gene elements. Using combn and a lot of looping, I am accomplishing this
but it is
Hi,
I have noticed that there is a change in the use of ellipses or . in R
versions 2.6.1 and later. In versions 2.5.1 and earlier, the . were always
at the end of the argument list, but in 2.6.1 they are placed after the main
arguments and before method control arguments. This results in the
I got my posting bounced and sorry if I accidentally post twice.
I have been looking at 'lars' pkg and got puzzled by the behavior of
function 'lars'. I want to do weighted lasso regression and can't get a
match from lars output with lm output. Here is an example:
y = rnorm(10)
x = matrix(runif(50
I have been looking at 'lars' pkg and got puzzled by the behavior of
function 'lars'. I want to do weighted lasso regression and can't get a
match from lars output with lm output. Here is an example:
y = rnorm(10)
x = matrix(runif(50),nrow=10)
X = data.frame(y,x)
z = runif(10)
X = data.frame(y,x,z
Ng Stanley wrote:
> Hi,
>
> I have the two vectors mean and sd of individual columns, but I am unsure
> how to generate bar charts with the standard deviation, even after looking
> the help of barplot and barplot.2.
Barplots are not well suited for presenting continuous data and many
would argu
Hi there!
To make a good choice for the estimation of the number of usefull
factors. And I'd like to plot a graph like:
http://de.wikipedia.org/wiki/Bild:Parallelanalyse.jpg
where I don't need the green line (random values).
But with
str(factanal(data, factors=10)) I cannot figure out where I
The package minpack.lm allows nonlinear regression problems to be
addressed with a modification of the Levenberg-Marquardt algorithm based
on the implementation of 'lmder' and 'lmdif' in MINPACK. Version 1.0-8 of
the package is now available on CRAN.
Changes in version 1.0-8 include:
o possib
Greetings all,
I recently tried to install RNetCDF from within R (install.packages)
on Fedora Core 8 (with netcdf 3.6.2 and netcdf-devel 3.6.2 already
installed). This resulted in an error because the netcdf header files
are installed in /usr/include/netcdf-3 rather than /usr/include which
is wh
well, check what the apply() gives for each row of 'x', i.e.,
x <- read.table(textConnection("locat val
1 a 5
2 b 5
3 b 15
4 c 5
5 c 20
6 c 5
7 c 10
8 d 5
9 d 15
10 d 10"), header = TRUE)
# apply() uses as.matrix() for data frames
#
Ted -
(Ted Harding) wrote:
> Now that people have answered Monica's query, can someone help me?!!
> See below.
>
>
> With Monica's dataframe as above, the answer would be 100*x[,1]/z
> where we want z to be c(5,20,20,40,40,40,40,30,30,30).
>
> So, intending to give Monica a helpful answer, I tr
From: [EMAIL PROTECTED]
>
> Now that people have answered Monica's query, can someone help me?!!
> See below.
>
> On 13-Mar-08 13:36:03, Monica Pisica wrote:
> >
> > Hi,
> >
> > I am trying to get percentages in a more elegant way. I have a
> > data.frame with locations and values (counts) of s
Look at ?tapply, based on your description, it is what you want.
Ben
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Ng Stanley
Sent: Thursday, March 13, 2008 9:25 AM
To: r-help
Subject: [PS] [R] How to manipulate data according to groups ?
Hi,
I have
Hi,
I have the two vectors mean and sd of individual columns, but I am unsure
how to generate bar charts with the standard deviation, even after looking
the help of barplot and barplot.2.
[[alternative HTML version deleted]]
__
R-help@r-project
Hi,
I have a two columns data, the first column are values, and second column
are the groups. For this example, there are 3 groups 1,2,3.
How can I manipulate the values in the first column according to groups, say
I would like to find mean, sum, and standard deviation for the different
groups ?
Now that people have answered Monica's query, can someone help me?!!
See below.
On 13-Mar-08 13:36:03, Monica Pisica wrote:
>
> Hi,
>
> I am trying to get percentages in a more elegant way. I have a
> data.frame with locations and values (counts) of species at that
> location. Each location is r
Try converting them to time series, cbinding and unconverting:
cbind(x = ts(x), y = ts(y))[TRUE, ]
On Thu, Mar 13, 2008 at 10:13 AM, Ng Stanley <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How to cbind or rbind different lengths vectors/arrays without repeating the
> elements of the shorter vectors/arra
Christophe Genolini <[EMAIL PROTECTED]> writes:
> Hi the list
>
> When two setGeneric occurs on the same function, the second erage the
> first and erase all the function previously define.
'erase' is only true if you attempt to define the generic in the same
name space (e.g., in the global envi
Monica --
There has been a virtual population explosion of R books in recent years
and we all have our favorites. You may wish to pick one oriented toward
your specialty, but the absolute minimum lowest common denominator (by
which I mean that it has the ground zero essential information that all
Hi,
How to cbind or rbind different lengths vectors/arrays without repeating the
elements of the shorter vectors/arrays ?
> cbind(1:2, 1:10)
[,1] [,2]
[1,]11
[2,]22
[3,]13
[4,]24
[5,]15
[6,]26
[7,]17
[8,]28
[9,]1
Hi everybody,
I am amazed how quick i got my answer ;-) I have to recognize that Gabor's code
really puts to shame my skills in doing any programming in R. Is there any book
or documentation which really explains in details all these neat tricks from
{stats} like ave (i even didn't know this
Rthoughts <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> There is one question I have though. I can see that worksheets and
> history can be saved, however I am beat as to exactly what they
> save? Do they save the command lines and associated data sheets and
> graphs?
There is no "da
Monica,
You can try the following:
> x.tot <- aggregate(x$val, by=list(total=x$locat), 'sum')
> x.tot
total x
1 a 5
2 b 20
3 c 40
4 d 30
> cbind(x, perc=x$val/rep(x.tot$x, table(x$locat)) * 100)
locat val perc
1 a 5 100.0
2 b 5 25.0
3 b 15
Assuming your x is as follows:
x <- data.frame(locat = c("a", "b", "b", "c", "c", "c", "c", "d", "d", "d"),
val = c(5, 5, 15, 5, 20, 5, 10, 5, 15, 10))
Try this:
x$percent1 <- ave(x$val, x$locat, FUN = function(x) 100*x/sum(x))
On Thu, Mar 13, 2008 at 9:36 AM, Monica Pisica <[EMAIL PROTECT
try the following:
x <- read.table(textConnection("locat val
1 a 5
2 b 5
3 b 15
4 c 5
5 c 20
6 c 5
7 c 10
8 d 5
9 d 15
10 d 10"), header = TRUE)
x$percent1 <- unlist(tapply(x$val, x$locat, function(x){
round(100 * x / sum(x), 2)
Hello list,
I've been reading through the archives and it seems as though, as
of right now, there is no way to specify the correlation structure in
lmer. I was wondering if anyone knows if this is going to be
implemented? I'm using mixed-effects models within a tree structure,
so I make a lo
I think you need:
thing <- vector("list", 4)
for (i in seq_along(thing)) {
thing[[i]] <- # what you want to put here
}
Best,
Dimitris
Dimitris Rizopoulos
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0
> Dear R users,
> I tried to analysis the hazard function of some data by coxph function in
> survival package.
>The type of the data include "left-censored", "right-censored", "both
> right-censored and
> left-censored" (btw, does this has a technical term?), and "complete" ones.
The coxph func
1 - 100 of 125 matches
Mail list logo