Hi
option 3
library(reshape)
melt(d, id.vars=id)
Regards
Petr
Hi PJ,
Try
# some data
id - 1:20
m - matrix(sample(0:1, 200, TRUE), ncol = 10)
colnames(m) - paste('V', 1:10, sep = )
d - data.frame(id, m)
d
# option 1
cbind(rep(d$id, each = ncol(d)-1), matrix(unlist(t(d[,-1])),
On Nov 29, 2011, at 2:00 AM, Xu Wang wrote:
Why don't the following two commands work?
eval(parse(text=s))
eval(as.expression(s))
Hm, try to set an object s before calling.
Regards
Petr
__
R-help@r-project.org mailing list
Yes exactly what I want! Thank you very much for your help.
--
View this message in context:
http://r.789695.n4.nabble.com/cumsum-in-3d-arrays-tp4110470p4118432.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org
Hello Everybody,
I'm making a contigency table with a dataset which looks like:
ClassSizeMember1 Members2 Members3 etc.
1 2 A B 0
2 3 C D A
3
Yes, that worked for me. Thank you.
On Mon, Nov 28, 2011 at 10:16 PM, David Winsemius dwinsem...@comcast.netwrote:
On Nov 29, 2011, at 1:08 AM, Katrina Bennett wrote:
I'd like to sum a matrix only where the matrix meets a specific condition.
The matrix has 365 rows and about 50,000
David,
Did my reply get orphaned or are you trying to help me realize that asking
why something does not work is not a straightforward question? I'll try to
cover both bases.
I'll focus just on the first case that I don't understand. Suppose we have
s- ln(a+b)
a-1
b-2
eval(parse(text=s))
Error
On Mon, 28-Nov-2011 at 12:07PM +0100, Ana wrote:
| How can i replicate this in Linux:
| source(file.choose())
|
As the Mac people used to say ungrammatically: Think Different.
There are many ways of using Linux that can't be done in Windows and
we know nothing of your setup, so it's not
Hello
How come that the function md.pattern() from package 'mice' delivers a
warning when run over data sets with more than 31 variables?
library( 'mice' )
x - as.data.frame(
matrix(
sample( c(1:3, 1:3, 1:3, NA), 7000, repl=TRUE ),
ncol=35,
dimnames=list(NULL,
paste('V',
Le lundi 28 novembre 2011 à 12:07 +0100, Ana a écrit :
How can i replicate this in Linux:
source(file.choose())
I've tried source(tkgetOpenFile()) but with no luck
Try this instead (it works here):
source(tclvalue(tkgetOpenFile()))
Cheers
__
Hi
Did my reply get orphaned or are you trying to help me realize that
asking
why something does not work is not a straightforward question? I'll try
to
cover both bases.
I'll focus just on the first case that I don't understand. Suppose we
have
s- ln(a+b)
a-1
b-2
Dear Sir,
I am reviewing a group of patients who had a surgical procedure. The
histogram of the age frequency has a bimodal distribution. I am trying to
emphasise this by adding a distribution curve on the histogram.
Let's say the ages are 8, 9, 7, 6, 7, 8, 5, 4, 16, 12, 11, 10, 8, 7, 9
On 11/29/2011 06:30 PM, Xu Wang wrote:
David,
Did my reply get orphaned or are you trying to help me realize that asking
why something does not work is not a straightforward question? I'll try to
cover both bases.
I'll focus just on the first case that I don't understand. Suppose we have
s-
On Tue, Nov 29, 2011 at 1:58 AM, saschav...@gmail.com wrote:
Hello
How come that the function md.pattern() from package 'mice' delivers a
warning when run over data sets with more than 31 variables?
Because 2^31 is too large of a value to be represented as an integer.
The 15th line of
Hi,
Try lines function to get a distribution cruve:
X-c(8, 9, 7, 6, 7, 8, 5, 4, 16, 12, 11, 10, 8, 7, 9 )
hist(X, prob=TRUE)
lines(density(X))
Regrads
ML
Le 29/11/11 11:04, gwanme...@aol.com a écrit :
Dear Sir,
I am reviewing a group of patients who had a surgical procedure. The
Hello,
imagine the following experimental design:
Group - Value
control - 5
control - 6
control - 5
treated1 - 8
treated1 - 9
treated1 - 9
treated2 - 15
treated2 - 16
treated2 - 15
treated3 - 25
treated3 - 30
treated3 - 28
What I like to know is if I apply an ANOVA to this data and choose
Ana wrote:
How can i replicate this in Linux:
source(file.choose())
Hi Ana,
There is probably some way to do this with a shell script, but I am
unaware of it. If you have the marvelous Tcl-Tk scripting language on
your Linux box, you could write something like this:
#!/usr/bin/wish
#
Hi!
I have to import some TXT files into R, but the separation between the
columns are made with different blank spaces, but each file use the
same separation. Example:
31 104 5 0 11RUA SAO
SEBASTIAO 25
BAIRRO FILETO
Dear Community:
Thank you Michael, I did it as you said. However I still have a little
problem with this staff.
I try my lm's in my df1's variables. Let's say: lm1 - lm( df1$vi) ~ df1$v1
+ df1$v2)
Then I usally type: plot(lm1, 1:4)
I'd like to see in the plots obtained the name of the
Hi,
Anova compare the means of more than two groups, in your case anova test
H0 hypothisis
H0: means(control)=mean(tread1)=mean(tread2)=mean(tread3), if there is
at least one différence,
you can identify the mean difference between groups by using post hoc
test to testing your B suggestion.
@Olivier ETERRADOSSI :
I tried gdata to convert a (1x1) lower triangular matrix to full
matrix and got memory problems. Especially at this step :
upperTriangle(a) - lowerTrangle(a)
it consumes more than 3 GB . Any ideas on how to create full matrix with
efficient memory management ?
I typed the following command
*install.packages('bayesQR')'*
to install bayesQR(my R version is 2.14)
i am encountered the following error.
Installing package(s) into
‘C:/Users/knreddy.IDRBTVM/Documents/R/win-library/2.14’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository
Raphael,
This looks like fixed width format which you can read with read.fwf.
In fixed width format the columns are not separated by white space (or
other characters), but are identified by the positition in the file.
So in your file, for example the first field looks to contained in the
You can try downloading from the CRAN master (either a pre-packaged
binary or source code). There's fortran code you might need to compile
if you can't get the binary to work but it should be ok.
http://cran.r-project.org/web/packages/bayesQR/index.html
Michael
On Tue, Nov 29, 2011 at 6:03 AM,
Hi Dennis,
thank you very much. That works fine.
Is there a possibility that R continue even if one of the models is not
solvable? R currently terminates with an error message.
greetings
Christof
Am 27-11-2011 01:34, schrieb Dennis Murphy:
vars- c('y1', 'y2', 'y3')
# Function to create
Hi Jim, Hi Ken
Am 27-11-2011 00:00, schrieb jim holtman:
There is the 'pdftk' (PDF tool kit) that you will find on the web that
will do the job. I have used it to both combine and split out the
pages in the PDF file.
yes, thx. GUI tools like www.pdfsam.org do the job too. But is there a
Please cc the general list in your replies. I'm not a Windows expert
and there are many on this list who know far more about that OS than I
and can handle your question far more ably.
As I said I'm not a Windows expert so you may wish to consult the
R-Windows FAQ and the R Admin Installation
Look into tryCatch() for error handling.
Michael
On Tue, Nov 29, 2011 at 7:01 AM, Christof Kluß ckl...@email.uni-kiel.de wrote:
Hi Dennis,
thank you very much. That works fine.
Is there a possibility that R continue even if one of the models is not
solvable? R currently terminates with an
I think you are looking for the system() command.
Michael
On Tue, Nov 29, 2011 at 7:11 AM, Christof Kluß ckl...@email.uni-kiel.de wrote:
Hi Jim, Hi Ken
Am 27-11-2011 00:00, schrieb jim holtman:
There is the 'pdftk' (PDF tool kit) that you will find on the web that
will do the job. I have
Jan,
This is what I'm looking for! Very thanks!
On Tue, Nov 29, 2011 at 9:24 AM, Jan van der Laan rh...@eoos.dds.nl wrote:
Raphael,
This looks like fixed width format which you can read with read.fwf.
In fixed width format the columns are not separated by white space (or other
i have R 2.14 version.and i have downloaded bayesQR package from following
link
http://cran.r-project.org/web/packages/bayesQR/index.html
my OS is Windows7.i have downloaded Windows binary: bayesQR_1.3.zip file
from above link.I am new to R.
So please tell me what is the next step i have to
Hi
I have data from an experiment that used a repeated-measures factorial 2x2
design (i.e. each participant contributed data to both levels of both
factors). I need a non-parametric version of the repeated-measures factorial
ANOVA to analyse the data. SPSS only has non-parametric tests for
i have R 2.14 version.and i have downloaded bayesQR package from following
link
http:// http://cran.r-project.org/web/packages/bayesQR/index.ht ml
my OS is Windows7.i have downloaded Windows binary:bayesQR_1.3.zip file
from above link.I am new to R.
So please tell me what is the next step
Dear all, I am finding difficulty in the following, I would like to
create an empty matrix e.g. 10x10 of 0s and sequentially fill this
matrix with randomly placed a 1s until it is saturated. Producing 100
matrices of sequentially increasing density., This process needs to be
randomized 1000
Hi List,
Being new to R, I am trying to apply boot.stepAIC() for Model selection by
bootstrapping the stepAIC() procedure. I had gone through the discussion in
various thread on the variable selection methods. Understood the pros and
cons of various method, also going through the regression
Hi there,
I'm running R on windows 7 with Rstudio. Everyday I receive a zip file
where a bunch of half-hourly files are zipped together.
I then use
xx=unzip(ind)
to get xx, which consists of :
[1] ./2011/A20112961503.flx ./2011/A20112961503.log
./2011/A20113211730.slt ./2011/A20113211800.slt
Hi
I used to make heatmaps using following commands but now some thing
has changed as I get
library(gplots)
heatmap.
2(qtl.map,Rowv=F,dendrogram=column,col=colorRampPalette(c(blue,lightblue,black,black,yellow,red)),breaks=seq(-4.01,4.01,length.out=51),
density.info=none, )
following error and
use pattern matching (regular expressions): e.g.,
myFileNames[grepl(slt$, myFileNames)]
On Tue, Nov 29, 2011 at 8:36 AM, Mathew Brown
mathew.br...@forst.uni-goettingen.de wrote:
Hi there,
I'm running R on windows 7 with Rstudio. Everyday I receive a zip file
where a bunch of half-hourly
On 29.11.2011 13:15, R. Michael Weylandt wrote:
I think you are looking for the system() command.
... and you certainly do not want to use savePlot but rather use the
pdf() device directly.
Uwe Ligges
Michael
On Tue, Nov 29, 2011 at 7:11 AM, Christof Klußckl...@email.uni-kiel.de
On 29.11.2011 07:06, Indrajit Sengupta wrote:
What have you tried so far - can you explain? fitdistrplus package is the
default package for fitting distributions.
It is a contributed packages, and perhaps it is a good one (I do not
know), but calling it the *default* ... who defined that?
On 29/11/2011 8:36 AM, Mathew Brown wrote:
Hi there,
I'm running R on windows 7 with Rstudio. Everyday I receive a zip file
where a bunch of half-hourly files are zipped together.
I then use
xx=unzip(ind)
to get xx, which consists of :
[1] ./2011/A20112961503.flx ./2011/A20112961503.log
I have to admit I'm not entirely sure what your question is. How to
put a 1 in a random position in a matrix?
mat - matrix(0, 10, 10)
mat[sample(1:nrow(mat), 1), sample(1:ncol(mat), 1)] - 1
will do so, but if you need to fill a random position that is *currently zero*
then you'll need to wrap it
Let's see... you could:
- read the directions at http://cran.r-project.org or the longer ones
here http://cran.r-project.org/doc/manuals/R-admin.pdf
- look at the help for install.packages()
- actually look at the menus for R, as there's an install from local
file option there somewhere in the
example(heatmap.2) works for me, hence it is either your data, your
version of some package or your version of R that causes the problems,
we do not have information of any of these although the posting guide
asks you to provide this for each posting. So we cannot help.
Uwe Ligges
On
On Nov 29, 2011, at 2:30 AM, Xu Wang wrote:
David,
Did my reply get orphaned
All replies are orphaned. You are asked to include context if your
question relies on code that has previously been posted.
or are you trying to help me realize that asking
why something does not work is not
On 29.11.2011 13:09, narendarreddy kalam wrote:
i have R 2.14
2.14.0 I guess.
version.and i have downloaded bayesQR package from following
link
http:// http://cran.r-project.org/web/packages/bayesQR/index.ht ml
my OS is Windows7.i have downloaded Windows binary:bayesQR_1.3.zip file
Hi again,
Working with my real data and not with the little example i sent to the list i
discovered that segm_distance function from package pracma does not converge
to 0 in all cases, even if i increase the number of iteration to 10,000 for
example. It seems that it depends on the
Folks:
On Tue, Nov 29, 2011 at 6:24 AM, Sarah Goslee sarah.gos...@gmail.com wrote:
I have to admit I'm not entirely sure what your question is. How to
put a 1 in a random position in a matrix?
mat - matrix(0, 10, 10)
mat[sample(1:nrow(mat), 1), sample(1:ncol(mat), 1)] - 1
This is
On Nov 29, 2011, at 7:32 AM, Grant McDonald wrote:
Dear all, I am finding difficulty in the following, I would like to
create an empty matrix e.g. 10x10 of 0s and sequentially fill this
matrix with randomly placed a 1s until it is saturated. Producing 100
matrices of sequentially increasing
Hello,
can anybody tell me how to produce a plot like the one in
http://cran.r-project.org/web/packages/lme4/vignettes/Implementation.pdf
on page 13, Figure 6?
The data is stored in:
library(nlme)
data(Oats)
Cheers
--
View this message in context:
I normally use the raster or clim.pact pckages to read netcdf (.nc) files.
This has always worked out for me until this weekend every time i try to
read a .nc file i get the following error
Program: C:\Program Files\RStudio\bin\x64\rsession.exe File: posixio.c,
Line 417 Expression: offset = 0
Hi:
Here's one approach. I assume that your first 1000 matrices have a
single 1 in each matrix, the next set of 1000 have two 1's, ..., and
the last one has 99 1's. (No point in doing all 1's since they're all
constant.) If that's the case, then try the following.
# Each row represents a
Great, many thanks.
On 11/29/2011 3:09 PM, Duncan Murdoch wrote:
On 29/11/2011 8:36 AM, Mathew Brown wrote:
Hi there,
I'm running R on windows 7 with Rstudio. Everyday I receive a zip file
where a bunch of half-hourly files are zipped together.
I then use
xx=unzip(ind)
to get xx, which
hi @ all,
I have problem with creating a matrix for a cor() function.
I try to use the cor() function on a matrix to test the correlation between
each value in a column.
Maybe like corr(x, method = xyz).
My x has two columns maybe like this:
MEDIA VALUE
Car 23
Train26
Plane 25
Cab
Looks like a typical plot produced using the 'lattice' package. There
is plenty of documentation on the use of the package. Run some of the
examples.
On Tue, Nov 29, 2011 at 10:43 AM, syrvn ment...@gmx.net wrote:
Hello,
can anybody tell me how to produce a plot like the one in
I'm not sure how you mean to calculate correlation if you have a
single observation of each mediumcan you provide your data (or a
subset thereof) so we can see what you are actually working with and
if correlation makes sense.
Michael
On Tue, Nov 29, 2011 at 10:41 AM, Geophagus
On 29.11.2011 16:41, Geophagus wrote:
hi @ all,
I have problem with creating a matrix for a cor() function.
I try to use the cor() function on a matrix to test the correlation between
each value in a column.
Maybe like corr(x, method = xyz).
My x has two columns maybe like this:
MEDIA VALUE
-Original Message-
What I like to know is if I apply an ANOVA to this data and
choose the control group as the reference group (using the
relevel function) what groups exactly are compared? Are only
all treated groups 1, 2, 3 tested against the control group
or are all possible
Hi,
Unfortunately I do not have an answer to this question yet, but it is
something I'm currently examining. We're hoping to construct a template for
health economic evaluation using decision tree (eventually working up to
more complex modelling methodologies). I'll keep you posted on our
Do you have multiple data points for Car/Train etc?
And do you want to see if there are differences between in mean/medians these
modes of transport?
If so explore anova, kruskal-wallis
.
Date: Tue, 29 Nov 2011 16:57:57 +0100
From: lig...@statistik.tu-dortmund.de
To:
Hi:
This looks like the one:
library('lattice')
data(Oats, package = 'MEMSS')
print(xyplot(yield ~ nitro | Block, Oats, groups = Variety, type = c(g, b),
auto.key = list(lines = TRUE, space = 'top', columns = 3),
xlab = Nitrogen concentration (cwt/acre),
I'm using a histogram and want to overlay this onto a barplot. I need the
histogram lines to be thicker in order for it to stand out more on top of
the barplot. Is there a command in order to do this?
Thanks in advance.
--
View this message in context:
Hi Michael,
thank you so much for your fast reply.
On the image below there is an example of what I mean.
I need the correlation between the values on the fields with ?.
http://r.789695.n4.nabble.com/file/n4119734/corr_ex.png
But my source data is not in a matrix. It looks like the table in
I think everyone is worried about your data, not what a correlation
matrix is. Now I think you may be even more turned around: you want a
correlation between the values of the correlation matrix?
Just dput() your data object and copy it into your email and we'll see
if it's possible to calculate
Hi,
what's mean / in command:
betareg(inf~Grupo/Sexo, data=dados)
it's a effect nested?
--
Silvano Cesar da Costa
Departamento de Estatística
Universidade Estadual de Londrina
Fone: 3371-4346
__
I have a 10-column XLS file, with 2 date fields. As far as I can tell,
they were configured identically in Excel 2010. One of these fields
resembles 39406.577662037, whilst in Excel, it is shown as
2007-11-20 13:42:20. Applying as.Date() with the default format
doesn't do it. Any ideas as to what
A simple question, but I can't find something to do what I want:
Given: a vector of numbers, like
lambda - c(0, 0.005, 0.01, 0.02, 0.04, 0.08)
Desired: format them in minimal space for use as plot labels, ie,
without leading or tailing 0s. For this example:
lambdaf - c(0, .005, .01, .02,
Here's one way to get rid of leading zeros before the
decimal point:
gsub(^0\\., \\., as.character(lambda))
[1] 0.005 .01 .02 .04 .08
Sarah
On Tue, Nov 29, 2011 at 12:04 PM, Michael Friendly frien...@yorku.ca wrote:
A simple question, but I can't find something to do what I want:
If all else fails, read the help page. There are examples on
?as.Date of reading Excel dates.
But I don't believe the time you give. (0.577662037 is just before
13:51:50).
On Tue, 29 Nov 2011, Hasan Diwan wrote:
I have a 10-column XLS file, with 2 date fields. As far as I can tell,
they
.. and if you want to simultaneously handle possible multiple trailing
zeros (not sure whether this could even happen)
(somewhat but not completely tested)
lambda - c(0, 0.005, 0.01, 0.02, 0.04, 0.08)
gsub(^0(\\..*[^0])0*$,\\1,lambda)
[1] 0.005 .01 .02 .04 .08
Note that the
kerry1912 wrote on 11/29/2011 09:51:34 AM:
I'm using a histogram and want to overlay this onto a barplot. I need
the
histogram lines to be thicker in order for it to stand out more on top
of
the barplot. Is there a command in order to do this?
Thanks in advance.
This topic has been
On 29 November 2011 09:32, Prof Brian Ripley rip...@stats.ox.ac.uk wrote:
If all else fails, read the help page. There are examples on ?as.Date of
reading Excel dates.
I did, it seems there is either (a) a problem with my code, or (b) a
problem with the documentation. See below:
rawtimeColumn
You haven't indicated how you are accessing the Excel file, or whether it is an
XLS or XLSX file. It sounds like you might be using rcom or a dependent
package, in which case you may need to read the Excel COM interface
documentation more carefully. In any event, you can't expect as.Date to
You may also want to deal with a possible
leading negative sign:
lambda - c(0, 0.005, 0.01, 0.02, 0.04, 0.08,
-0.005, -0.01, -0.02, -0.04, -0.08, 1000)
gsub(^0(\\..*[^0])0*$,\\1, lambda)
[1] 0 .005 .01.02.04.08
[7] -0.005 -0.01 -0.02 -0.04 -0.08
Omitting the leading zero is dangerous, since the decimal point can disappear
in a poor hardcopy leading to later misinterpretation.
---
Jeff NewmillerThe . . Go Live...
On 29 November 2011 10:26, Jeff Newmiller jdnew...@dcn.davis.ca.us wrote:
You haven't indicated how you are accessing the Excel file, or whether it is
an XLS or XLSX file. It sounds like you might be using rcom or a dependent
package, in which case you may need to read the Excel COM interface
On 11/29/2011 01:39 PM, Hasan Diwan wrote:
On 29 November 2011 10:26, Jeff Newmillerjdnew...@dcn.davis.ca.us wrote:
For my part, I highly recommend exporting to CSV before importing to R.
Will look into doing so...
I don't think this point can be stressed enough. I have had too many
bad
I have a data frame with 1 factor, one date, and 37 numeric values:
str(waterchem)
'data.frame': 3525 obs. of 39 variables:
site : Factor w/ 64 levels D-1,D-2,D-3,..: 1 1 1 1 1 ...
$ sampdate : Date, format: 2007-12-12 2008-03-15 ...
$ CO3 : num 1 1 6.7 1 1 1 1 1 1 1 ...
$
Petr, thanks for pointing that out. Jim, you are exactly right! Thank you
for catching that. I did not realize in the other replies that they were
using log and not ln.
David, thank you for the lessons. I will improve my question asking skills.
Thanks to all,
Xu
On Tue, Nov 29, 2011 at 9:31
Dear R useres, got the following problem. Given the AggData (listed below)
I need to plot AggData[,2] vs time (AggData[,1]) for chosen 'rows'. Ive done
already:
plot(AggData[rows,2], xaxt='n')
axis(1,at=seq(1,length(rows),1),sub(,, AggData[rows,1]))
which works, but I need to list only chosen
Hi All,
When we run the command : summary ( newmod-gam(Dlq~ formula,family,,data) )
in R, the output would the effect of smoothness in R.
As of now to calculate the probability I am following the below approach:
1) Run the plot of the GAM , interpret the curves
2) Re Run the Regression
Good afternoon everybody,
I'm quite new in functions optimization on R and, whereas I've read
lot's of function descriptions, I'm not sure of the correct settings for
function like optimx and nlminb.
I'd like to minimize my parameters and the loglikelihood result of the
function.
My parameters
I have a model like this (Nelson and Siegel 1987)
img
src=http://r.789695.n4.nabble.com/file/n4120161/31f188c684764cd431619dbb59fed5ae.png;
border=0/
where tau and y are the maturities and yields, respectively, given to me in my
data file..
Hi Rich,
Try looking at:
levels(waterchem$SC)
There must be something in that column that is triggering R to read it
as character. Potential examples include using . to indicate
missing values or anything else that is not itself directly numeric.
You might also get some mileadge out of
On Nov 29, 2011, at 2:18 PM, Rich Shepard wrote:
I have a data frame with 1 factor, one date, and 37 numeric values:
str(waterchem)
'data.frame': 3525 obs. of 39 variables:
site : Factor w/ 64 levels D-1,D-2,D-3,..: 1 1 1 1 1 ...
$ sampdate : Date, format: 2007-12-12 2008-03-15 ...
On Nov 29, 2011, at 1:18 PM, Rich Shepard wrote:
I have a data frame with 1 factor, one date, and 37 numeric values:
str(waterchem)
'data.frame': 3525 obs. of 39 variables:
site : Factor w/ 64 levels D-1,D-2,D-3,..: 1 1 1 1 1 ...
$ sampdate : Date, format: 2007-12-12 2008-03-15 ...
You can see what the offending strings are with
with(waterchem, levels(SC)[is.na(as.numeric(levels(SC)))])
[1] - +
Warning message:
In eval(expr, envir, enclos) : NAs introduced by coercion
but it may be easiest to use the colClasses argument to read.table
to force that column to be
without knowing much about your data or the base plotting...
I'd use the library ggplot2.
First, you'll need to format your dates to POSIXct
AggData$time - as.POSIXct(AggData$time,format='%H:%M')
Then plotting is trivial.
ggplot(AggData,aes(x=time,y=value))+geom_points()
or +geom_line() if
By any chance is Kalem accessing the Internet through a proxy server which
requires a userid and password. There're are instructions in the Windows
FAQ on how to deal with this. He may need to obtain some information from
his IT department. Alternatively he could download the zip file and
I am calculating the mean of each column grouped by the variable 'id'.
I do this using aggregate, data.table, and plyr. My aggregate results
do not match the other two, and I am trying to figure out what is
incorrect with my syntax. Any suggestions? Thanks.
Here is the data.
myData -
The semantics for na.rm are different for aggregate than for the other options.
The former removes any rows that contain an NA prior to performing the
computation, the latter methods work column-wise. You have to decide which is
correct for your purposes.
look at just your data that is in that first id category and I bet you can
figure it out!
myData[myData$id=='0m11',]
var1 var2 id
10 30.79 32.15 0m11
11 30.79 32.39 0m11
12 30.94NA 0m11
aggregate performs the na.rm step on the entire row thus, a mean of 30.79.
data.table and plyr
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Hasan Diwan
Sent: Tuesday, November 29, 2011 10:16 AM
To: Prof Brian Ripley
Cc: R Project Help
Subject: Re: [R] Weird Excel Time Format
On 29 November 2011 09:32, Prof Brian
Dear R and statistics experts:
I have data of a behavioral experiment with the aim to investigate the effect
of a memory task on motor learning.
Question:
I would appreciate help in figuring out a possible formula to determine whether
motor learning across sessions differs between 2
On Wed, 2011-11-23 at 16:02 -0300, Alejo C.S. wrote:
Dear List,
I can'f figure how to add point labels in the next plot (example from
?taxondive help page):
library(vegan)
data(dune)
data(dune.taxon)
taxdis - taxa2dist(dune.taxon, varstep=TRUE)
mod - taxondive(dune, taxdis)
plot(mod)
On Thu, 2011-11-24 at 07:57 -0800, B77S wrote:
Try the daisy() function from the package cluster, it seems to be able to
handle NAs and non-dummy coded character variables
metaMDS(daisy(df, metric=gower))
That won't help the OP as the species scores (the species data, i.e. the
traits in this
On Thu, 2011-11-24 at 12:16 +, Edwin Lebrija Trejos wrote:
Hi, First I should note I am relatively new to R so I would appreciate
answers that take this into account.
I am trying to perform an MDS ordination using the function “metaMDS”
of the “vegan” package. I want to ordinate species
On Tue, 29 Nov 2011, Rich Shepard wrote:
Pointers on how to determine why this one variable has some values and
characters rather than as numerics are needed.
Joshua, Marc, David, Bill, Sarah, Bert, et al.:
Thank you all for the insights and ideas. It was a valuable lesson and it
helped
Hi all I have a function of log defined by y = log(1- exp(-a)), when
exp(-a) is greater, 1, it produce NaN. How can I remove this in R?
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Do you mean remove the NaNs? Try na.omit() or complete.cases() or many
other options.
If you mean you want the complex log, try
log(as.complex(1-exp(-a)))
Michael
On Tue, Nov 29, 2011 at 5:02 PM, Gyanendra Pokharel
gyanendra.pokha...@gmail.com wrote:
Hi all I have a function of log defined by
I managed to solve the problem myself without using this code.
thx
2011-11-24 12:26 keltezéssel, Kehl Dániel írta:
Dear Community,
I am trying to write code for the following problem.
Lets assume we have a beta distribution.
I know one quantile, lets say, 10% of the mass lies above .8, that
1 - 100 of 132 matches
Mail list logo