[R] Multistratum blocking in AlgDesign

2015-04-02 Thread Marc Moragues
Hi all, I need to design an experiment very similar to the design described in the AlgDesign vignette on page 44. When I run the code on the vignette, I get the following error: > library(AlgDesign) > Rep<-gen.factorial(3,1,factor=1,varName="Rep") > Block<-gen.factorial(3,1,factor=1,varName="Blo

[R] Row-Column design

2008-08-15 Thread Marc Moragues Canela
Dear list, I am trying to do the randomization of several field experiments using a row/column design. I found some functions in the past, but I do not remember what package it was and don't seem to find it again . Any information about this will be appreciated. Thanks. Marc. [[alternat

Re: [R] how to read data from table based a condition

2008-04-10 Thread Marc Moragues
Xin hotmail.com> writes: > > y<-data[,7] > x<-data[,3] > > I want to know the mean of y if corresponding x=1. > Try this: mean(data[data[,3]==1,data[,7]) You can also look at ?subset. __ R-help@r-project.org mailing list https://stat.ethz.ch/m

Re: [R] Error on distance matrix

2008-01-11 Thread Marc Moragues
Thanks for your help! It is working fine. Marc. -Original Message- From: Gavin Simpson [mailto:[EMAIL PROTECTED] Sent: 10 January 2008 14:17 To: Marc Moragues Cc: r-help@r-project.org Subject: Re: [R] Error on distance matrix On Thu, 2008-01-10 at 10:48 +, Marc Moragues wrote: >

[R] Error on distance matrix

2008-01-10 Thread Marc Moragues
Hi, I am trying to calculate a distance matrix on a binary data frame using dist.binary() {ade4}. This is the code I run and the error I get: > sjlc.dist <- dist.binary(as.data.frame(data), method=2) #D = (a+d) / (a+b+c+d) Error in if (any(df < 0)) stop("non negative value expected in df") : mis

Re: [R] R brakes when submitting a query to MySQL

2007-12-18 Thread Marc Moragues
MySQL Is it your use of 'con' rather than 'con2' in dbSendQuery? -Kevin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc Moragues Sent: Tuesday, December 18, 2007 1:14 PM To: r-help@r-project.org Subject: [R] R brakes when submitti

[R] R brakes when submitting a query to MySQL

2007-12-18 Thread Marc Moragues
Hello, I would like to retrieve data stored in MySQL database, so I installed RMySQL package. I can successfully connect with the my database using the following code > dvr<-dbDriver("MySQL") > con2<-dbConnect(dvr,group="exbardiv") > mysqlDescribeConnection(con2) User: mmorag Host: localh