[R] double-indexed list

2010-05-07 Thread Remi SoftR
Dear all, d, d=1,...,10 is a day, h, h=1,...,24 is an hour and tt_dh(1),tt_dh(2),... is the arrival time of the 1st, 2nd etc client on day d during hour h. How can I make a double-indexed list ldh (indices are d and h) such that ldh[[d,h]] gives me arrival times? Many thanks, Remi [[alte

Re: [R] inquiry about Version 2.11.0

2010-05-07 Thread David Winsemius
On May 7, 2010, at 3:27 PM, Maria Clara Soto Velez wrote: Hello, I am trying to download the newest versión of R (R version 2.11.0), but I haven´t been able, because it seems that the file is not working properly. Details? Could you help me? Best Regards, María Clara Soto Vélez Colo

[R] inquiry about Version 2.11.0

2010-05-07 Thread Maria Clara Soto Velez
Hello, I am trying to download the newest versión of R (R version 2.11.0), but I haven´t been able, because it seems that the file is not working properly. Could you help me? Best Regards, María Clara Soto Vélez Colombia ms...@tarjetaexito.com.co 3199082 El

[R] randomForest: sampling with replacement?

2010-05-07 Thread Dimitri Liakhovitski
Hello! I know that as trees are constructed, the root node contains a bootstrap sample of data of the same size as original the data set. Would you please confirm that it is a bootstrap sample with replacement? I think it is - just wanted to make sure. Thank you very much! -- Dimitri Liakhovitsk

Re: [R] for loop

2010-05-07 Thread Joshua Wiley
Does this do what you are looking for? # cc <- list() #empty placeholder data <- list(a=rep(letters[1:5],2), b=letters[6:10]) #some example data data #print to screen for(i in names(data)) {cc[[i]] <- table(data[[i]])} cc # Josh On Fri, May 7, 2010 at 7:35 AM, n.

[R] Heatmap colored dendrogram

2010-05-07 Thread joonR
Hi, I searched for similar topics but never found what i'm looking for. I'm looking for something simple to color sub branches of a dendrogram selectively. To be better explain: I have an heatmap (generate with heatmap.2) and its dendrogram object, now I want to highlight a branch, e.g. dend=

Re: [R] help on hmisc

2010-05-07 Thread nvanzuydam
Hi, I thought I would just jump in on this as I am running an i7 as well. I use hmisc for the doBy functions and it would make a huge difference particularly with large data sets to run this on 64bit windows. I'm not sure how to compile from source and usually use the install.packages opti

[R] A problem importing a particular date from SQL Server

2010-05-07 Thread Carolina C. Castro
Hello, I'm importing a table from a database in SQL Server using the RODBC package (function sqlQuery()). But I've encountered a problem and I can't figure out the cause: in all records with date 1988-12-01 (-mm-dd) I receive an NA in R (when the date is OK in the SQL database). I tried chan

[R] overlap dot plots with box plots

2010-05-07 Thread ADM
Hi, I am new in R and would like to dot plot my real data points from different categories and put box plot overlapping. To give a feeling of the distribution of my data and the real values. I managed to that in excel but it takes a lot of time and it makes the program crash quite often! http://n

Re: [R] problem in using optim

2010-05-07 Thread Carol Gao
Hi Ravi, I have generated some random variable from generalised gamma distribution, and now I need to use them to test on my optim function. Please see below: *##Need to install package VGAM first before calling rggamma function library(VGAM) x <- rggamma(500,scale=gamma(1.5)/gamma(3.5),d=0.5,k=1

Re: [R] How to pass value to an argument in a function which is an argument to the main function

2010-05-07 Thread Jun Shen
David, Thanks for taking the time to look into it. I tried your method and it seems the "type" value wasn't really passed into my.boxplot.stats. If I manually changed type value in my.boxplot.stats, I did see a difference. Attached some data below. Thanks.

[R] Error in RImageJ

2010-05-07 Thread Fredy Mejía
Hello everybody, I'm running R under Mac OS 10.6.3 on a MacBook 2.16 GHz Intel Core 2 Duo. I've recently installed R 2.11.0 and the RImageJ library v. 0.1-142. When trying to follow the example given in the package manual and I get the following error: download.file( "http://www.google.fr/int

Re: [R] How to pass value to an argument in a function which is an argument to the main function

2010-05-07 Thread David Winsemius
On May 7, 2010, at 5:05 PM, David Winsemius wrote: On May 7, 2010, at 4:18 PM, Jun Shen wrote: David, my.boxplot.stats is modified from boxplot.stats (package grDevices) as follows. x is the original argument, I guess it's the data object for processing. I only added "type". Thanks. R

Re: [R] How to pass value to an argument in a function which is an argument to the main function

2010-05-07 Thread David Winsemius
On May 7, 2010, at 4:18 PM, Jun Shen wrote: David, my.boxplot.stats is modified from boxplot.stats (package grDevices) as follows. x is the original argument, I guess it's the data object for processing. I only added "type". Thanks. Right, but you should be assigning stats=my.boxplot.sta

Re: [R] Expressing z & t test data in a graph

2010-05-07 Thread Greg Snow
I use the ci.examp function (TeachingDemos package), but your question is so vague that I don't know if that will help you or not. If you can give more detail on what you want to accomplish then we have a better chance of being able to help. -- Gregory (Greg) L. Snow Ph.D. Statistical Data C

Re: [R] Errors when trying to open odfWeave documents

2010-05-07 Thread Max Kuhn
Paul, That line defines the bullet character. I don't think that you'll be missing much by excluding it. I think that to avoid these issues, you should use a utf-8 locale. The one that I get in my sessions is: locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 I'm sure that there a

Re: [R] Errors when trying to open odfWeave documents

2010-05-07 Thread Paul
Max Kuhn wrote: Can you send the rest of the sessionInfo() results? I'd like to see your locale. Thanks, Max Hi Max, I've put the locale info below. I wanted to let you know that I tried some things again today, starting from scratch, and found that if I just ran the odfWeave command,

Re: [R] How to pass value to an argument in a function which is an argument to the main function

2010-05-07 Thread Jun Shen
David, my.boxplot.stats is modified from boxplot.stats (package grDevices) as follows. x is the original argument, I guess it's the data object for processing. I only added "type". Thanks. Jun = > boxplot.stats function (x, coef = 1.5,

Re: [R] How to pass value to an argument in a function which is an argument to the main function

2010-05-07 Thread David Winsemius
On May 7, 2010, at 3:30 PM, Jun Shen wrote: Dear all, I constructed this function called my.boxplot.stats by replacing fivnum() with quantile() in function boxplot.stats(). So I can try different quantile methods in bwplot(). The problem is I couldn't pass different values to the "type"

Re: [R] median of two groups

2010-05-07 Thread Bert Gunter
Perhaps this might help clarify: sample A: 10 15 20 sample B: 12 15 22 Median of sample A = 15; median of sample B = 15. Sample medians are =. But: B-A differences are 2,0,2 with a median of 2. So the median difference does not equal the difference of the medians. Clarity in what yo

Re: [R] median of two groups

2010-05-07 Thread Joris Meys
On Fri, May 7, 2010 at 9:45 PM, cheba meier wrote: > Hi all, > > Thank you for your reply. > > if done properly! What does this mean? The R-code I have is using the > R-function sample without replacement. Am I doing this properly? > > median of the differences is zero! This is only valid if the

Re: [R] median of two groups

2010-05-07 Thread cheba meier
Hi all, Thank you for your reply. if done properly! What does this mean? The R-code I have is using the R-function sample without replacement. Am I doing this properly? median of the differences is zero! Does this mean if I run 1000 permutation and for each permutation I compute the median diffe

[R] How to pass value to an argument in a function which is an argument to the main function

2010-05-07 Thread Jun Shen
Dear all, I constructed this function called my.boxplot.stats by replacing fivnum() with quantile() in function boxplot.stats(). So I can try different quantile methods in bwplot(). The problem is I couldn't pass different values to the "type" argument to my.boxplot.stats, which in turn is an argu

[R] Problems with image.plot

2010-05-07 Thread fernando espindola
Hi R-users, I try to put image legend via image.plot function, but I do not know put this in log scale. The last line of code put legend in linear scale, but I want put this in log scale. This is a image of the ocean color web site 8-day composite L3 4KM. Anybody colud get me advise please. This i

[R] [R-pkgs] Release announcement: RSQLite 0.9-0 now with more BLOBs

2010-05-07 Thread Seth Falcon
RSQLite is an R package conforming to the R DBI interface that allows for interaction with SQLite. Version 0.9-0 highlights: * Support for SQLite BLOBs using raw vectors in R * New memory model for db connections allows for more familiar R semantics and no predefined limit to the number of co

Re: [R] help with RCMDR - can't get install to work

2010-05-07 Thread Duncan Murdoch
David Petersen wrote: Hi - I'm relatively new to R, and would appreciate a bit of advice on how to get off the ground. I'd like to install RCmdr to take advantage of the GUI. I've installed the package, and all the dependencies. I started X11. In my R-GUI window, I have checked the box next to

Re: [R] P values

2010-05-07 Thread Duncan Murdoch
Robert A LaBudde wrote: At 07:10 AM 5/7/2010, Duncan Murdoch wrote: Robert A LaBudde wrote: At 01:40 PM 5/6/2010, Joris Meys wrote: On Thu, May 6, 2010 at 6:09 PM, Greg Snow wrote: Because if you use the sample standard deviation then it is a t test not a z test.

Re: [R] for loop

2010-05-07 Thread Greg Snow
Don't use the assign function (it is not even clear what you are trying to do with it). Here is a better approach based on your code: > cc <- list() > d <- 1 > for (i in data) { + cc[[d]] <- table( ... + d <- d + 1 + } Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Cent

Re: [R] P values

2010-05-07 Thread Dennis Murphy
Which fortune is this? :) Dennis On Fri, May 7, 2010 at 10:08 AM, Charles Annis, P.E. < charles.an...@statisticalengineering.com> wrote: > Please let me quote an eminently sensible person, who observed that ... > > "p-values are dangerous, especially large, small, and in-between ones." > - Frank

[R] custom metric for dist for use with hclust/kmeans

2010-05-07 Thread Vivek Ayer
-- Forwarded message -- From: Vivek Ayer Date: Fri, May 7, 2010 at 10:17 AM Subject: Re: [R] custom metric for dist for use with hclust/kmeans To: Greg Snow Hi Greg, The pam function is exactly what I needed. I can now create my own distance matrix, run as.dist on it and pass i

Re: [R] P values

2010-05-07 Thread Charles Annis, P.E.
Please let me quote an eminently sensible person, who observed that ... "p-values are dangerous, especially large, small, and in-between ones." - Frank E Harrell Jr., Prof. of Biostatistics and Department Chair, Vanderbilt University Charles Annis, P.E. charles.an...@statisticalengineering.co

[R] help with RCMDR - can't get install to work

2010-05-07 Thread David Petersen
Hi - I'm relatively new to R, and would appreciate a bit of advice on how to get off the ground. I'd like to install RCmdr to take advantage of the GUI. I've installed the package, and all the dependencies. I started X11. In my R-GUI window, I have checked the box next to RCmdr in the Package Ma

Re: [R] median of two groups

2010-05-07 Thread Joris Meys
depends on how you interprete "absolute median difference". Is that the absolute difference of the medians, or the median of the absolute differences. Probably the latter one, so you would be right. If it's the former one, then it is testing whether the difference of the medians is zero. Cheers Jo

Re: [R] median of two groups

2010-05-07 Thread Thomas Lumley
On Fri, 7 May 2010, cheba meier wrote: Dear Thomas, I have been running simulations in order me to understand this problem! I have found something online where the absolute median difference is computed and permutations are ran to compute a p-value. Is such a test (if I can call it a test) test

[R] Help - Getting ODBC connection to work with MySQL

2010-05-07 Thread David Petersen
Hi, trying to get ODBC to work with MySQL on my Mac running Leopard. I followed the instructions here: www.stats.ox.ac.uk/pub/bdr/RODBC-manual.pdf - setting up iODBC, creating a connection to MySQL (previously installed) which I tested with the iODBC tester as well as my MySQL GUI client. So far,

Re: [R] How to sort a grouped barchart?

2010-05-07 Thread Greg Snow
See my recent reply under the subject "bar order using lattice barchart()" Running this code before doing your plot: barley$variety <- reorder(barley$variety, barley$yield, function(x) x[2] ) will cause the bars in all the plots to be reordered such that 1931 Waseca is increasing, is that what

Re: [R] Find the three best values in every row

2010-05-07 Thread Alfred-Schulze
-Ursprüngliche Nachricht- Von: S Ellison Gesendet: 07.05.2010 16:44:08 An: r-help@r-project.org,alfred-schu...@web.de Betreff: Re: [R] Find the three best values in every row >Hmm... > > set.seed(17*11) > d<-data.frame(africa=sample(50, 10), > europe= sample(50, 10

Re: [R] Find the three best values in every row

2010-05-07 Thread Gabor Grothendieck
Using d from the post of S Ellison, try val <- apply(d, 1, function(x) head(sort(x, decreasing = TRUE), 3)) co <- apply(d, 1, function(x) head(names(d)[order(x, decreasing = TRUE)], 3)) data.frame(values = c(val), countries = c(co), row = c(col(val))) The first line gives a matrix of the three hi

Re: [R] P values

2010-05-07 Thread Robert A LaBudde
At 07:10 AM 5/7/2010, Duncan Murdoch wrote: Robert A LaBudde wrote: At 01:40 PM 5/6/2010, Joris Meys wrote: On Thu, May 6, 2010 at 6:09 PM, Greg Snow wrote: Because if you use the sample standard deviation then it is a t test not a z test. I'm doubting that seriously... You calculate n

Re: [R] Any way to apply TWO functions with tapply()?

2010-05-07 Thread hadley wickham
> As pointed out to me offline, data.table should be added to the list > of relevant packages as well.  Its primary advantage is for large data > sets as it is very fast.  Its interface does take some getting used to > but its most recent version on CRAN does have several vignettes which > should e

Re: [R] Find the three best values in every row

2010-05-07 Thread Patrick Hausmann
Hello Alfred, I found the solution from S. Ellison (https://stat.ethz.ch/pipermail/r-help/2010-May/238158.html) really inspiring. Here I am using tail and the library 'plyr': set.seed(17*11) d<-data.frame(africa=sample(50, 10), europe= sample(50, 10), n.americ

Re: [R] median of two groups

2010-05-07 Thread Greg Snow
Permutation tests are real tests (if done properly), but one subtle but important note: The null hypothesis being tested is that the 2 distributions are identical, the medians being equal is part of that, but the null includes more than just that assumption. -- Gregory (Greg) L. Snow Ph.D. St

Re: [R] Transforming sequence data into numeric values.

2010-05-07 Thread Greg Snow
Here is one possibility: tmp <- sample(c('R','L'), 100, replace=TRUE) tmp2 <- rle(tmp) tmp3 <- sapply( 1:length(tmp2$values), function(i) paste( rep(tmp2$values[i], tmp2$lengths[i]), collapse='') ) table(tmp3) the rle function computes the run lengths, the sapply line converts those results i

Re: [R] getting a weighted average from a table

2010-05-07 Thread Phil Spector
dat = c(1.3,1.2,1,3.3,3.3,5.1,1.1,1.2,0) tt = table(dat) sum(as.numeric(names(tt))*tt)/ sum(tt) - Phil Spector Statistical Computing Facility Department of Statistics

Re: [R] writing string values from a matrix to a file without enclosing quotes

2010-05-07 Thread Jorge Ivan Velez
Hi Nevli, Take a look at the "quote" argument under ?write.table. In your case write.table(x, "output filename", col.names = F, row.names = F, quote = FALSE) should do what you want. HTH, Jorge On Fri, May 7, 2010 at 11:18 AM, Nevil Amos <> wrote: > I am trying to format data for the Genela

Re: [R] Any way to apply TWO functions with tapply()?

2010-05-07 Thread Gabor Grothendieck
As pointed out to me offline, data.table should be added to the list of relevant packages as well. Its primary advantage is for large data sets as it is very fast. Its interface does take some getting used to but its most recent version on CRAN does have several vignettes which should ease learni

[R] writing string values from a matrix to a file without enclosing quotes

2010-05-07 Thread Nevil Amos
I am trying to format data for the Geneland package I need to write a series of paired numbers and paired "000" to a plain ascii file without surrounding the numerals with quotes, the original data is in a matrix formatted paired strings, and written to file using write.table(x,"output filename",

Re: [R] Any way to apply TWO functions with tapply()?

2010-05-07 Thread Gabor Grothendieck
Actually I have never mentioned the majority of the items in this post in that form. remix only appeared yesterday on CRAN and as pointed out to me offline the binaries are still not there (but should be automatically built shortly). On Fri, May 7, 2010 at 9:49 AM, David Winsemius wrote: > That

Re: [R] getting a weighted average from a table

2010-05-07 Thread SHANE MILLER, BLOOMBERG/ 731 LEXIN
Hi, I have a very simple request (I think). I have a vector/array, > c <- c(1.3,1.2,1,3.3,3.3,5.1,1.1,1.2,0) I produce a reverse sorted table/histogram with it, > t = rev(sort(table(c)) > t c 3.3 1.2 5.1 1.3 1.1 1 0 2 2 1 1 1 1 1 I would now like to get the labe

[R] [R-pkgs] Release of optimbase, optimsimplex and neldermead packages

2010-05-07 Thread Sebastien Bihorel
Dear R users, I am pleased to announce the release of three new R packages: optimbase, optimsimplex, and neldermead. - optimbase provides a set of commands to manage an abstract optimization method. The goal is to provide a building block for a large class of specialized optimization methods. This

[R] [R-pkgs] Release of the scaRabee package

2010-05-07 Thread Sebastien Bihorel
Dear R-users, I am pleased to announce the release of scaRabee, a new R package which constitutes a toolkit for modeling and simulation in the field of pharmacometrics. It was designed as a user-friendly interface to create and modify model scripts, define system observations and inputs, and run s

Re: [R] help on hmisc

2010-05-07 Thread Joris Meys
Zach, The R-gurus will correct me when I'm wrong, but as far as my very limited experience goes, the 64bit version only gives you an advantage when throwing around huge datasets or doing very memory-intensive tasks. For most of the things I do with R, there is no difference at all. Now the differe

Re: [R] for loop

2010-05-07 Thread Joshua Wiley
Hello, It depends a bit on what 'data' is, but look at... cc <- list() d <- 1 data <- expression(d1, d2, d3) for(i in data) {cc[[paste(i)]] <- table(i, subsample$vD31NADD} if 'data' is a character vector or of numbers, you would just need for(i in data) {cc[[i]] <- table(i, subsample$vD31NADD}

Re: [R] Problem with install.packages(); getting out-of-date version.

2010-05-07 Thread Uwe Ligges
Am 07.05.2010 16:02, schrieb Duncan Murdoch: Rolf Turner wrote: I recently tried to install the latest version of spatstat, from CRAN, using the install.packages() function. It proceeded to install version 1.17-5 of spatstat, although the current version is 1.18-4. One reason this could happ

Re: [R] Find the three best values in every row

2010-05-07 Thread S Ellison
Hmm... set.seed(17*11) d<-data.frame(africa=sample(50, 10), europe= sample(50, 10), n.america= sample(50, 10), s.america= sample(50, 10), antarctica= sample((1:50)/20, 10) ) #Get three top from each row t(apply(d,1

[R] for loop

2010-05-07 Thread n.via...@libero.it
Dear list, in the following loop im generating objects of type table. What I would like to do is to put all those objects together in a list (that i called cc).I did this but the result is not what i espect to get: cc=list() d=1 for (i in data) { cc=list(cc,assign(paste("n",d,sep=""),table(i

Re: [R] Problem with nested functions - functions nested too deeply in source code

2010-05-07 Thread Duncan Murdoch
Duncan Murdoch wrote: Maximilian Kofler wrote: Duncan Murdoch gmail.com> writes: I doubt if that was the error message. More likely you saw Error: evaluation nested too deeply: infinite recursion / options(expressions=)? Exactly this was the error message I recieve

Re: [R] getting a weighted average from a table

2010-05-07 Thread David Winsemius
On May 7, 2010, at 9:42 AM, SHANE MILLER, BLOOMBERG/ 731 LEXIN wrote: Hi, I have a very simple request (I think). I have a vector/array, c <- c(1.3,1.2,1,3.3,3.3,5.1,1.1,1.2,0) I produce a reverse sorted table/histogram with it, t = rev(sort(table(c)) t c 3.3 1.2 5.1 1.3 1.1 1 0

Re: [R] How to re-arrange data in R

2010-05-07 Thread Marshall Feldman
Hi Zablone, I have a few questions about your data, but think the reshape package is ultimately what you want. So just look at it and see if you can get it to do what you want. Marsh Feldman On Fri, 7 May 2010 01:21:09 -0700 , Zablone Owiti wrote: > Dear users, > > I have monthly station

Re: [R] Problem with install.packages(); getting out-of-date version.

2010-05-07 Thread Duncan Murdoch
Rolf Turner wrote: I recently tried to install the latest version of spatstat, from CRAN, using the install.packages() function. It proceeded to install version 1.17-5 of spatstat, although the current version is 1.18-4. One reason this could happen is that the package depends on an R versi

[R] for loop

2010-05-07 Thread n.via...@libero.it
Dear list, in the following loop im generating objects of type table. What I would like to do is to put all those objects together in a list (that i called cc).I did this but the result is not what i espect to get: cc=list() d=1 for (i in data) { cc=list(cc,assign(paste("n",d,sep=""),table(i,

Re: [R] Problem with nested functions - functions nested too deeply in source code

2010-05-07 Thread Duncan Murdoch
Maximilian Kofler wrote: Duncan Murdoch gmail.com> writes: I doubt if that was the error message. More likely you saw Error: evaluation nested too deeply: infinite recursion / options(expressions=)? Exactly this was the error message I recieved This isn't a case of the sourc

Re: [R] Any way to apply TWO functions with tapply()?

2010-05-07 Thread David Winsemius
That was a superb answer to a question that has already appeared in various forms on r-help at least 4 times that I can remember just this week. I think your text could be appended without much editing into the FAQ. It could then have its own hyperlink, and you wouldn't need to type it aga

Re: [R] getting a weighted average from a table

2010-05-07 Thread SHANE MILLER, BLOOMBERG/ 731 LEXIN
Hi, I have a very simple request (I think). I have a vector/array, > c <- c(1.3,1.2,1,3.3,3.3,5.1,1.1,1.2,0) I produce a reverse sorted table/histogram with it, > t = rev(sort(table(c)) > t c 3.3 1.2 5.1 1.3 1.1 1 0 2 2 1 1 1 1 1 I would now like to get the labe

[R] Find the three best values in every row

2010-05-07 Thread Alfred Schulze
Hello, i have a dataframe with the GDP for different Country (in the columns) and Years (in the rows). Now i want for every year the best three values, if possible with name of the countries (columnnames). For the best it's no problem but for the other two values. Thanks,

Re: [R] Understanding of survfit.formula output

2010-05-07 Thread Terry Therneau
You have not given enough information to reproduce your problem, so it is difficult to say. Most of the time results such as you display will be due to a data error. It is possible to get a crossing result, however. subject 1 2 3 4 5 - Death 10 - -

Re: [R] glm contrasts

2010-05-07 Thread Max Kuhn
There is the contrast package On Fri, May 7, 2010 at 5:15 AM, Natalie Holt wrote: > Hi, > > I have some data on the effect of cycle shape (categorical) and frequency > (continuous) on the efficiency of muscle contraction. My minimum adequate > model is: > > m15<-glm(efficiency~cycle.shape*freq, f

Re: [R] extract required data from already read data

2010-05-07 Thread David Winsemius
On May 7, 2010, at 1:04 AM, Mohan L wrote: Hi all, I have data like this: sample <- read.csv(file="sample.csv",sep=",",header=TRUE) sample stdate Domainsex age Login 1 01/11/09xxx FeMale 25 2 2 01/11/09xxx FeMale 35 4 3 01/11/09xxx Male 1830 4 01/11

Re: [R] problem in using optim

2010-05-07 Thread Ravi Varadhan
It probably means that your parameters are taking on values that are infeasible. You may have to impose constraints on your parameters to get a solution (e.g. bounds constraints). If you need better help, you have to send us a minimal, self-contained, reproducible example. Ravi. -Original Me

Re: [R] What is the best way to have "R" output tables in an MS

2010-05-07 Thread Frank E Harrell Jr
On 05/07/2010 07:45 AM, John Kane wrote: Let me see. I open a Word document and type, Dear Dr.Harrell, I open a new LaTeX document and type something like: \documentclass[10pt,a4paper]{letter} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \addres

Re: [R] How to sort a grouped barchart?

2010-05-07 Thread David Winsemius
On May 6, 2010, at 9:01 PM, LeandroTV wrote: Hi, I have a barchart very similar to the example on the function documetation, however, I want to sort the bars according one group in one panel. Reminding: library(lattice) barchart(yield ~ variety | site, data = barley, groups = year

Re: [R] Any way to apply TWO functions with tapply()?

2010-05-07 Thread Gabor Grothendieck
tapply does handle functions with vector outputs, e.g. using the built in CO2 data set the following data frame is returned: > f <- function(x) data.frame(mean = mean(x), sd = sd(x)) > do.call(rbind, tapply(CO2$uptake, CO2$Type, f)) mean sd Quebec 33.5 9.67 Mississippi 20.9 7.82

Re: [R] What is the best way to have "R" output tables in an MS

2010-05-07 Thread John Kane
Let me see. I open a Word document and type, Dear Dr.Harrell, I open a new LaTeX document and type something like: \documentclass[10pt,a4paper]{letter} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \address{your name and address} \signature{your s

Re: [R] median of two groups

2010-05-07 Thread Joris Meys
That's a robust way of obtaining a p-value, and can be classified as a test. The important trick here is to take into account that you have two tails in a distribution. If the p-value is calculated taking both tails into account, then it indeed tests the null hypothesis that median group1 - median

[R] [R-pkgs] data.table 1.4.1 now on CRAN

2010-05-07 Thread Matthew Dowle
data.table is an enhanced data.frame with fast subset, fast grouping and fast merge. It uses a short and flexible syntax which extends existing R concepts. Example: DT[a>3,sum(b*c),by=d] where DT is a data.table with 4 columns (a,b,c,d). data.table 1.4.1 : * grouping is now 10+ times faster

Re: [R] What is the best way to have "R" output tables in an MS Word format? (shaping R core)

2010-05-07 Thread John Kane
For simply doing tables xtable has done some nice work for me. --- On Fri, 5/7/10, Joris Meys wrote: > From: Joris Meys > Subject: Re: [R] What is the best way to have "R" output tables in an MS Word > format? (shaping R core) > To: "Duncan Murdoch" > Cc: r-h...@stat.math.ethz.ch > Received:

Re: [R] reading formatted txt file into a data frame

2010-05-07 Thread Tony B
Thank you all for your help, this has solved my problem. My main problem with using gsubfn was that i was getting confused by the square brackets in [^]]+[^] but I now have a much better understanding of what this means. Cheers! Tony Breyal On 6 May, 19:38, Gabor Grothendieck wrote: > This is

Re: [R] Problem with nested functions - functions nested too deeply in source code

2010-05-07 Thread Maximilian Kofler
Duncan Murdoch gmail.com> writes: > I doubt if that was the error message. More likely you saw > > Error: evaluation nested too deeply: infinite recursion / > options(expressions=)? Exactly this was the error message I recieved >This isn't a case of the source being nested to deeply, but r

Re: [R] Cluster procedure using geographical neighborhood

2010-05-07 Thread Martin Maechler
Dear Dario Sacco, > "DS" == Dario Sacco > on Thu, 06 May 2010 17:45:30 +0200 writes: DS> Dear Dr. Maechler, DS> I am an agronomist and a researcher at the University of Turin. I am DS> also teaching "Applied statistics", then I have some knowledge in DS> Statistics,

Re: [R] Any way to apply TWO functions with tapply()?

2010-05-07 Thread Fredrik Karlsson
Hi, What you can do is define your own function which takes a vector of values, computes the statistics you want and then returns a string which displays the output the way you want it. Then use this function in your tapply call. like (untested) mySummary <- function(x) { paste(mean(x),sd(x),

Re: [R] median of two groups

2010-05-07 Thread cheba meier
Dear Thomas, I have been running simulations in order me to understand this problem! I have found something online where the absolute median difference is computed and permutations are ran to compute a p-value. Is such a test (if I can call it a test) tests the null hypothesis that median group 1

Re: [R] help in R

2010-05-07 Thread Joris Meys
http://www.r-project.org/ : see under "Manuals" and "FAQ" On Fri, May 7, 2010 at 11:44 AM, david sabine wrote: > Hi all, > what are the books that i can read them for begenning with R ? > thanks in advance > > David > >[[alternative HTML version deleted]] > > _

Re: [R] Problem with nested functions - functions nested too deeply in source code

2010-05-07 Thread Duncan Murdoch
Maximilian Kofler wrote: Hi all! I¹m just implementing the Ullmann¹s algorithm for searching subgraph isomorphisms in graphNEL objects. The algorithm is running with smaller graphs, but when I¹m calling it i get an R error message saying that functions are nested too deeply in source code. I

[R] Transforming sequence data into numeric values.

2010-05-07 Thread Simon Boardman
Hi I am analysing from a behavioural experiment comparing left and right turns of snails. Basically I end up with a list of twenty values like this: R R R L R L L L L R R R R L L L R L R L I want to analyse runs of turns but would like to automate how this is processed and end up with a table th

[R] help in R

2010-05-07 Thread david sabine
Hi all, what are the books that i can read them for begenning with R ? thanks in advance David [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting gui

[R] Pseudo R square

2010-05-07 Thread rbasterr
Hi, I am a student and I am starting to use R. I have a question regardint the Data mining - rattle package. Once I create a decission tree (predictive) I want to evaluate it. Under the "evaluate" option I can choose between: "Pr v Ob": I do not know how to interpret the Pseudo R square va

Re: [R] problem in using optim

2010-05-07 Thread Arun.stat
just check whether some values in the parameter space forcing the log() function to apply logarithm on negative values !!! -- View this message in context: http://r.789695.n4.nabble.com/problem-in-using-optim-tp2133938p2133942.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] P values

2010-05-07 Thread Duncan Murdoch
Robert A LaBudde wrote: At 01:40 PM 5/6/2010, Joris Meys wrote: On Thu, May 6, 2010 at 6:09 PM, Greg Snow wrote: Because if you use the sample standard deviation then it is a t test not a z test. I'm doubting that seriously... You calculate normalized Z-values by substractin

Re: [R] How to re-arrange data in R

2010-05-07 Thread Joris Meys
Take a look at the package reshape, the functions ?melt and ?cast. Take a look at their website as well : http://had.co.nz/reshape/ Cheers Joris On Fri, May 7, 2010 at 10:21 AM, Zablone Owiti wrote: > Dear users, > > I have monthly station data (44) stations data for 45 years which I have > rea

[R] How to add separate labels to the axes of each panel plot?

2010-05-07 Thread Marius Hofert
Dear R experts, I have four panels plotted with relation="free" and I would like to have labels for both axis for each of the four plots. How can this be done? Below is a minimal example. There are two problems: 1) How to determine the current panel being plotted inside the panel function. 2) Ho

Re: [R] Any way to apply TWO functions with tapply()?

2010-05-07 Thread Tal Galili
Look at the reshape package - it allows that when using "cast" Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com

Re: [R] What is the best way to have "R" output tables in an MS Word format? (shaping R core)

2010-05-07 Thread Joris Meys
Well, there's always RExcel to get all your R stuff into something M$ Ruffice can understand. And they're even working on a Word link if I got it right. Cheers Joris On Fri, May 7, 2010 at 12:24 PM, Duncan Murdoch wrote: > chrish...@psyctc.org wrote: > >> I've changed the subject line a bit here

Re: [R] glm contrasts

2010-05-07 Thread Joris Meys
Hi Nathalie, depending on the hypotheses you want to test, you can set the contrasts either by using options(contrasts=c("unordered contrasts","ordered contrasts")) (see ?contrast for the possible choices) or you can specify the contrasts in the glm function itself (contrasts argument) If you w

Re: [R] What is the best way to have "R" output tables in an MS Word format? (shaping R core)

2010-05-07 Thread Duncan Murdoch
chrish...@psyctc.org wrote: I've changed the subject line a bit here as Max is asking such a fundamental question. Max Kuhn sent the following at 01/05/2010 19:22: Chris, ... Why is it R Core's job to fulfill your wants and desires? I have a hard time thinking that very busy peo

[R] post-hoc t-tests, for lme / lmer models

2010-05-07 Thread Kay Cichini
hello, i searched archives for post-hocs on mixed models and wondered why the method which intuitively came up to me as first, namely reordering the levels of the fixed factors and to examine the t-statistics (my model contains only categorical factors, one with 2 and one with 4 levels), does n

Re: [R] cannot update polr model if I specify "start" parameters

2010-05-07 Thread Joris Meys
Hi Kevin, The obvious work-around is to start with a model that can be fitted without giving the start-parameters. If you have to specify the start parameters, that usually means there is too much parameters or too much dependence in your data for the algorithm to converge. Meaning that the outcom

[R] problem in using optim

2010-05-07 Thread Carol Gao
Dear R users, When I was trying to use the function *optim* to get the MLEs, quite a few warning messages showed up as below: Warning in log(psi * lam) : NaNs produced I am just wondering what does this mean? Was it something wrong with my likelihood function or was it sth wrong with the data?

[R] Any way to apply TWO functions with tapply()?

2010-05-07 Thread Phil Wieland
I need to compute the mean and the standard deviation of a data set and would like to have the results in one table/data frame. I call tapply() two times and do then merge the resulting tables to have them all in one table. Is there any way to tell tapply() to use the functions mean and sd within

[R] help in neural networks package

2010-05-07 Thread david sabine
hi all , has anyone tried to predict a univariate time series by a neural networks packages ? please help me in this problem . I am new in R and I did not found any document that explains this problem. thanks in advance David [[alternative HTML version deleted]] ___

Re: [R] Rcmdr probs

2010-05-07 Thread Joris Meys
See also this thread: https://stat.ethz.ch/pipermail/r-help/2007-December/148116.html Cheers Joris On Thu, May 6, 2010 at 11:24 PM, Michael Dykes wrote: > When trying to install Rcmdr, I get the following error messages. I am not > aware of how to fix the problem, i.e. how to remove the lock. >

  1   2   >