Re: [R] R and mysql

2007-07-23 Thread Uwe Ligges
Gabor Grothendieck wrote: > To run with R 2.5.1 you need the Windows binary of RMySQL 0.6-0 but > I don't think that that is available on either CRAN or BioConductor currently. But on the "CRAN extras" repository which is provided by Brian Ripley. You can even select it from the menu (and it sh

Re: [R] Data Set

2007-07-23 Thread Gavin Simpson
On Sun, 2007-07-22 at 21:51 -0700, Stephen Tucker wrote: > It turns out that "-" and " " (space) are not valid variable names. They are valid names, the problem is that they aren't very convenient to use, as the OP discovered, because they need to be quoted. Note that if using something like rea

[R] R and Excel

2007-07-23 Thread D ANIELLO CLAUDIA (MPS - 05966)
Dear all, Someone knows what's the command in R corresponding to the "vlookup" in Excel? Thank you in advance. Claudia [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

Re: [R] R and Excel

2007-07-23 Thread Bonfigli Sandro
> Dear all, > Someone knows what's the command in R corresponding to the "vlookup" in > Excel? > Thank you in advance. > Claudia > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide

[R] About infinite value

2007-07-23 Thread arigado
Hi everyone I have a problem about "infinite". If I type 10^308, R shows "1e+308" When I type 10^309, R shows "Inf" So, we know if a value is large than 1.XXXe+308, R will show "Inf" How can i do let the value, like "10^400" ,typed in R to show the word "1e+400" not "Inf" -- View this message i

[R] code optimization tips

2007-07-23 Thread baptiste Auguié
Hi, Being new to R I'm asking for some advice on how to optimize the performance of the following piece of code: > alpha_c <- function(lambda=600e-9,alpha_s=1e-14,N=400,spacing=1e-7){ > > k<-2*pi/lambda > ri<-c(0,0) # particle at the origin > x<-c(-N:N) > positions <- function(N) { >reps <

Re: [R] R and Excel

2007-07-23 Thread Mark Wardle
On 23/07/07, D ANIELLO CLAUDIA (MPS - 05966) wrote: > Dear all, > Someone knows what's the command in R corresponding to the "vlookup" in > Excel? > Thank you in advance. > Claudia > Dear Claudia, Depending on the dataset, it is possible to achieve the same results by using merge(). It is a diff

Re: [R] About infinite value

2007-07-23 Thread Peter Dalgaard
arigado wrote: > Hi everyone > > I have a problem about "infinite". > If I type 10^308, R shows "1e+308" > When I type 10^309, R shows "Inf" > So, we know if a value is large than 1.XXXe+308, R will show "Inf" > How can i do let the value, like "10^400" ,typed in R to show the word > "1e+400" not "

[R] Multilevel package: Obtaining significance for waba within-group correlation?

