[R] Package RPostgreSQL : Problem with dbWriteTable

2010-05-07 Thread PALMIER Patrick - CETE NP/INFRA/TRF
Hello, I have a probem with dbWriteTable method of package RPostrgreSQL The table is well added in the database but R doesn't succeed in inserting rows But If I send the COPY FROM as an sql query in R, the rows are then well added I think it is a problem with the temp file create by

Re: [R] Tinn-R RGui Send problem

2010-05-07 Thread Mike White
A possible work around would be to append the selection.r file to the .Rhistory file and then reload the history, e.g. file.append(.Rhistory, .trPaths[5]) loadhistory(file= .Rhistory) You can then access the code on the console, skipping the last 2 lines. [[alternative HTML

Re: [R] trellis/lattice: How to plot 4 panels with the same x-scale but different y-scales?

2010-05-07 Thread Felix Andrews
If it is enough to have two y labels on the left side and two x label along the bottom, you can specify xlab/ylab as vectors. Rather than drawing different xlabs or ylabs for all panels in a grid, you would typically use strips to label the panels. By the way, you could use the 'split' or

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

2010-05-07 Thread Jim Lemon
On 05/07/2010 06:07 AM, (Ted Harding) wrote: ... How about an R device called xml? This would implement the XML extensible markup language which is basically capable of encapsulating any formatted material. Ted, this is perhaps a better idea than you think. Much of the latest and greatest M$

[R] How to re-arrange data in R

2010-05-07 Thread Zablone Owiti
Dear users, I have monthly station data (44) stations data for 45 years which I have read in R using read.table. the data is in the format: Year Month Station1 Station2 .. Station 44 (i.e the column names in the 1st row), I also have the latitude and

Re: [R] Merge Multiple Datasets

2010-05-07 Thread Albert-Jan Roskam
Hi, Check the functions merge_all and merge_recurse from the reshape package. I think you're looking for the latter function. Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine,

Re: [R] trellis/lattice: How to plot 4 panels with the same x-scale but different y-scales?

2010-05-07 Thread Marius Hofert
Dear Felix, the split and position argument can indeed be used (see below). But one has to manually adjust the position argument for the last plot (bottom right) in order to be aligned with the second (top right). This issue does not appear in the panel function approach. As you can see from

Re: [R] question about rolling regressions

2010-05-07 Thread Dipankar Basu
Thanks. On Thu, May 6, 2010 at 7:49 PM, Gabor Grothendieck ggrothendi...@gmail.comwrote: See ?rollapply in the zoo package. On Thu, May 6, 2010 at 6:20 PM, Dipankar Basu basu...@gmail.com wrote: Hi All, I am using R 2.11.0 on a Ubuntu machine. I have a time series data set and want

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

2010-05-07 Thread Barry Rowlingson
On Fri, May 7, 2010 at 12:44 AM, Frank E Harrell Jr f.harr...@vanderbilt.edu wrote: Ted I can't resist offering my $.02, which is that I'm puzzled why LaTeX, being free, flexible, and powerful, is used only by millions of people and not tens of millions. I think it's the whole geek/suit

Re: [R] help on hmisc

2010-05-07 Thread Joris Meys
Puzzling question. You install R, you click on install packages, you select a mirror, you select hmisc, and done. There is a 64bit version of R, but a 32bit runs smooth on a Windows 7 64bit as well. if you love the command line, look at ?install.packages. I can't see why you would like to compile

[R] glm contrasts

2010-05-07 Thread Natalie Holt
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, family=quasipoisson) However, I wish to know where significant differences lie between

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

2010-05-07 Thread Jim Lemon
On 05/07/2010 07:00 PM, Barry Rowlingson wrote: ... I think it's the whole geek/suit divide thing. Back when only geeks had computers we had LaTeX, and FORTRAN, and S, and Unix (and VAX/VMS). But then the suits thought 'hey, we can make money out of this', and computers started working their

Re: [R] Protecting elements within a function

2010-05-07 Thread Joris Meys
Short answer : No, and you shouldn't. Longer answer: R is built under the GNU GPL license version 2. So the idea is that whenever you make something for R and spread it around, you give the source code as well. If you don't want functions to be loaded in the general environment, you can eg create

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 thedoctor81...@gmail.comwrote: When trying to install Rcmdr, I get the following error messages. I am not aware of how to fix the problem, i.e. how

[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]]

[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?

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

[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

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

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 want

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 murdoch.dun...@gmail.comwrote: chrish...@psyctc.org wrote: I've changed the

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

[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) How

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 zow...@ncst.go.ke wrote: Dear users, I have monthly station data (44) stations data for 45 years

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 greg.s...@imail.org 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

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.

[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 value

[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

[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

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

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 david.sabine...@gmail.comwrote: 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] 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] 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) {

Re: [R] Cluster procedure using geographical neighborhood

2010-05-07 Thread Martin Maechler
Dear Dario Sacco, DS == Dario Sacco dario.sa...@unito.it 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

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

2010-05-07 Thread Maximilian Kofler
Duncan Murdoch murdoch.duncan at 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

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

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 jorism...@gmail.com wrote: From: Joris Meys jorism...@gmail.com Subject: Re: [R] What is the best way to have R output tables in an MS Word format? (shaping R core) To: Duncan Murdoch

[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[a3,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] 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

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

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 =

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}

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

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/09

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 fbs...@leeds.ac.uk 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:

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 - -

[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] 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 labels

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

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

2010-05-07 Thread Duncan Murdoch
Maximilian Kofler wrote: Duncan Murdoch murdoch.duncan at 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

[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) {

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

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] 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] 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 murdoch.duncan at 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

[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) {

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

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

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] 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

[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

[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.

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 labels

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

[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

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

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 Geneland

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] 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

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.

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),

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 ease

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 greg.s...@imail.org wrote: Because if you use the sample standard deviation then it is a t test not a z test. I'm doubting that

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

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

2010-05-07 Thread Alfred-Schulze
-Ursprüngliche Nachricht- Von: S Ellison s.elli...@lgc.co.uk 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=

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

[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

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)

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

[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

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.com

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

2010-05-07 Thread Vivek Ayer
-- Forwarded message -- From: Vivek Ayer vivek.a...@gmail.com Date: Fri, May 7, 2010 at 10:17 AM Subject: Re: [R] custom metric for dist for use with hclust/kmeans To: Greg Snow greg.s...@imail.org Hi Greg, The pam function is exactly what I needed. I can now create my own

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 E

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 Center

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 greg.s...@imail.org wrote: Because if you use the sample standard deviation then it is a t

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

[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

[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

[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

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

Re: [R] median of two groups

2010-05-07 Thread Joris Meys
On Fri, May 7, 2010 at 9:45 PM, cheba meier cheba.me...@googlemail.comwrote: 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

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

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] 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] 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

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

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

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] 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(

  1   2   >