Thanks to all for the answers! I solved my problem now by sufficient iteration!
Have a nice day!
Luba
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Hello,
thanks for the two replies. The following code worked as expected:
pos - 1:10
lab - letters[pos]
ll - parse(text = paste(pos,*phi[,lab,],sep = ))
xyplot(1:10~1:10,scales = list(x = list(labels = ll,at = 1:10)))
Best regards,
Albart
-Original Message-
From: Coster, Albart
As I mentioned last week, I've been developing a package that I call
Rdsm (R distributed shared memory), modeled after a similar package,
PerlDSM, I wrote for Perl some years ago. It is now in alpha form, so
I'm not uploading to CRAN yet, but it is definitely usable, and I am
releasing it at
On 7 July 2009 at 21:28, Mark Kimpel wrote:
| Having difficulties getting rJava to install on my Debian Squeeze box.
Did you try the binary package? A simple
sudo apt-get install r-cran-rjava
should do; if not you can at least use its Build-Depeds via
sudo apt-get build-depends
Hello all
I'm moving back and forth between stata and R at the moment - of course,
using R whenever possible :-)
I'm running conditional logits on some panel data and I get slightly
different results and different N in the two programs.
In R I run
clogit(trans.dem ~ I(avg.gle_rgdp.500/gle_rgdp)
You might also find the R wiki useful:
http://wiki.r-project.org/rwiki/doku.php?id=tips:spatial-data
http://wiki.r-project.org/rwiki/doku.php?id=tips:stats-spatial
David Hugh-Jones
Post-doctoral Researcher
Max Planck Institute of Economics, Jena
http://davidhughjones.googlepages.com
2009/7/7
the help page for plot.POSIXct says
As from R 2.9.0 the date-times for a 'POSIXct' input are
interpreted in the timwzonw give by the 'tzone' attribute it
there is one, otherwise the current timezone. (Earlier vrsions
always used the current timezone.)
however I am using 2.9.0 on
On Tue, Jul 7, 2009 at 11:32 PM, Ben Bolkerbol...@ufl.edu wrote:
Why not directly generate a large PNG file (which will be much better
for line art than JPG anyway)? Or EMF?
See http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:export
[Of course, this doesn't answer the
I am trying to use the quantcut function to create deciles, but I am getting
the error below. I am new to using this function and do not know how to
properly use the options or some other conversion that is necessary.
#initial summary using describe function in Hmisc library
DegreeBurn4th
Hi
r-help-boun...@r-project.org napsal dne 07.07.2009 19:06:17:
Hi,
I am confused about how to select elements from a list.
I'm trying to select all rows of a table 'crossRsorted' such that the
mean of a related vector is 0. The related vector is accessible as
a list element l[[i]]
Hi Greg,
Many thanks for your precious time. Here is a workable code:
set.seed(1)
xx = data.frame(x1=runif(1,0,10), x2=runif(1,0,10),
x3=runif(1,0,10))
xx$y = 3 + xx$x1 + 2*xx$x2 + 3*xx$x3 + rnorm(1)
chunksize = 500
fit = biglm(y~x1+x2+x3, data=xx[1:chunksize,])
for(i in
Hallo,
I have to fit my distribution with Beta-prime. I found the parameters now I
need to plot the Cumulative probability and the Probability density of my
fitted data.
With gamma for exemple is easy:
PDF:
plot(x,dgamma(x, shape,rate))
Cumulative probability:
plot(x,pgamma(x, shape,rate))
Another suggestion:
Create your presentation with an OpenDocument Presentation format
compatible application (e.g. OpenOffice Impress), create the plots
with Sweave chunks, and process the file with odfWeave() (package
odfWeave). If necessary, you can export to other formats such as
Hi everyone,
Thanks alot. Its work with help of you all.
regards,
Hema
On Tue, Jul 7, 2009 at 5:00 PM, Petr PIKAL petr.pi...@precheza.cz wrote:
Hi
If you have data frame like this
test=data.frame(x=c(abcd, abc, abcde))
than
strsplit(as.matrix(test), )
makes a list with splitted
Hi all,
I am new to R. How does one go about fitting a trend-line to a
scatter plot? Any help is appreciated.
Thanks and regards,
Anupam
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Hi
see
?lm and ?abline
Regards
Petr
r-help-boun...@r-project.org napsal dne 08.07.2009 11:31:19:
Hi all,
I am new to R. How does one go about fitting a trend-line to a
scatter plot? Any help is appreciated.
Thanks and regards,
Anupam
[[alternative HTML version deleted]]
Why dont you do a linear regression?
Date: Wed, 8 Jul 2009 15:01:19 +0530
From: anupam.cont...@gmail.com
To: r-help@r-project.org
Subject: [R] Fitting a trend-line
Hi all,
I am new to R. How does one go about fitting a trend-line to a
scatter plot? Any help is appreciated.
I'd like to know how to call a program to run or open a specific file.
something like this:
system('C:\\Program Files (x86)\\IrfanView\\i_view32.exe','-A:\\
teste.jpg') is not working.
any help will be appreciated
Paulo E. Cardoso
[[alternative HTML version
Check out the R2PPT package on CRAN.
On Tue, Jul 7, 2009 at 4:38 PM, Thomasaikto...@yahoo.com wrote:
Hi,
Is it possible to dump a series of plots directly into a powerpoint
presentation (as is possible in Splus)?
Thank you,
Thomas
[[alternative HTML version deleted]]
Hello,
I contact you after having unsuccessfully asked my question to R mailing list.
I use the package RODBC to connect to a MS-SQL server.
I am able to getQuery from the database.
I
am now studying the sqlSave some data into the database. Unfortunetly,
I meet some issues relating to
Hi,
On windows, you can use a COM client (with packages like rcom or RDCOMClient)
to control powerpoint from R and insert the generated image using powerpoint's
object model. You can either use the clipboard or an intermediate image file
saved to disk.
Not hard to do, but this seems to be
After all it's very easy:
system(paste('C:\\Program Files
(x86)\\IrfanView\\i_view32.exe','A:\\test.jpg'))
Paulo E. Cardoso
-Mensagem original-
De: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
Em nome de Paulo E. Cardoso
Enviada: quarta-feira, 8
anupam sinha wrote:
Hi all,
I am new to R. How does one go about fitting a trend-line to a
scatter plot? Any help is appreciated.
Hi Anupam,
Have a look at the help page for the abline function in the graphics
package.
Jim
__
Hi R-help,
I'd like to extract the seasonal component of a short timeseries, and was
hoping to use stats::decompose. I don't want to decompose the 'trend'
component so I thought I should call decompose(x,filter=0). I think I've
either misunderstood the filter argument or come upon a
Hi list,
By the entire last 2 weeks I was looking for a way to directly import xlsx
files to R in a Linux OS (Ubuntu 9.04). I already read the R Import/Export
guide, and I know how to use gdata to import xls files and read.table to
import .csv. My problem is that all data that I receive is in the
Try this: set the timezone to what you want before plotting:
tzsave - Sys.getenv(TZ) # save current
Sys.setenv(TZ=GMT) # set to whatever
plot(x,rep(1,11)) # plot
Sys.setenv(TZ=tzsave) # restore
plot(x,rep(1,11)) # plot in original time zone
On Wed, Jul 8, 2009 at 2:21 AM, Britton
Dear All,
First of all I would like to say I do not have much knowledge about this
subject, so most of you can find it really easy. I am doing a linear
regression and I want to test if the slope of the curve is 0. R gives the
summary statistics:
Call:
lm(formula = x ~ s)
Residuals:
Min
RHRPO
RHRPO Hi R-users,
RHRPO _I have a data from multi skew t and would like to transform each of the
data to uniform data._ I tried using 'pmst' but only got one output:
RHRPO _
RHRPO rr1 - as.vector(r1);rr1
RHRPO _[1]_ 0.7207582_ 5.2250906_ 1.7422237_ 0.5677233_ 0.7473555 -0.6020626
On Tue, Jul 7, 2009 at 4:22 PM, jim holtmanjholt...@gmail.com wrote:
Does something like this work for you; it uses the reshape package:
X-data.frame(A=1:10, B=0, C=1, Ob1=1:10, Ob2=2:11, Ob3=3:12,
+ Ob4=4:13, Ob5=3:12, Ob6=2:11)
Y-data.frame(A=1:20, B=0, C=1, D=5, Ob1=1:10, Ob2=2:11,
Hi,
I’m using R package RDCOMClient (http://www.omegahat.org/RDCOMClient/)
to retrieve data from MS Excel workbook. I’m using the code below to
count the number of sheets in the workbook and then loop the data from
sheets in to a list.
# R code ###
library(gdata)
Hi,
Is there a way in R to get the string which matches the expression, where
the expression is a substring of the parent string.
Lets say, I have $i - transcript:ENST112334 pid:ENSP12345
What I need is the string pid:ENSP12345 from $i using the query
ENSP.
Appreciate your
I have a particular case where the program I'm calling needs a additional
instructions, to click a RUN button and set a output directory. Could these
options be controlled with system() function?
Paulo E. Cardoso
-Mensagem original-
De: r-help-boun...@r-project.org
Try this:
xl$Quit()
On Wed, Jul 8, 2009 at 10:06 AM, Lauri Nikkinen lauri.nikki...@iki.fiwrote:
Hi,
Im using R package RDCOMClient (http://www.omegahat.org/RDCOMClient/)
to retrieve data from MS Excel workbook. Im using the code below to
count the number of sheets in the workbook and
On 08-Jul-09 12:29:40, evrim akar wrote:
Dear All,
First of all I would like to say I do not have much knowledge
about this subject, so most of you can find it really easy.
I am doing a linear regression and I want to test if the slope
of the curve is 0. R gives the summary statistics:
Try this:
sapply(strsplit(i, ' '), grep, pattern='ENSP', value = T)
On Wed, Jul 8, 2009 at 10:04 AM, Praveen Surendran praveen.surend...@ucd.ie
wrote:
Hi,
Is there a way in R to get the string which matches the expression, where
the expression is a substring of the parent string.
Then, you can try this:
xl - COMCreate(Excel.Application)
wk - xl$Workbooks()
sh - wk$Open(normalizePath(sample_file.xls))$Sheets()$Count()
wk$Close()
xl$Quit()
On Wed, Jul 8, 2009 at 10:19 AM, Lauri Nikkinen lauri.nikki...@iki.fiwrote:
Thanks but that did not work. xl$Quit() does not kill
Thanks but that did not work. xl$Quit() does not kill the Excel
process and sample_file.xls will not open.
I'm using Windows XP SP2 and R 2.8.1
-L
2009/7/8 Henrique Dallazuanna www...@gmail.com:
Try this:
xl$Quit()
On Wed, Jul 8, 2009 at 10:06 AM, Lauri Nikkinen lauri.nikki...@iki.fi
Thanks Henrique.
This is indeed short and quite simple compared to what I was using which
goes like...
unlist(strsplit(i,split= ))[grep(ENSP,unlist(strsplit(i,split= )))]
J
Cheers,
Praveen.
From: Henrique Dallazuanna [mailto:www...@gmail.com]
Sent: 08 July 2009 14:18
To:
On Wed, Jul 8, 2009 at 4:22 AM, Petr PIKAL petr.pi...@precheza.cz wrote:
Hi
r-help-boun...@r-project.org napsal dne 07.07.2009 19:06:17:
Hi,
I am confused about how to select elements from a list.
I'm trying to select all rows of a table 'crossRsorted' such that the
mean of a
Its because '[[' accept only element, so you need use '[':
q[crossRsorted[,1]]
On Wed, Jul 8, 2009 at 10:28 AM, Godmar Back god...@gmail.com wrote:
On Wed, Jul 8, 2009 at 4:22 AM, Petr PIKAL petr.pi...@precheza.cz wrote:
Hi
r-help-boun...@r-project.org napsal dne 07.07.2009 19:06:17:
I'm running a huge number of regressions in a loop, so I tried lm.fit
for a speedup. However, I would like to be able to calculate the
t-stats for the coefficients.
Does anyone have some functions for calculating the regression summary
stats of an lm.fit object?
Thanks,
Whit
On Wed, Jul 8, 2009 at 9:40 AM, Henrique Dallazuanna www...@gmail.comwrote:
Its because '[[' accept only element, so you need use '[':
q[crossRsorted[,1]]
This appears to be doing something different. For instance, my 'q' has 165
components, but what you suggest has 15750:
length(q)
[1] 165
On Jul 8, 2009, at 6:56 AM, Rodrigo Aluizio wrote:
Hi list,
By the entire last 2 weeks I was looking for a way to directly
import xlsx
files to R in a Linux OS (Ubuntu 9.04). I already read the R Import/
Export
guide, and I know how to use gdata to import xls files and
read.table to
I have previously read R Installation and Administration. I read it
again. It does not help me
The relevant paragraph is below. But I need lower level instructions. Where
can I find them.
R CMD INSTALL works in Windows to install source packages if you have the
source-code package files (option
Dear Praveen,
Try also:
strsplit(i,' ')[[1]][2]
# [1] pid:ENSP12345
HTH,
Jorge
On Wed, Jul 8, 2009 at 9:04 AM, Praveen Surendran
praveen.surend...@ucd.iewrote:
Hi,
Is there a way in R to get the string which matches the expression, where
the expression is a substring of the parent
Try this:
library(gsubfn)
i - transcript:ENST112334 pid:ENSP12345
strapply(i, paste(\\w*, ENSP, \\w*, sep = ), c, simplify = unlist)
This says to match any number (possibly zero) of word
characters followed by ENSP followed by more word
characters. c just returns the match without
On 08/07/2009 10:02 AM, Farrel Buchinsky wrote:
I have previously read R Installation and Administration. I read it
again. It does not help me
The relevant paragraph is below. But I need lower level instructions. Where
can I find them.
Follow the link. If Windows can't find tar, your toolset
Forgive my naivte, but how do I make windows find tar. In other words from
where do I issue the command and what is the command.
Farrel Buchinsky
Google Voice Tel: (412) 567-7870
On Wed, Jul 8, 2009 at 10:09, Duncan Murdoch murd...@stats.uwo.ca wrote:
On 08/07/2009 10:02 AM, Farrel Buchinsky
Thanks a lot for all your suggestions.
Regards,
Anupam
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Dear all,
I am trying to implement Simar Wilson's (2007) second algorithm and
have the following question: If I use a truncated regression on the mn
observations, how do I get fitted values for all n observations, instead
of for m observations, which is what the command fitted returns; I
Curious to know if recode can work with strings containing colons. I
haven't gotten it to work yet, but perhaps there is a way?
Donald Braman
http://www.culturalcognition.com/braman/
__
R-help@r-project.org mailing list
On Wed, Jul 8, 2009 at 9:40 AM, Henrique Dallazuanna www...@gmail.comwrote:
Its because '[[' accept only element, so you need use '[':
q[crossRsorted[,1]]
Henrique,
I figured out what q[crossRsorted[,1]] does - it produces q[i] for all i in
crossRsorted[,1]. Ok. Since a given index 'k' of
[[alternative HTML version deleted]]
__
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.html
and provide commented, minimal,
On Jul 8, 2009, at 8:51 AM, Whit Armstrong wrote:
I'm running a huge number of regressions in a loop, so I tried lm.fit
for a speedup. However, I would like to be able to calculate the
t-stats for the coefficients.
Does anyone have some functions for calculating the regression summary
stats
Hi,
I've been wondering how to write a function that will produce results
from multiple tests (eg. paired t-tests) for all or several variables
in some data frame. I'd like it to do t-test for each variable ('x')
in 'data' by 'y'. I'm stuck in here:
function(data,y) {
for (x in names(data)) {
I've created a short program to print a table of learning curve factors.
However, I cannot figure out how to format the table to:
1) Get rid of the [1]s in the first column and replace it with the values of
N.
2) Line up the first row with the factors (decimal fractions).
Thanks for any help.
Hey!
Could you please take a quick look at what I have done? Somehow I get wrong
results using the anova(lm()) combination compared to doing a two way ANOVA by
hand.
Running:
Data-read.table(Data.txt);
g-lm(ExM~S1*S2,Data);
anova(g);
Gives:
Analysis of Variance Table
Marc,
Thanks very much for your detailed reply. I'll give your code a try
and post back the time difference.
Cheers,
Whit
On Wed, Jul 8, 2009 at 10:50 AM, Marc Schwartzmarc_schwa...@me.com wrote:
On Jul 8, 2009, at 8:51 AM, Whit Armstrong wrote:
I'm running a huge number of regressions in
What is R's equivalent to a C-like #include to incorporate external files. I
have a 2k line function that is generated and need to include it at runtime
but not manage it as a package (as it changes hourly.) Any ideas?
[[alternative HTML version deleted]]
On 08/07/2009 10:13 AM, Farrel Buchinsky wrote:
Forgive my naivte, but how do I make windows find tar. In other words from
where do I issue the command and what is the command.
You need to install the toolset, and let the installer set your path.
Duncan Murdoch
Farrel Buchinsky
Google Voice
?source ?
On Wed, Jul 8, 2009 at 11:16 AM, Idgaradidga...@gmail.com wrote:
What is R's equivalent to a C-like #include to incorporate external files. I
have a 2k line function that is generated and need to include it at runtime
but not manage it as a package (as it changes hourly.) Any ideas?
Greetings!
I am looking for advice regarding the best way to compare GAMMs. I
know other model outputs return enough information for R's AIC, ANOVA,
etc. commands to function, but this is not the case with GAMM unless one
specifies the gam or lme portion. I know these parts of the gamm
On 08/07/2009 10:01 AM, Tymek Wo?odz'ko wrote:
Hi,
I've been wondering how to write a function that will produce results
from multiple tests (eg. paired t-tests) for all or several variables
in some data frame. I'd like it to do t-test for each variable ('x')
in 'data' by 'y'. I'm stuck in
You could use 'cat(sprintf())', C-style:
for (N in seq(2,10,2))
+ {if (N==2){cat(sprintf(%5d,
T(N,Lc)*100),\n)}else{cat(sprintf(%5.3f, T(N,Lc)), \n)}}
707580858995
0.490 0.562 0.640 0.722 0.810 0.902
0.398 0.475 0.562 0.657 0.762 0.876
0.343 0.422 0.512 0.614 0.729 0.857
Cvandy, is this close to what you need:
printT - function ( .seq = seq ( 2 , 10 , 2 ) ) {
+ x - t ( sapply ( .seq , T , Lc ) )
+ x - cbind (
+ .seq
+ , rbind (
+ format ( x [ 1 , ] * 100 )
+ , format ( x [ -1 , ] , digits = 3 )
+ )
+ )
+
On Wed, 2009-07-08 at 11:24 -0400, Paul Simonin wrote:
Greetings!
I am looking for advice regarding the best way to compare GAMMs. I
know other model outputs return enough information for R's AIC, ANOVA,
etc. commands to function, but this is not the case with GAMM unless one
specifies
Hi R-helpers,
I have a dataframe (called data) with trees in rows (n=100) and insect
species (n=10) in columns. My tree IDs are in a column called TREE and each
species has a column labeled SPEC1, SPEC2, SPEC3, etc...
I wish to randomize the values in my dataframe such that row and column
totals
Godmar,
I don't follow...
q - list ( )
q [[ 105 ]] - as.numeric ( c ( 0 , 0 , 1 ) )
q [[ 104 ]] - as.numeric ( c ( 1 , 1 , 1 ) )
q [[ 10 ]] - as.integer ( c ( 3 , 3 , 1 ) )
crossRsorted - data.frame ( i = c ( 105 , 104 , 10 ) )
q [ crossRsorted [ , 1 ] ]
[[1]]
[1] 0 0 1
Sorry, I mixed my toy example to recreate the problem with the actual data set.
The 'crossRsorted' in the toy and in the actual are different. See my
latest posting in this thread.
- Godmar
On Wed, Jul 8, 2009 at 11:55 AM, David Hufferdavid.huf...@csosa.gov wrote:
Godmar,
I don't follow...
Its safer just to temporarily add it to your path.
Unfortunately Rtools has a find command that conflicts with
the find command in Windows so if you add the Rtools
bin directory to your path permanently then you could
find other programs stop working. That actually happened
to me once and it
The mvrnorm function in the MASS package has an argument to force the generated
data to have the exact mean/variance structure as specified which when used
with a diagonal variance matrix will generate data that has a 0 (within round
off error) correlation in the data. No post processing by
I did some preliminary work on xslx (and docx and pptx) files
some time ago and will hopefully finish things off by the
end of summer. We can read these with a combination
of the Rcompression and XML package.
I have put versions of two packages (ROOXML and RExcelXML)
at
On Wed, Jul 8, 2009 at 8:54 AM, Mark Namtb...@gmail.com wrote:
Hi R-helpers,
I have a dataframe (called data) with trees in rows (n=100) and insect
species (n=10) in columns. My tree IDs are in a column called TREE and each
species has a column labeled SPEC1, SPEC2, SPEC3, etc...
I wish to
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Gabor Grothendieck
Sent: Wednesday, July 08, 2009 9:04 AM
To: Duncan Murdoch
Cc: R; Uwe Ligges; Farrel Buchinsky
Subject: Re: [R] Reading from Google Docs
Its safer just to
OK, it appears that the problem is the df.resid component of the biglm object.
Everything else is being updated by the update function except the df.resid
piece, so it is based solely on the initial fit and the chunksize used there.
The df.resid piece is then used in the computation of the
I have two dataframes, the first column of each dataframe is a unique id
number (the rest of the columns are data variables).
I would like to figure out how many times each id number appears in each
dataframe.
So far I can use:
length( match (dataframeA$unique.id[1], dataframeB$unique.id) )
Hi,
I am writing a script that will address columns using syntax like:
data_set[,1]
to extract the data from the first column of my data set, for example. This
code will be placed in a loop (where the column reference will be placed by
a variable).
What I also need to do is extract the
On Wed, Jul 8, 2009 at 8:41 AM,
mister_bluesmanmister_blues...@hotmail.com wrote:
Hi,
I am writing a script that will address columns using syntax like:
data_set[,1]
to extract the data from the first column of my data set, for example. This
code will be placed in a loop (where the column
On 08/07/2009 12:04 PM, Gabor Grothendieck wrote:
Its safer just to temporarily add it to your path.
Unfortunately Rtools has a find command that conflicts with
the find command in Windows so if you add the Rtools
bin directory to your path permanently then you could
find other programs stop
I'm looking for an R function that simply recodes a quantitative
variable into a number of classes according to specified break-points.
Obviously I can do this using nested ifelse() commands, but I want
to write it into a function where I can't pre-specify the number of
classes. Is
Does changing the path in Windows work in real time or does one need to
restart the computer for the changes to take effect.
Farrel Buchinsky
Google Voice Tel: (412) 567-7870
On Wed, Jul 8, 2009 at 12:04, Gabor Grothendieck ggrothendi...@gmail.comwrote:
Its safer just to temporarily add it to
Well, since we don't have Data.txt it is kind of hard for us to replicate what
you have done.
Here goes a guess as to what the problem may be.
Have you told R anywhere that S1 and S2 are factors with 6 levels rather than
numeric vectors? Or are you just hoping that the computer can read your
?source perhaps?
--- On Wed, 7/8/09, Idgarad idga...@gmail.com wrote:
From: Idgarad idga...@gmail.com
Subject: [R] #INCLUDE
To: r-help@r-project.org
Received: Wednesday, July 8, 2009, 11:16 AM
What is R's equivalent to a C-like
#include to incorporate external files. I
have a 2k line
On Jul 8, 2009, at 12:11 PM, Greg Snow wrote:
Well, since we don't have Data.txt it is kind of hard for us to
replicate what you have done.
Here goes a guess as to what the problem may be.
Have you told R anywhere that S1 and S2 are factors with 6 levels
rather than numeric vectors? Or
Something like this?
dataframeA - data.frame (
+ unique.id= c(1,1,3,3,3,5,7,7, 9)
+ , x1=rnorm(9)
+ , x2=rnorm(9)
+ , x3=rnorm(9)
+ )
dataframeB - data.frame (
+ unique.id= c(2,3,4,5,5,5,6,7,9,10,10)
+ , x4=rnorm(11)
+ , x5=rnorm(11)
+ , x6=rnorm(11)
+ )
Here is one approach (there are others, some that are probably better, but this
can get you started):
1. rearrange your data so that every insect is a single row with 2 columns: the
tree id and the species (this new dataset will have as many rows as the sum of
the values in the old dataset).
Try ?cut
Greg
rgun...@dijon.inra.fr wrote:
I'm looking for an R function that simply recodes a quantitative
variable into a number of classes according to specified break-points.
Obviously I can do this using nested ifelse() commands, but I want to
write it into a function where I can't
Richard,
More specifically,
x = c(0,10,5,1,9,6)
cut(x, breaks = c(-Inf, 2.5,7.5, Inf), labels = c(1, 2, 3))
#[1] 1 3 2 1 3 2
Hope that helps,
Greg
rgun...@dijon.inra.fr wrote:
I'm looking for an R function that simply recodes a quantitative
variable into a number of classes according to
Close...
The output I'm looking for is more like this:
output -
data.frame(unique.id=c(1,3,5,7,9),N.in.x=c(2,3,1,2,1),N.in.y=c(0,1,3,1,1))
The first column can be gotten using a small change to the first table line:
table ( x [ which ( x %in% x ) ] ) ##the 3rd x used to be a y
but I
Mark wrote:
Currently my data is one experiment per row, but that's
wasting space as most experiments only take 20% of the row
and 80% of the row is filled with 0's. I might want to make
the array more narrow and have a flag somewhere in the 1st
10 columns that says the
Hello!
I wonder if there is a typo in detrending code of spec.pgram in spectrum.R from
stats package.
One can see in the code
https://svn.r-project.org/R/trunk/src/library/stats/R/spectrum.R .
I am afraid there is a typo and the code should look like
if (detrend) {
t - 1L:N - (N +
Hooray! I got it to work. Here is what I think happened.My hold up was that
the tar command was not working. If you recall, when I issued the command:
tar xvfz RgoogleDocs_0.2.2-src.tar.gz
cmd.exe told me it could not be found
I reran Rtools29.exe which is the Rtools setup program which offered
On Jul 8, 2009, at 10:09 AM, tathta wrote:
I have two dataframes, the first column of each dataframe is a
unique id
number (the rest of the columns are data variables).
I would like to figure out how many times each id number appears in
each
dataframe.
So far I can use:
length( match
On Wed, Jul 8, 2009 at 10:51 AM, Michael A. Millermmill...@iupui.edu wrote:
Mark wrote:
Currently my data is one experiment per row, but that's
wasting space as most experiments only take 20% of the row
and 80% of the row is filled with 0's. I might want to make
the array
I am in the process of submitting a package to CRAN. R CMD check ran
successfully on the package on my local computer, using R version 2.1.1.
However, on the computers for CRAN (with version 2.10.0), the following errors
occurred:
Warning in parse_Rd(./man/predict.Rd, encoding = unknown) :
Dear all,
I am trying to implement Simar Wilson's (2007) second algorithm and
have the following question: If I use a truncated regression on the mn
observations, how do I get fitted values for all n observations, instead
of for m observations, which is what the command fitted returns; I
Hi,
I am analysing gene expression data using the heatmap.2 function in R and I
was wondering what is the formula of the raw z-score bar which shows the
colors for each pixel.
According to that post:
https://mailman.stat.ethz.ch/pipermail/r-help/2006-September/113598.html, it
is the
(actual
I'd like to write some objects (eg arrays) to a log file. cat() flattens them
out. I'd like them formatted as in 'print' but print only writes to stdout.
Is there a simple way to achieve this result?
Thanks
--
View this message in context:
From an email suggestion, here are two sample datasets, and my ideal output:
dataA - data.frame(unique.id=c(A,B,C,B),x=11:14,y=5:2)
dataB -
data.frame(unique.id=c(A,B,A,B,A,C,D,A),x=27:20,y=22:29)
## mystery operation(s) happen here
## ideal output would be:
dataA -
Hi,
I am trying to run some bootstraps with the boot package. When I run
it with 400 replicates it does it ok, but then I need to run the same
analysis but with 89, 86, 102 and 106 samples (for four different
environments), and then is when I get the error message:
mybootstrap -
1 - 100 of 172 matches
Mail list logo