2007-07-23 Thread Bertolt Meyer
Hello everyone, I am employing the waba method from the multilevel package for obtaining a within-group correlation (Description: http://bg9.imslab.co.jp/Rhelp/R-2.4.0/src/library/multilevel/man/waba.html). Does anybody know a way or a calculation for obtaining a significance value for that co

Re: [R] Data Set

2007-07-23 Thread Stephen Tucker
My bad... corrections (semantic and otherwise) always appreciated. I'm still learning too. I also forgot the alternative of using make.names() instead of manually assigning 'more convenient' names. input <- "Mydata,S-sharif,A site 1,45,34 2,66,45 3,79,56" > dat <- read.csv(textConnection(input)

Re: [R] R2WinBUGS awkward to use

2007-07-23 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: > Hi All > > Does anyone know if I can avoid to use the write.model() function below? I > dont > want to do this. Can't bugs() do that automatically for me just by specifying > the 4th argument 'model'? Just I like I am also using the 'inits' object! > > If I use 'mo

[R] Rmpi installation error

2007-07-23 Thread Sunithak
Hello everybody, I am trying to install Rmpi on 64-bit HP-Proliant server. I am facing the following error: * Installing *source* package 'Rmpi' ... Try to find mpi.h ... Found in /usr/local/mpich-1.2.7p1/include Try to find libmpi or libmpich ... Found libmpich in /usr/local/mpich-1.2.7p1/lib Tr

Re: [R] Package design, placement of legacy functions

2007-07-23 Thread Martin Maechler
> "WA" == William Asquith <[EMAIL PROTECTED]> > on Sun, 22 Jul 2007 13:29:24 -0500 writes: WA> I have a function XOLD() from a nearly verbatim port of legacy WA> FORTRAN in a package. I have remplemented this function as XNEW() WA> using much cleaner native R and built-

Re: [R] using R for a reaction-time experiment

2007-07-23 Thread Mike Lawrence
Psych grad student here, R user for 3 years. Using R for experiments is likely not advisable as it has no fine control of display timing (ex synching stimuli to the screen refresh, etc). On recommendation of colleagues I'm learning the Python language, which has a module called 'pygame' tha

Re: [R] tagging results of "apply"

2007-07-23 Thread Bernzweig, Bruce \(Consultant\)
Thanks! I'll take a look at this. -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Sunday, July 22, 2007 7:24 AM To: Bernzweig, Bruce (Consultant) Cc: r-help Subject: Re: [R] tagging results of "apply" You don't need apply at all here. cor can already do that

Re: [R] tagging results of "apply"

2007-07-23 Thread Bernzweig, Bruce \(Consultant\)
Thanks for the clarification and help! -Original Message- From: Stephen Tucker [mailto:[EMAIL PROTECTED] Sent: Sunday, July 22, 2007 6:08 AM To: Bernzweig, Bruce (Consultant); r-help Subject: Re: [R] tagging results of "apply" Actually if you want to tag both column and row, this might a

Re: [R] using R for a reaction-time experiment

2007-07-23 Thread Christophe Pallier
I also recommend python/pygame for stimulus presentation. With the "psychopy" and "visionegg "toolboxes, you'll write a simple reaction time experiment in just a few lines. Be sure to save the data in a tabular format immediatly readable by R's " read.table". Alternatively, you might use "Rpy" to a

Re: [R] Multilevel package: Obtaining significance for waba within-group correlation?

2007-07-23 Thread Christophe Pallier
On 7/23/07, Bertolt Meyer <[EMAIL PROTECTED]> wrote: > > And another question: Does anybody know whether it is possible to save > individual group-mean-centered values into a new variable? If data is in 'x' and grouping factor is 'group', use "x - tapply(x, group, mean)[group]" For example: gro

[R] (no subject)

2007-07-23 Thread guowei
Dear Sir/Madam, I am running a R program for my SNP data. There are some errors when I run glm model in Hapassoc software, sometimes it is over the memory and sometimes the matrix is singular. I want to ingore these errors and excute the next statement. Otherwise, I have a big big trouble. Do you

[R] change labels in a dendrogram

2007-07-23 Thread Ana Marcela Florez Rueda
Hi all: I already made a dendrogram, I want to change the labels; In my data set there is one column with text that I want to set as the labels, any one can tellme how can I do it? Thanks, Ana Marcela [[alternative HTML version deleted]]

[R] extraction of vector elements to new list

2007-07-23 Thread Patrick Zimmermann
Dear R-community, I have got a list of vectors and would like to extract the first two elements of each vector to a new list. My list is of the style: my.list = list(c("a", "b", "c"), c("d", "e"), c("f", "g", "h", "i"), ...) #I want: new.list = list(c("a", "b"), c("d", "e"), c("f", "g"), ...)

[R] change text labels on a dendrogram

2007-07-23 Thread Ana Marcela Florez Rueda
Hi all: I already made a dendrogram, I want to change the labels; In my data set there is one column with text that I want to set as the labels, any one can tellme how can I do it? Thanks, Ana Marcela [[alternative HTML version deleted]] ___

Re: [R] code optimization tips

2007-07-23 Thread jim holtman
First question is why are you defining the functions within the main function each time? Why don't you define them once outside? On 7/23/07, baptiste Auguié <[EMAIL PROTECTED]> wrote: > Hi, > > Being new to R I'm asking for some advice on how to optimize the > performance of the following piece o

Re: [R] extraction of vector elements to new list

2007-07-23 Thread Henrique Dallazuanna
Hi, try lapply(my.list, function(x)head(x, n=2)) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O On 23/07/07, Patrick Zimmermann <[EMAIL PROTECTED]> wrote: > > Dear R-community, > > I have got a list of vectors and would like to extract the first two > elements of ea

Re: [R] About infinite value

2007-07-23 Thread Mendiburu, Felipe \(CIP\)
I think that the best thing is to work in logarithmic way, to avoid the limitations of the CPU. If y = 10^400, to do y=400*log(10), to change all you formulate to the logarithmic way and the final result to apply the antilogarithm. Felipe de Mendiburu. Professor of statistic Agrarian Nation

Re: [R] (no subject)

2007-07-23 Thread Thomas Lumley
It's a FAQ (Question 7.32) -thomas On Mon, 23 Jul 2007, [EMAIL PROTECTED] wrote: > > Dear Sir/Madam, > > I am running a R program for my SNP data. There are some errors when I run > glm model in Hapassoc software, sometimes it is over the memory and > sometimes the matrix is singular. I

Re: [R] extraction of vector elements to new list

2007-07-23 Thread Dimitris Rizopoulos
try this: new.list <- lapply(my.list, "[", i = 1:2) new.list I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/3370

Re: [R] R and Copula

2007-07-23 Thread copula
only mlcbbsel package. i have the first one. sorry copula wrote: > > new question: > > Where can I find the packages "mlCopulaSelection" and "mlcbbsel"? > > > > copula wrote: >> >> and one more time: >> >> thank you a lot for help!!! >> >> >> >> Julian Burgos wrote: >>> >>> Hi Meeryan

[R] Help on "looping problem" needed!

2007-07-23 Thread Ing. Michal Kneifl, Ph.D.
I am wondering if someone could help me out with following problem: I have written a for loop which generates a random normal distribution let us say 1000 times. When the restriction is met (mean<0.01), the loop stops, prints the mean value and plots a histogram. for(i in 1:1000) {

[R] problems with character objects and calls to list()

2007-07-23 Thread Neil Shephard
Hi All, I have a problem trying to get a set of columns recognised as a list and can't work out how to do it despite trawling through the mailing list archives, and docs. A short example... to.convert <- NULL n <- 6 for(x in 1:n){ to.convert <- paste(to.convert, paste((2 * x) -1, (2 * x), sep=

[R] persp and greek symbols in the axes labels

2007-07-23 Thread Nathalie Peyrard
Hello, I am plotting a 3D function using persp and I would like to use greek symbols in the axes labels. I have found examples like this one on the web: plot(0,0,xlab=expression(kappa[lambda]),ylab=substitute(paste(phi,"=",true,sigma),list(true=5))) this works well with plot but not with pe

Re: [R] code optimization tips

2007-07-23 Thread baptiste Auguié
Thanks for your reply, On 23 Jul 2007, at 15:19, jim holtman wrote: > First question is why are you defining the functions within the main > function each time? Why don't you define them once outside? > Fair enough! As said, I'm new to R and don't know whether it is best to define functions

Re: [R] extraction of vector elements to new list

2007-07-23 Thread Gabor Grothendieck
On 7/23/07, Dimitris Rizopoulos <[EMAIL PROTECTED]> wrote: > try this: > > new.list <- lapply(my.list, "[", i = 1:2) > new.list You could use the lapply above or lapply(my.list, head, 2) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/

Re: [R] Trend lines on a scatterplot matrix

2007-07-23 Thread Greg Snow
Start with something like this: pairs(iris, panel= function(x,y,...){ points(x,y); abline(lm(y~x))}) Then substitute in your data and extra args and any other enhancements you want. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcar

Re: [R] Help on "looping problem" needed!

2007-07-23 Thread Dimitris Rizopoulos
try this: tol <- 0.01 mat <- matrix(as.numeric(NA), 1000, 5) k <- 1 while(any(is.na(mat))){ x <- rnorm(1000, sd = 0.02) if (abs(mean(x)) < tol) { mat[, k] <- x k <- k + 1 } } abs(colMeans(mat)) par(mfrow = c(2, 3)) apply(mat, 2, hist) I hope it helps. Best, Dimi

Re: [R] change text labels on a dendrogram

2007-07-23 Thread Mendiburu, Felipe \(CIP\)
Dear Marcela. In the data, if column 1 has the names: rownames(data) <-data [, 1] data <- date [, - 1] now, to make a dendrogram greetings. Felipe de Mendiburu. Professor of statistic Agrarian National University -La Molina - PERU De: [EMAIL PROTECT

[R] doubt about options(graphics.record=T)

2007-07-23 Thread terra
Hi all, I've been using R under WindowsXP. So, where the R stores the graphic archives (don't saved) if I use the option options(graphics.record=T) inside of Rprofile.site file? Regards, -- /\/\/\/\ Jose Claudio Faria Brasil/Bahia/UESC/DCET Estatistica Exp

[R] cmdscale question

2007-07-23 Thread mister_bluesman
Hi. I know matrices that use distances between places works fine when using cmdscale. However, what about matricies such as: A B C D E A 01 23 12 9 B 10 10 12 3 C 23 10 0 23 4 D 12 12 23 0 21 E 9 34 21 0 i.e. matrices which do not represent phy

[R] SOS

2007-07-23 Thread Fabrice McShort
Hi all, Thanks for your help. Best regards Fabrice > Date: Fri, 20 Jul 2007 13:44:33 -0400> From: [EMAIL PROTECTED]> Subject: Re: > [R] SOS> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]> CC: > r-help@stat.math.ethz.ch> > ?round> x <- 1.2223> round(x,2)> [1] 1.22> --- > Fabrice McShort <[EMA

[R] Error in .jinit() : Cannot create Java Virtual Machine

2007-07-23 Thread James_londal
Hey I have seen a few posts asking this question and nobody has replied to them so I will ask it again. I have intalled java 1.6.0_22 on XP and rJava. I get the following msg when i run .jinit() "Error in .jinit() : Cannot create Java Virtual Machine". can anybody help? Java is working fi

[R] cmdscale question

2007-07-23 Thread mister_bluesman
Hi. I know matrices that use distances between places works fine when using cmdscale. However, what about matricies such as: A B C D E A 01 23 12 9 B 10 10 12 3 C 23 10 0 23 4 D 12 12 23 0 21 E 9 34 21 0 i.e. matrices which do not repres

Re: [R] using R for a reaction-time experiment

2007-07-23 Thread Greg Snow
Under windows you could use a graphics window for the stimulus and capture the keypress using the getGraphicsEvent function (this does not require hitting enter, but the graphics window needs to be the active window through the experiment). The playSudoku function in the sudoku package shows one e

[R] replacing double for loops with apply's

2007-07-23 Thread Young Cho
Hi, I am doing double for loops to calculate SDs with some weights and wondering if I can get rid of the outer for loop as well. I made a simple examples which is essentially what I am doing. Thanks for your help! -Young #-- # wtd.var is Hmis

[R] Question about cmdscale function

2007-07-23 Thread Andrew Wood
Hi. I know matrices that use distances between places works fine when using cmdscale. However, what about matrices such as: A B C D E A 01 23 12 9 B 10 10 12 3 C 23 10 0 23 4 D 12 12 23 0 21 E 9 34 21 0 i.e. matrices which do not represen

Re: [R] doubt about options(graphics.record=T)

2007-07-23 Thread Prof Brian Ripley
On Mon, 23 Jul 2007, terra wrote: > Hi all, > > I've been using R under WindowsXP. > > So, where the R stores the graphic archives (don't saved) if I use the option > options(graphics.record=T) inside of Rprofile.site file? The relevant help file (?windows) does tell you: please read it. -- Bri

Re: [R] Help with Dates

2007-07-23 Thread Hans-Peter
> I am taking an excel dataset and reading it into R using read.table. > (actually I am dumping the data into a .txt file first and then reading data > in to R). If you are on *windows* you could also try my xlsReadWrite package which contains some datetime functions. Exceldates (e.g. formatted as

Re: [R] Rmpi installation error

2007-07-23 Thread Martin Morgan
Sunitha -- I think Rmpi finds an MPICH1 installation, rather than MPICH2. Martin "Sunithak" <[EMAIL PROTECTED]> writes: > Hello everybody, > I am trying to install Rmpi on 64-bit HP-Proliant server. I am facing the > following error: > > > * Installing *source* package 'Rmpi' ... > Try to find mp

Re: [R] cmdscale question

2007-07-23 Thread Prof Brian Ripley
Why not do your homework instead of sending the same message three times? The references on the help page (especially Cox & Cox) will explain to you how scaling works on dissimilarities. There are better alternatives for non-Euclidean dissimilarities: see MASS (the book) and its supporting soft

[R] cca and cca.predict in vegan-what sort of prediction is possible

2007-07-23 Thread Neil Griffin
Hi All I am not clear quite how one could use cca from package vegan and the associated predict.cca to predict species abundance from environmental data (or if this is possible in a generalised way). In other words, can one derive a cca object based on known community data and use that to pr

Re: [R] doubt about options(graphics.record=T)

2007-07-23 Thread terra
>> Hi all, >> >> I've been using R under WindowsXP. >> >> So, where the R stores the graphic archives (don't saved) if I use the >> option >> options(graphics.record=T) inside of Rprofile.site file? > > The relevant help file (?windows) does tell you: please read it. Dear Prof. Ripley, I read t

[R] Questions concerning HOPACH

2007-07-23 Thread W. Katy
Hi, I have been tried to apply hopach HOPACH in R to cluster some genes. My data is a binary matrix. It works well for the whole set of genes (say, 1000 genes). Then I selected a subset of the genes (say 300 genes). These genes are selected based on the regression analysis results for each

[R] Cluster prediction from factor/numeric datasets

2007-07-23 Thread Scott Bearer
Hi all, I have a dataset with numeric and factor columns of data which I developed a Gower Dissimilarity Matrix for (Daisy) and used Agglomerative Nesting (Agnes) to develop 20 clusters. I would like to use the 20 clusters to determine cluster membership for a new dataset (using predict) but cann

[R] The 'REP' term in AMMI{agricolae}

2007-07-23 Thread CG Pettersson
Dear all, W2k, R 2.5.1 I am trying out the AMMI function in the agricolae package, to analyse the dependence of environment for a certain cultivar. The function responds to four basic variables: ENV Environment GEN Genotype REP Replication Y Response My question concerns the 'REP' term. When I

Re: [R] Can I test if there are statistical significance between different rows in R*C table?

2007-07-23 Thread Yvonnick NOEL
> With the totally non-committal P-value for Group 2 vs Group 3, > and the absolutely decisive P-value for Group 1 vs Groups 2&3, > there is no need whatever to bother with "multiple comparison" > complications. Note that you can test this as the formal comparison between three nested multinomial

[R] nnet 10-fold cross-validation

2007-07-23 Thread S.O. Nyangoma
Hi It clear that to do a classification with svm under 10-fold cross validation one uses svm(Xm, newlabs, type = "C-classification", kernel = "linear",cross = 10) What corresponds to the nnet? nnet(.,cross=10)? Regards __ R-help@stat.math.ethz.c

[R] Aggregate daily data into weekly sums

2007-07-23 Thread Jacques Wagnor
Dear Lest, I have a two-variable data frame as follows (the time peirod of the actual data set is 10 years): Date Amount 1 6/1/2007 1 2 6/1/2007 1 3 6/4/2007 2 4 6/5/2007 2 5 6/11/2007 3 6 6/12/2007 3 7 6/12/2007 3 8 6/13/2007 3 9 6/13/

Re: [R] doubt about options(graphics.record=T)

2007-07-23 Thread Prof Brian Ripley
On Mon, 23 Jul 2007, terra wrote: >>> Hi all, >>> >>> I've been using R under WindowsXP. >>> >>> So, where the R stores the graphic archives (don't saved) if I use the >>> option >>> options(graphics.record=T) inside of Rprofile.site file? >> >> The relevant help file (?windows) does tell you:

Re: [R] problems with character objects and calls to list()

2007-07-23 Thread Mark Lyman
> Really I'd like the call to list() to behave as though the text had > been entered directly so that you get > > > list(1:2, 3:4, 5:6) > [[1]] > [1] 1 2 > > [[2]] > [1] 3 4 > > [[3]] > [1] 5 6 > > eval(parse(text=paste("list(",to.convert,")",sep=""))) [[1]] [1] 1 2 [[2]] [1] 3 4 [[3]] [1

Re: [R] doubt about options(graphics.record=T)

2007-07-23 Thread Bert Gunter
Below is an explicit excerpt from the Help file. How, please is this "not clear enough?" Bert Gunter Genentech Nonclinical Statistics Recorded plot histories are of class "SavedPlots". They have a print method, and a subset method. As the individual plots are of class "recordedplot" they can be

[R] OT(slightly) - Tracking extended projects

2007-07-23 Thread James MacDonald
Hi all, Most of the analyses I do are short little once-and-done type things that are easily encapsulated in a .Rnw file. However, I sometimes end up with projects that take an extended amount of time. Usually these projects are not easily encapsulated in an .Rnw file, so I have been using a si

Re: [R] Cluster prediction from factor/numeric datasets

2007-07-23 Thread ngottlieb
Scott: Suggest you look at using Discrimnant Analysis (don't know which R package has it). Take the Clusters created, using Discrimnant Analysis, Get Fisher Scores for the clusters. Then you can take new dataset applying fisher scores to see what which defined cluster the new dataset will be clas

Re: [R] nnet 10-fold cross-validation

2007-07-23 Thread Wensui Liu
there is no such thing in nnet(), if i understand correctly. how hard it is to code one though? On 7/23/07, S.O. Nyangoma <[EMAIL PROTECTED]> wrote: > Hi > It clear that to do a classification with svm under 10-fold cross > validation one uses > > svm(Xm, newlabs, type = "C-classification", kernel

Re: [R] nnet 10-fold cross-validation

2007-07-23 Thread Prof Brian Ripley
Please read the documentation. nnet() is support software for a book, and that has explicit examples of this, which you will find in the scripts of the VR bundle (but I don't expect them to be comprehensible without the book). On Mon, 23 Jul 2007, S.O. Nyangoma wrote: > Hi > It clear that to

[R] extension of rnormp package

2007-07-23 Thread Iwona Szydłowska
Hello, I would like to ask You, how to generate random numbers from an exponential power family with a shape parameter p less than 1(p->0). I found the rnormp package, which can generate numbers from this distribution, but only for parameter less or equal 1. Regards, Iwona Szyd

Re: [R] Aggregate daily data into weekly sums

2007-07-23 Thread Henrique Dallazuanna
Hi, Perhaps you can try: > df Date Amount 1 2007-06-01 1 2 2007-06-01 1 3 2007-06-04 2 4 2007-06-05 2 5 2007-06-11 3 6 2007-06-12 3 7 2007-06-12 3 8 2007-06-13 3 9 2007-06-13 3 10 2007-06-18 4 11 2007-06-18 4 12 2007-06-25

Re: [R] doubt about options(graphics.record=T)

2007-07-23 Thread joseclaudio\.faria
Dears Gunter an Ripley, Ok, it is clear now! So, this topic can be closed. The problem was that the '.SavedPlots' object is generated in the user workspace only after a second plot inside a graphic device and it is visible only with ls(all.names=T). PS: obviously, this consumes memory. Many th

Re: [R] nnet 10-fold cross-validation

2007-07-23 Thread Saeed Abu Nimeh
do it manually. divide your dataset into 10 parts then train and test accordingly. Saeed S.O. Nyangoma wrote: > Hi > It clear that to do a classification with svm under 10-fold cross > validation one uses > > svm(Xm, newlabs, type = "C-classification", kernel = "linear",cross = > 10) > > What

Re: [R] Cluster prediction from factor/numeric datasets

2007-07-23 Thread Prof Brian Ripley
You can't do Discrimnant Analysis without a quadratic metric in a Euclidean space. 'Scott Bearer' explicitly does not want to assume that sort of distance measure. I am not sure how he used Agnes to form 20 clusters: it forms a hierarchical clustering, so it really is not possible to predict f

[R] M value and fold change

2007-07-23 Thread solie . alizadeh
Hi everyone, I have a question about M value and how it corresponds to gene expression fold change.I was wondering if for example M-value of -1.27 which means 0.41 in fold change, doesn it mean 0.41 of the control (in my experiment wild type? Better say does it mean this gene is down-regul

[R] M-value and fold change

2007-07-23 Thread solie . alizadeh
Hi everyone, I have a question about M value and how it corresponds to gene expression fold change.I was wondering if for example M-value of -1.27 which means 0.41 in fold change, doesn it mean 0.41 of the control (in my experiment wild type? Better say does it mean this gene is down-regulat

Re: [R] Aggregate daily data into weekly sums

2007-07-23 Thread antonio rodriguez
Or, z<-mydata #zoo object new.time <- as.Date(7 * floor(as.numeric(time(z))/7) + 7) z2 <- aggregate(z, new.time, mean) Henrique Dallazuanna escribió: > Hi, > > Perhaps you can try: > > >> df >> > Date Amount > 1 2007-06-01 1 > 2 2007-06-01 1 > 3 2007-06-04 2

[R] Function to separate effect in AOV

2007-07-23 Thread Ronaldo Reis Junior
Hi, I have a dummy question. Suppose that I have two explanatory variable, T1 (A, B) and T2 (C, D) and one response variable. > attach(dados) > tapply(Y,list(T1,T2),mean) CD A 2.20 10.2 B 2.22 20.26667 In this case, "A" and "B" inside "C" have no difference, but h

[R] odfWeave - How to Insert eps rather than png

2007-07-23 Thread Kuhn, Max
Rick, First, can you send details about your versions/OS using sessionInfo()? > If you create plots and use odfWeave to create an odf text document, the > default for figures is png bitmap graphics. The only way I've found to > insert eps graphics is to first create the eps graphic using the > po

Re: [R] code optimization tips

2007-07-23 Thread jim holtman
The quote "what is the problem you are trying to solve" is just part of my signature. I used to review projects for performance and architecture and that was the first question I always asked them. To pass the argument, if you notice the definition of apply: apply(X, MARGIN, FUN, ...) the ... a

Re: [R] replacing double for loops with apply's

2007-07-23 Thread Gabor Grothendieck
Please make the posting reproduciblea dn self-contained. I have added library(Hmisc) and set.seed(1) to satisfy that. Note that wts = wts/sum(wts) is unnecessary and try this: library(Hmisc) set.seed(1) x <- matrix(rnorm(200), 10, 20) f <- function(i) { if (i < 5) { 0 * x[1, ] } else

Re: [R] Aggregate daily data into weekly sums

2007-07-23 Thread Gabor Grothendieck
Try this. I have changed output format to yyy/mm/Weekw so its ordered. Lines <- "Date Amount 6/1/2007 1 6/1/2007 1 6/4/2007 2 6/5/2007 2 6/11/2007 3 6/12/2007 3 6/12/2007 3 6/13/2007 3 6/13/2007 3 6/18/2007 4 6/18/2007 4 6/25/2007

[R] Fitting exponential curve to data points

2007-07-23 Thread Andrew Clegg
Hi folks, I've looked through the list archives and online resources, but I haven't really found an answer to this -- it's pretty basic, but I'm (very much) not a statistician, and I just want to check that my solution is statistically sound. Basically, I have a data file containing two columns o

[R] capture numeric(0) with if statement

2007-07-23 Thread Alexander.Herr
Hi List, I am trying to capture the numeric(0) with an if statement, unsucessfully: test<-numeric(0) if(test == numeric(0)) print("test is", test) I get: Error in if (test == numeric(0)) print("test is", test) : argument is of length zero How can I capture the numeric(0) condition? A

Re: [R] capture numeric(0) with if statement

2007-07-23 Thread Richard M. Heiberger
> test <- numeric(0) > length(test) [1] 0 > if (length(test) == 0) print("length=0") [1] "length=0" __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-gu

Re: [R] capture numeric(0) with if statement

2007-07-23 Thread Gabor Grothendieck
Try: if (identical(test, numeric(0))) ... On 7/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi List, > > I am trying to capture the numeric(0) with an if statement, > unsucessfully: > > test<-numeric(0) > > if(test == numeric(0)) print("test is", test) > > I get: Error in if (test == num

Re: [R] extension of rnormp package

2007-07-23 Thread Prof Brian Ripley
On Mon, 23 Jul 2007, Iwona Szyd?owska wrote: > Hello, > I would like to ask You, how to generate random numbers from an > exponential power family with a shape parameter p less than 1(p->0). I > found the rnormp package, which can generate numbers from this > distribution, but only for paramet

Re: [R] Can I test if there are statistical significance between different rows in R*C table?

2007-07-23 Thread Yvonnick NOEL
zhijie zhang a écrit : > Dear Noel, > Your answers should be what i'm looking for. > Could u please show me the corresponding programs and the paper/book > for the theories? I usually fit these models as conditional Poisson loglinear models, so the glm() function may be used. On the equivalen

[R] Redirecting print output

2007-07-23 Thread Stan Hopkins
I see a rich set of graphic device functions to redirect that output. Are there commands to redirect text as well. I have a set of functions that execute many linear regression tests serially and I want to capture this in a file for printing. Thanks, Stan Hopkins [[alternative HTML v