Re: [R] Igraph library: How to calculate APSP (shortest path matrix) matrix for a subset list of nodes.

2008-08-25 Thread Moshe Olshansky
I was too optimistic - the complexity is O(E*log(V)) where V is the number of nodes, but since log(25000) 20 this is still reasonable. --- On Mon, 25/8/08, Moshe Olshansky [EMAIL PROTECTED] wrote: From: Moshe Olshansky [EMAIL PROTECTED] Subject: Re: [R] Igraph library: How to calculate APSP

Re: [R] cbind in data.frame

2008-08-25 Thread Charles Plessy
Le Sun, Aug 24, 2008 at 10:56:43PM -0700, Yuan Jian a écrit : hi, when I used cbind to combine columns, some contents of columns has been replaced by number. in the script below, column should be aaa,bbb,ccc but I was given 1,2,3. but when I change the column to vector, it gave me correct

Re: [R] cbind in data.frame

2008-08-25 Thread Yuan Jian
Thanks Charles,   when I use cbind.data.frame(), the column was not replaced by number. I could not find information about cbind.data.frame. what is the machineism of cbind.data.frame?   cheers   Yu --- On Mon, 8/25/08, Charles Plessy [EMAIL PROTECTED] wrote: From: Charles Plessy [EMAIL

Re: [R] cbind in data.frame

2008-08-25 Thread Prof Brian Ripley
I think the issue is that cbind applied to a vector or matrix drops classes. It seems that data.frame() should have been used to combine columns here. On Mon, 25 Aug 2008, Charles Plessy wrote: Le Sun, Aug 24, 2008 at 10:56:43PM -0700, Yuan Jian a écrit : hi, when I used cbind to combine

Re: [R] Deleting NA in list()

2008-08-25 Thread Kenn Konstabel
lt[!is.na(lt)] is a rather obvious way... On Fri, Aug 22, 2008 at 9:41 PM, Dong-hyun Oh [EMAIL PROTECTED] wrote: Dear useRs, I would like to know the way of deleting NA in list(). Following is a example. lt - list(a = 1:3, b = NA, c = letters[1:3], d = NA) for(i in length(lt):1) {

Re: [R] [BioC] similarity between two gene lists with varied length

2008-08-25 Thread Claudio Lottaz
Hi Weiwei, You may want to have a look at the Bioconductor package OrderedList. It searches for similarities in gene rankings without forcing the user to specify a threshold, where to cut the lists. Hope this helps, Cheers, Claudio -Original Message- From: Weiwei Shi [mailto:[EMAIL

Re: [R] Igraph library: How to calculate APSP (shortest path matrix) matrix for a subset list of nodes.

2008-08-25 Thread Csardi Gabor
It is O(|V|+|E|) to calculate unweighted shortest paths from one vertex to all others. It is indeed O(|E|*log|V|) if you have a weighted graph. But both of these should be reasonable for |V|=25000 and 500 sources, you just need a fair amount of memory. For the details see ?shortest.paths.

Re: [R] rval, symbol print name too long?

2008-08-25 Thread Prof Brian Ripley
On Mon, 25 Aug 2008, Jan Akko Eleveld wrote: Is there anyone who can tell me what this means (I call a table, that is stores as csv file): Error in do.call(data.frame, rval) : symbol print-name too long Thanks you in advance,Akko Eleveld Not really (see 'commented, minimal, self-contained,

Re: [R] GAM-binomial logit link

2008-08-25 Thread Marina Laborde
No, i didnt get that warning (In eval(expr, envir, enclos) ... : non-integer #successes in a binomial glm!) because i used the continuous bounded variable weighted by the effort. This is, my formula was something like:   gam(SER_CD ~ s(DEP)+s(SST)+s(CLA)+s(SSH)+s(WST), weights=EFFORT, data=CD01,

Re: [R] R project web site

2008-08-25 Thread Gavin Simpson
On Sun, 2008-08-24 at 21:03 +0530, [EMAIL PROTECTED] wrote: Admin please check logs for denial of service attack.the website is anciently designed. Period What, pray tell, do ancient web design and susceptibility to DoS attacks have to do with one another? Just because the R Project website

[R] lme: Testing variance components

2008-08-25 Thread Adam D. I. Kramer
Hello, I've been making a decent amount of use of the lme function recently, and I am aware that I can extract the variance and correlation components with the VarCorr(model) function. However, I am interested in testing these components as well...is there a module or function available

[R] R 2.7.2 is released

2008-08-25 Thread Peter Dalgaard
I've rolled up R-2.7.2.tar.gz a short while ago. This is intended as a wrap-up release containing all known fixes to issues with the 2.7.x series. See the full list of changes below. You can get it (in a short while) from http://cran.r-project.org/src/base/R-2/R-2.7.2.tar.gz or wait for it

[R] rbga.bin: iteration number

2008-08-25 Thread Markus Mühlbacher
Hi there, I am using the rbga.bin function from the genalg-package. There I am searching for a way to print the number of the iteration within the monitor function. My monitor function looks like this: monitor - function(obj) { minEval = min(obj$evaluations);

[R] WinBUGS with R

2008-08-25 Thread BXC (Bendix Carstensen)
Artimon, It seems that you have got the data wrong: The data structure is a list of 4 characters: list(y,X,n,m) [[1]] [1] y [[2]] [1] X [[3]] [1] n [[4]] [1] m And that is hardly what you want, presumably you meant list(y=y,X=X,n=n,m=m) ?? __

Re: [R] problem using cat within Sweave code chunks when fig=TRUE

2008-08-25 Thread Wolfgang Huber
Hi Paul, You could label=codechunk1a,fig=TRUE,include=FALSE= plot(1:10) @ label=codechunk1b= cat(figure1.eps caption goes here \n,file=readme.txt,append=T) cat(figure1.pdf caption goes here \n,file=readme.txt,append=T) @ You can suppress one of the three executions by setting eps=FALSE in the

[R] Using sample() with a data frame ?

2008-08-25 Thread Martin Hvidberg
I have a data frame (daf1), that holds +8 records, and 10 variables (i.e. 10 columns and some 8 rows) length(daf1) [1] 10 length(daf1[,1]) [1] 83805 I would like to sample() e.g. 1 records from this. I use: daf2 - sample(daf1, 1000, replace = FALSE, prob = NULL) Error in

[R] lattice : using both strip and strip.left

2008-08-25 Thread baptiste auguie
Dear all, I'm routinely using lattice and ggplot2, I wish to create a lattice theme that looks not too dissimilar to ggplot's defaults so I can include both graphs in a document with a consistent look. To illustrate my questions, consider the following example: library(ggplot2)

Re: [R] Using sample() with a data frame ?

2008-08-25 Thread baptiste auguie
Hi, I find convenient to use a custom function for this: sample.df - function (df, N = 1000, ...) { df[sample(nrow(df), N, ...), ] } sample.df(daf1,1000) Hope this helps, baptiste On 25 Aug 2008, at 12:31, Martin Hvidberg wrote: I have a data frame (daf1), that holds +8

[R] (no subject)

2008-08-25 Thread tayyaba rafiq
I am very new user of R project. Sir I am a research scholar. I am doing work on fitting distributions. Actually sir I want to know that what package is use to find parameters of pareto distribution by maximum likelihood method. and i want to find these parameters from my calculated data. Sir

[R] Odp: Using sample() with a data frame ?

2008-08-25 Thread Petr PIKAL
Hi you are not overly specific about what you really want but maybe daf1[sample(1:83805, 1), ] This selects randomly 1 rows from daf1 Is this what you want? Regards Petr [EMAIL PROTECTED] napsal dne 25.08.2008 13:31:15: I have a data frame (daf1), that holds +8 records, and

Re: [R] Deleting NA in list()

2008-08-25 Thread jim holtman
The only problem with this solution is what happens if the element has more than one NA: lt - list(a = 1:3, b = NA, c = letters[1:3], d = NA) is.na(lt) a b c d FALSE TRUE FALSE TRUE lt - list(a = 1:3, b = c(NA,NA,NA), c = letters[1:3], d = NA) is.na(lt) a b c

Re: [R] [BioC] similarity between two gene lists with varied length

2008-08-25 Thread Deanne Taylor
The made4 package in bioconductor can report gene list similarities. --- Deanne Taylor PhD Executive Director, Bioinformatics Core Department of Biostatistics Harvard School of Public Health 655 Huntington Avenue Boston, MA 02115 [EMAIL PROTECTED] Weiwei Shi [EMAIL PROTECTED] 08/23/08

Re: [R] Newbie programming help

2008-08-25 Thread ONKELINX, Thierry
Dear Steven, Take a look at the lmList function in the nlme package. It does what you want to do. HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest

Re: [R] Fitting a Pareto [was (no subject)]

2008-08-25 Thread Prof Brian Ripley
On Mon, 25 Aug 2008, tayyaba rafiq wrote: I am very new user of R project. Sir I am a research scholar. I am doing Even the newest of users are expected to read and follow the posting guide (proper subject, no HTML mail). work on fitting distributions. Actually sir I want to know that

Re: [R] GAM-binomial logit link

2008-08-25 Thread Monica Pisica
Hi Marina, Unfortunately i don't know the answer. I still think the best is to contact the author of the package. He might be still in his holiday since in UK school starts sometimes in September, but certainly he is the best to answer your question. I think it will help if you send him also

[R] SQL Primer for R

2008-08-25 Thread ivo welch
Dear R wizards: I decided to take the advice in the R data import/export manual and want to learn how to work with SQL for large data sets. I am trying SQLite with the DBI and RSQLite database interfaces. Speed is nice. Alas, I am struggling to find a tutorial that is geared for the kind of

Re: [R] SQL Primer for R

2008-08-25 Thread Ajay ohri
R 's ability to work with large data sets is limited on PC. I am trying it on cloud to overcome this but need help from other programmers. Also tutorials would help to newbies regards, Ajay On Mon, Aug 25, 2008 at 6:42 PM, ivo welch [EMAIL PROTECTED] wrote: Dear R wizards: I decided to take

Re: [R] SQL Primer for R

2008-08-25 Thread Gabor Grothendieck
The sqldf package's home page http://sqldf.googlecode.com has quite a few examples as well as links to resources. Also see the examples in ?sqldf On Mon, Aug 25, 2008 at 9:12 AM, ivo welch [EMAIL PROTECTED] wrote: Dear R wizards: I decided to take the advice in the R data import/export

Re: [R] SQL Primer for R

2008-08-25 Thread Gabor Grothendieck
This would be a function of the database software more than R. For sqlite a few dozen gigabytes should be ok. Other databases can handle even larger requirements. On Mon, Aug 25, 2008 at 9:17 AM, Ajay ohri [EMAIL PROTECTED] wrote: R 's ability to work with large data sets is limited on PC. I

[R] aov, lme, multcomp

2008-08-25 Thread Richard D. Morey
I am doing an analysis and would like to use lme() and the multcomp package to do multiple comparisons. My design is a within subjects design with three crossed fixed factors (every participant sees every combination of three fixed factors A,B,C). Of course, I can use aov() to analyze this

Re: [R] Deleting NA in list()

2008-08-25 Thread Kenn Konstabel
Umm ... On Mon, Aug 25, 2008 at 2:56 PM, jim holtman [EMAIL PROTECTED] wrote: The only problem with this solution is what happens if the element has more than one NA: [...] In that case, 'b' does not have the right answer. That was the reason for using 'all' to check for the condition:

[R] contour plots

2008-08-25 Thread Sybille Wendel
Hello, I want to make a contour plot. I have a matrix (nrow=4,ncol=58) . and two lists, one with 4 values (the depths) and one with 58 values (time in days)( Depth (should be later on the y-axis),and Time(should be later on the x-axis)) In the matrix there is the temperature

Re: [R] SQL Primer for R

2008-08-25 Thread Thomas Lumley
On Mon, 25 Aug 2008, ivo welch wrote: Dear R wizards: I decided to take the advice in the R data import/export manual and want to learn how to work with SQL for large data sets. I am trying SQLite with the DBI and RSQLite database interfaces. Speed is nice. Alas, I am struggling to find a

Re: [R] aov, lme, multcomp

2008-08-25 Thread Mark Difford
Hi Richard, The tests give different Fs and ps. I know this comes up every once in a while on R-help so I did my homework. I see from these two threads: This is not so, or it is not necessarily so. The error structure of your two models is quite different, and this is (one reason) why the F-

Re: [R] SQL Primer for R

2008-08-25 Thread Ajay ohri
Not really, if you want R to be as mainstream as other stats packages that can read more than a few gigabytes on the PC. R's relative inefficiency in reading large datasets (due to the RAm loading thing) ,forces people to opt for lesser softwares which are way too expensive for annual license

[R] R-ish challenge for dependent ranking

2008-08-25 Thread ivo welch
Dear R wizards: First, thanks for the notes on SQL. These pointers will make it a lot easier to deal with large data sets. Sorry to have a second short query the same day. I have been staring at this for a while, but I cannot figure out how to do a dependent ranking the R-sh way. ds=

Re: [R] simple generation of artificial data with defined features

2008-08-25 Thread Greg Snow
-Original Message- From: drflxms [mailto:[EMAIL PROTECTED] Sent: Saturday, August 23, 2008 6:47 AM To: Greg Snow Cc: r-help@r-project.org Subject: Re: Re: [R] simple generation of artificial data with defined features Hello Mr. Greg Snow! Thank you very much for your prompt

Re: [R] R-ish challenge for dependent ranking

2008-08-25 Thread baptiste auguie
Hi I think you want something like, with(ds, tapply(yn, drank1group, rank) ) also, the reshape package should do this sort of thing neatly. Hope this helps, baptiste On 25 Aug 2008, at 16:10, ivo welch wrote: Dear R wizards: First, thanks for the notes on SQL. These pointers will

[R] lmer4 and variable selection

2008-08-25 Thread Andreas Nord
Dear list, I am currently working with a rather large data set on body temperature regulation in wintering birds. My original model contains quite a few dependent variables, but I do not (of course) wish to keep them all in my final model. I've fitted the following model to the data:

Re: [R] Deleting NA in list()

2008-08-25 Thread jim holtman
That would work too. Probably had the unlist in there from when I was using 'lapply' at the time. 2. You can not be sure that it is a one element vector. Also it was unclear what should happen if only 'some' of the values of the vector were NA. If it was guarenteed that an element of the list

Re: [R] contour plots

2008-08-25 Thread Don MacQueen
I think maybe you have to show your data a little better, and exactly how you are using contour. The posting guidelines request a small reproducible example; without that good help is difficult. In the meantime, here is an example that works. x - 1:4 y - 1:58 z - outer(x,y) *

Re: [R] R-ish challenge for dependent ranking

2008-08-25 Thread jim holtman
If you want to put it back in the original data frame: ds= data.frame( xn=rnorm(32), yn=rnorm(32), zn=rnorm(32) ) ds$drank1group= as.integer((rank( ds$xn )-1)/4) # ok, the first set ds$drank2group - ave(ds$yn, ds$drank1group, FUN=rank) ds xn yn zn drank1group

Re: [R] Survey Design / Rake questions

2008-08-25 Thread Farley, Robert
Still no joy. :-( I see a number of things that bother me. 1) str(ByEBNum$StnTraveld) says int [1:12] 1 2 3 4 5 6 7 8 9 10 ... Even though StnTraveld - c(as.factor(1:12)) 2) ByEBOn$StnName[1:5] seems to imply I have extra spaces in the data. Where would they have come from?

Re: [R] lmer4 and variable selection

2008-08-25 Thread jebyrnes
Have you thought about using AIC weights? As long as you are not considering models where you drop your random effects, calculating AIC values (or AICc values) and doing multimodel inference is one way to approach your problem. If you are fitting models with and without random effects, it gets

Re: [R] Using interactive plots to get information about data points

2008-08-25 Thread jcarmichael
Thank you for the GGobi reference, it is a very handy tool! My main goal, however, is to be able to identify univariate outliers (with boxplots for example), and I'm having a hard time getting the rggobi package to do that. Michael Bibo-2 wrote: ?identify with labels argument. Another

[R] Displaying Equations in Documentation

2008-08-25 Thread Jarrett Byrnes
I'm currently working on writing up some documentation for some of my code, but am having the darndest time coding in equations. For example, the equation in the following: \details{ Calculated the R Squared for observed endogenous variables in a structural equation model, as well as

[R] Model Comparison in Canonical Correlation Analysis

2008-08-25 Thread Christian Geng
Dear R-users, I have the following question: I am currently performing Canonical Correlation analysis in two data sets (of the same size: identical cases and identical variables. The data in the second data set are actually a transformed version of the data in the first data set.) Now I want to

Re: [R] R-ish challenge for dependent ranking

2008-08-25 Thread ivo welch
thank you everybody, again. regards, /iaw __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,

Re: [R] lmer4 and variable selection

2008-08-25 Thread Bert Gunter
You **really** should work with a local statistician. Remote statistical advice (this is not really about R) from even well-meaning helpers unfamiliar with your work is really very risky. For example, I would suggest making all sorts of plots (statistical summaries alone are wholly inadequate and

[R] small spline regression example

2008-08-25 Thread Erin Hodgess
Dear R People: Could someone recommend a small example for spline regression, please? I would like to show this to my students, step by step. Thanks in advance, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto:

[R] Unicode notation \x000

2008-08-25 Thread Christoph Heibl
Dear list, I am trying to replace Unicode notation of German and Spanish special characters (as read in by read.csv from excel spreadsheets) by character strings that can be interpreted by LaTeX. E.g.: uni2latex - function(x){ x - gsub(, et, x, fixed = TRUE)

[R] Output to Latex using Memisc almost works

2008-08-25 Thread Eelke
Hello, I'm using memisc to output regression results to tables and latex. My problem is that the output that Latex needs must be in between $ $ so that it is read as formula but memisc does not output the result between $ $. For example, latex needs: $0.05^{***}$ and memisc outputs 0.05^{***}

[R] XP/Vista/Office 2007/IE Compatibility question

2008-08-25 Thread ifafjc
Good morning. My client currently has Windows 2000 and Office 2000. They are planning to upgrade to Windows XP/Vista/Office 2007. Some computers have R installed. I don't have a version number. I'm working off of a spreadsheet. Please respond to the following questions at your earliest

[R] R for Windows GUI closes when I try to read.spss

2008-08-25 Thread Roderick Harrison
** High Priority ** I have been trying to read an SPSS file into R using read.spss (C:/Documents and Settings/Roderick Harrison/My Documents/RWORK/ihisdat.sav, use.value.labels = TRUE, to.data.frame = FALSE, max.value.labels = 500, trim.factor.names = FALSE, trim_values = TRUE, reencode = NA,

Re: [R] XP/Vista/Office 2007/IE Compatibility question

2008-08-25 Thread Richardson, Patrick
http://cran.r-project.org/bin/windows/base/rw-FAQ.html (for the first two questions anyway) _ Patrick Richardson Biostatistician - Program of Translational Medicine Van Andel Research Institute - Webb Lab 333 Bostwick Avenue NE Grand Rapids, MI 49503

Re: [R] Sending ... to a C external

2008-08-25 Thread John Tillinghast
On Sat, Aug 23, 2008 at 11:46 AM, Douglas Bates [EMAIL PROTECTED] wrote: I don't think it is necessary to go through the agonies of dealing with the argument list in a .External call., which is what I assume you are doing. (You haven't given us very much information on how you are trying to pass

[R] selection bias adjustment via propensity score

2008-08-25 Thread Bunny, lautloscrew.com
Hi all, i am wondering if there´s any other method to adjust for selection related bias of estimates except propensity scoring and heckit / mills ratio approach? i also read documentation of Match and twang package so far, so i don´t speak of any ATE / ATT related methods, respectively

[R] ggplot boxplot - how to order categories

2008-08-25 Thread Raj Minhas
I am interested in creating a boxplot using ggplot or qplot where I can specify the order of the categories being plotted on the x-axis. For example, the following command plots the categories (diamond color) in alphabetic order (D, E, ..., J): qplot(color, price/carat, data=diamonds,

Re: [R] ggplot boxplot - how to order categories

2008-08-25 Thread hadley wickham
Hi Raj, It's the same as the other plotting systems in R: you need to change the order of the underlying factor levels. e.g.: levels(diamonds$color) - c(J, D, E, I, H, F, G) If you're reordering then according to the value of another variable, also see ?reorder Hadley On Mon, Aug 25, 2008 at

[R] ggplot scale_size - is there any way to specify breaks?

2008-08-25 Thread Raj Minhas
Hi, I am plotting scores for students in a school using a command of the form qplot(x=Subject, y=Student, data=dataset, geom=point, size=Score) It lists the Subject factors on the x-axis and the Student factors on the y-axis - dots proportional to the Score are plotted at the resultant grid.

Re: [R] Unicode notation \x000

2008-08-25 Thread Prof Brian Ripley
On Mon, 25 Aug 2008, Christoph Heibl wrote: Dear list, I am trying to replace Unicode notation of German and Spanish special characters (as read in by read.csv from excel spreadsheets) by character strings that can be interpreted by LaTeX. Why? LaTeX can read UTF-8 if you tell it to.

Re: [R] ggplot boxplot - how to order categories

2008-08-25 Thread Raj Minhas
Hadley, Many thanks - I have just started using ggplot and it is an amazing package. -Raj. -- View this message in context: http://www.nabble.com/ggplot-boxplot---how-to-order-categories-tp19147920p19148953.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] lmer4 and variable selection

2008-08-25 Thread Prof Brian Ripley
On Mon, 25 Aug 2008, jebyrnes wrote: Have you thought about using AIC weights? As long as you are not considering models where you drop your random effects, calculating AIC values (or AICc values) and doing multimodel inference is one way to approach your problem. If you are fitting models

[R] How to do a meta-analysis plot

2008-08-25 Thread Jorge Ivan Velez
Dear R-list, I'd like to do a meta-analysis plot similar to install.packages('rmeta') require(rmeta) data(catheter) a - meta.MH(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) summary(a) plot(a) (see attached file) by using my

[R] Problems starting Rcmdr

2008-08-25 Thread Davia Cox Downey
I understand that Rcmdr needs the tcltk package in order to run. However, when I attempt to using the library (Rcmdr) command, I get the message below. I have attempted to start X in R as well as using starting it from the Utilities folder on my Mac to no avail. I can't figure out if there

Re: [R] How to do a meta-analysis plot

2008-08-25 Thread Gabor Grothendieck
See ?metaplot On Mon, Aug 25, 2008 at 2:44 PM, Jorge Ivan Velez [EMAIL PROTECTED] wrote: Dear R-list, I'd like to do a meta-analysis plot similar to install.packages('rmeta') require(rmeta) data(catheter) a - meta.MH(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter,

Re: [R] ggplot scale_size - is there any way to specify breaks?

2008-08-25 Thread hadley wickham
Is there any way to specify a range to scale_size()? There is an option called breaks in scale_size_identity() that does what I want. Is there something similar for scale_size()? Not in the released version, but there is in the development version - all scales now take a limits argument which

[R] Jpg files in R

2008-08-25 Thread Leandro Marino
If I have an file like an JPG, gif, png or other, exist any kind of function in the R to see de dimension in pixels of this image? Thanks Atenciosamente, Leandro Lins Marino Centro de Avaliacao Fundacao CESGRANRIO Rua Santa Alexandrina, 1011 - 2o andar Rio de Janeiro, RJ - CEP: 20261-903 *

Re: [R] psychometric functions

2008-08-25 Thread Victor Hernando Cervantes Botero
Hi, 2008/8/21 Mario Maiworm [EMAIL PROTECTED] Hi, I want to fit some psychophysical data with cumulative gaussians. There is quite a convenient toolbox for matlab called 'psignifit' (formerly known as 'psychofit'). It allows the lower bound of the sigmoid to vary slightly from zero, aswell

Re: [R] Problems starting Rcmdr

2008-08-25 Thread stephen sefick
Rcmdr will not work without X11 started. If X11 does not start then, depending on the OS version, you may need to download to latest version from... I don't remember, but if you search the R-SIG-MAC help list you can find the website- I had this same problem and it was fixed with the help of the

Re: [R] Jpg files in R

2008-08-25 Thread Henrique Dallazuanna
Is there the rimage package: if(!require(rimage))install.packages(rimage) x - read.jpeg(system.file(data, cat.jpg, package=rimage)) dim(x)[1:2] 2008/8/25 Leandro Marino [EMAIL PROTECTED]: If I have an file like an JPG, gif, png or other, exist any kind of function in the R to see de

Re: [R] R for Windows GUI closes when I try to read.spss

2008-08-25 Thread Peter Dalgaard
Roderick Harrison wrote: ** High Priority ** Well to you, it is... In general people on this list are happy to help, but you need to supply them with something to go on, and there is just nothing here. At the very least, we'd need version numbers and preferably an example of a file that

[R] Large Data Set Help

2008-08-25 Thread Jason Thibodeau
I am attempting to perform some simple data manipulation on a large data set. I have a snippet of the whole data set, and my small snippet is 2GB in CSV. Is there a way I can read my csv, select a few columns, and write it to an output file in real time? This is what I do right now to a small

[R] Two envelopes problem

2008-08-25 Thread Mario
A friend of mine came to me with the two envelopes problem, I hadn't heard of this problem before and it goes like this: someone puts an amount `x' in an envelope and an amount `2x' in another. You choose one envelope randomly, you open it, and there are inside, say £10. Now, should you keep

Re: [R] small spline regression example

2008-08-25 Thread Greg Snow
Are you looking for sample datasets? Or something more? Sample datasets that work include: ?ethanol The relationship between E (x-variable) and NOx (y-variable) is very nonlinear, and a polynomial does not fit as well as a spline. ?mtcars Predict mpg (gas mileage) using weight, hp, or

Re: [R] Jpg files in R

2008-08-25 Thread Barry Rowlingson
2008/8/25 Henrique Dallazuanna [EMAIL PROTECTED]: Is there the rimage package: if(!require(rimage))install.packages(rimage) x - read.jpeg(system.file(data, cat.jpg, package=rimage)) Nice, but if the require() fails and the package installs via install.packages, you still have to do the

Re: [R] Two envelopes problem

2008-08-25 Thread markleeds
i haven't looked at your code and I'll try when I have time but, as you stated, that's an EXTREMELY famous problem that has tried to be posed in a bayesian way and all sorts of other things have been done to try solve it. Note that if you change the utility function so that its log(X) rather

Re: [R] Large Data Set Help

2008-08-25 Thread jim holtman
Establish a connection with the file you want to read, read in 1,000 rows (or whatever you want). If you are using read.csv and there is a header, you might want to skip it initially since there will be no header when you read the next 1000 rows. Also put 'as.is=TRUE so that character fields are

Re: [R] Jpg files in R

2008-08-25 Thread Henrique Dallazuanna
Right Barry, I forget. Thanks On Mon, Aug 25, 2008 at 4:51 PM, Barry Rowlingson [EMAIL PROTECTED] wrote: 2008/8/25 Henrique Dallazuanna [EMAIL PROTECTED]: Is there the rimage package: if(!require(rimage))install.packages(rimage) x - read.jpeg(system.file(data, cat.jpg, package=rimage))

Re: [R] Two envelopes problem

2008-08-25 Thread Greg Snow
You are simulating the answer to a different question. Once you know that one envelope contains 10, then you know conditional on that information that either x=10 and the other envelope holds 20, or 2*x=10 and the other envelope holds 5. With no additional information and assuming random

Re: [R] Displaying Equations in Documentation

2008-08-25 Thread Rolf Turner
On 26/08/2008, at 4:50 AM, Jarrett Byrnes wrote: I'm currently working on writing up some documentation for some of my code, but am having the darndest time coding in equations. For example, the equation in the following: \details{ Calculated the R Squared for observed endogenous

[R] How to run a model 1000 times, while saving coefficients each time?

2008-08-25 Thread Mark Na
Hello, We have written a program (below) to model the effect of a covariate on observed values of a response variable (using only 80% of the rows in our dataframe) and then use that model to calculate predicted values for the remaining 20% of the rows. Then, we compare the observed vs.

Re: [R] Large Data Set Help

2008-08-25 Thread Roland Rau
Hi, Jason Thibodeau wrote: I am attempting to perform some simple data manipulation on a large data set. I have a snippet of the whole data set, and my small snippet is 2GB in CSV. Is there a way I can read my csv, select a few columns, and write it to an output file in real time? This is what

Re: [R] How to run a model 1000 times, while saving coefficients each time?

2008-08-25 Thread Greg Snow
?replicate -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Na Sent: Monday, August 25, 2008 2:45 PM To: [EMAIL PROTECTED]

Re: [R] Two envelopes problem

2008-08-25 Thread Mario
No, no, no. I have solved the Monty Hall problem and the Girl's problem and this is quite different. Imagine this, I get the envelope and I open it and it has £A (A=10 or any other amount it doesn't matter), a third friend gets the other envelope, he opens it, it has £B, now £B could be either

Re: [R] How to run a model 1000 times, while saving coefficients each time?

2008-08-25 Thread Derrick Lee
Hey Mark, I'm not sure if anyone gave this answer, but I have a similar setup in one of my codes, to get the coefficients and r^2 value, you can use the commands: model1$coefficients (or any part of the term since R can recognize the first couple of letters) summary(model1)$r.squared as

[R] Maintaining repeated ID numbers when transposing with reshape

2008-08-25 Thread jcarmichael
I have a dataset in long format that looks something like this: ID TESTRESULT 1 A 17 1 A 12 1 B 15 1 C 12 2 B 8 2 B 9 Now what I would like to do is transpose it like so: IDTEST ATEST B

Re: [R] Large Data Set Help

2008-08-25 Thread Charles C. Berry
On Mon, 25 Aug 2008, Roland Rau wrote: Hi, Jason Thibodeau wrote: I am attempting to perform some simple data manipulation on a large data set. I have a snippet of the whole data set, and my small snippet is 2GB in CSV. Is there a way I can read my csv, select a few columns, and write

Re: [R] Two envelopes problem

2008-08-25 Thread Greg Snow
I think it is like the girl problem, it is a matter of what you condition on (condition on at least 1 girl, or on a specific one being a girl). In your simulations (at least from what I can see), you generate an x from a distribution, randomize the order of x and 2x, then look at the average of

Re: [R] Two envelopes problem

2008-08-25 Thread Deepayan Sarkar
On Mon, Aug 25, 2008 at 1:51 PM, Mario [EMAIL PROTECTED] wrote: No, no, no. I have solved the Monty Hall problem and the Girl's problem and this is quite different. Imagine this, I get the envelope and I open it and it has £A (A=10 or any other amount it doesn't matter), a third friend gets

Re: [R] Two envelopes problem

2008-08-25 Thread davidr
There's a pretty thorough discussion on Wikipedia http://en.wikipedia.org/wiki/Two_envelopes_problem Suffice it to say that not everyone agrees. -- David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Deepayan Sarkar Sent: Monday, August 25, 2008 4:35

Re: [R] Maintaining repeated ID numbers when transposing with reshape

2008-08-25 Thread Adaikalavan Ramasamy
There might be a more elegant way of doing this but here is a way of doing it without reshape(). df - data.frame( ID=c(1,1,1,1,2,2), TEST=c(A,A,B,C,B,B), RESULT=c(17,12,15,12,8,9) ) df.s - split( df, df$ID ) out - sapply( df.s, function(m)

Re: [R] lmer4 and variable selection

2008-08-25 Thread Andreas Nord
Bert, Yes, I am aware of that, maybe I was a bit unclear in my previous post. My issue is not at all with interpreting data or deciding on what to do with it. That I am quite capable of doing myself and I could perform the analyses I want to do using other software. However, as I'm trying to

Re: [R] lattice : using both strip and strip.left

2008-08-25 Thread Deepayan Sarkar
On Mon, Aug 25, 2008 at 4:47 AM, baptiste auguie [EMAIL PROTECTED] wrote: Dear all, I'm routinely using lattice and ggplot2, I wish to create a lattice theme that looks not too dissimilar to ggplot's defaults so I can include both graphs in a document with a consistent look. To illustrate

Re: [R] howto optimize operations between pairs of rows in a single matrix like cor and pairs

2008-08-25 Thread Adaikalavan Ramasamy
Thank you to Jim and Moshe. I will try the Rprof option as well as the running the function to run on columns instead. Thank you. jim holtman wrote: Use Rprof to see where time is being spent. If it is in FUN, then there is probably no way to optimize outside of changing the way FUN works.

Re: [R] lattice : using both strip and strip.left

2008-08-25 Thread baptiste auguie
Brilliant! I've just ordered your book to learn more about lattice as its use is quite gripping despite a steep learning curve. Many thanks, baptiste On 25 Aug 2008, at 23:07, Deepayan Sarkar wrote: On Mon, Aug 25, 2008 at 4:47 AM, baptiste auguie [EMAIL PROTECTED] wrote: Dear all,

Re: [R] Survey Design / Rake questions

2008-08-25 Thread Farley, Robert
I don't see this on Nabble, so I'll re-post. Apologies if I missed it.. Still no joy. :-( I see a number of things that bother me. 1) str(ByEBNum$StnTraveld) says int [1:12] 1 2 3 4 5 6 7 8 9 10 ... Even though StnTraveld - c(as.factor(1:12)) 2) ByEBOn$StnName[1:5] seems to

Re: [R] Sending ... to a C external

2008-08-25 Thread Douglas Bates
On Mon, Aug 25, 2008 at 12:28 PM, John Tillinghast [EMAIL PROTECTED] wrote: On Sat, Aug 23, 2008 at 11:46 AM, Douglas Bates [EMAIL PROTECTED] wrote: I don't think it is necessary to go through the agonies of dealing with the argument list in a .External call., which is what I assume you are

[R] Mosaic plot using ggplot2

2008-08-25 Thread Rahul Premraj
Hello, I would like to know if mosaic plots are supported by ggplot2? If so, can someone point me to a couple of examples or give me any pointers? Cheers Rahul __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] R for Windows GUI closes when I try to read.spss

2008-08-25 Thread Roderick Harrison
** High Priority ** Cavan - the message I sent to r-help The packages I load are foreign and SPSSDDI and survey - survey won't be used, however, until we're actually trying to calculate the confidence intervals in R Thanks for taking time out to help with this I have been trying to read an

  1   2   >