Re: [R] How to make a Cluster of Clusters

2011-01-07 Thread Michael Bedward
Hi Diego, It depends on your what your research questions are. You haven't told us :) For example, if you wanted to know whether (a) the environmental distance between lakes is correlated with spatial distance and (b) if the relationship changes over time you might do a series of Mantel tests. T

Re: [R] Trouble with installing Rmpi package

2011-01-07 Thread Dirk Eddelbuettel
On 7 January 2011 at 19:57, Tena Sakai wrote: | Hi, | | I made a bit of progress. I went to open-mpi.org and downloaded | mpi software and installed it, which went smoothly. Then I re- | Executed | > install.packages( 'Rmpi' ) | which worked, except this time it complained about rsprng. I wen

Re: [R] Trouble with installing Rmpi package

2011-01-07 Thread Tena Sakai
Hi, I made a bit of progress. I went to open-mpi.org and downloaded mpi software and installed it, which went smoothly. Then I re- Executed > install.packages( 'Rmpi' ) which worked, except this time it complained about rsprng. I went to sprng.cs.fsu.edu and downloaded sprng4 and tried install

Re: [R] Where is a package NEWS.Rd located?

2011-01-07 Thread Niels Richard Hansen
Dear Kevin Just had the same "problem", that is, placed the NEWS.Rd in the package inst/ directory, and the news() function did not find the information. The help page for news() is, however, pretty clear: "..., if the given add-on package can be found in the given libraries, it is attempted to

Re: [R] Random Effects Meta Regression

2011-01-07 Thread Mike Cheung
Hi Steph, You may try the metafor package http://cran.r-project.org/web/packages/metafor/index.html Regards, Mike -- - Mike W.L. Cheung Phone: (65) 6516-3702 Department of Psychology Fax: (65) 6773-1843

Re: [R] anova vs aov commands for anova with repeated measures

2011-01-07 Thread Bill.Venables
lm() and aov() are not fully equivalent. They both fit linear models, but they use different algorighms, and this allows aov, for example, to handle some simple multistratum models. The algorithm used by lm does not allow this, but it has other advantages for simpler models. If you want to fi

Re: [R] Plotting Factors -- Sorting x-axis

2011-01-07 Thread Bill.Venables
That rather depends on what kind of plot you want to use. Here is one option that you can use without any changes: ## con <- textConnection(" Months Prec 1 Jan 102.1 2 Feb69.7 3 Mar44.7 4 Apr32.1 5 May24.0 6 Jun18.7 7 Jul14.0 8 Aug

[R] help with environments

2011-01-07 Thread Joshua Wiley
Dear list, Although I tried to make a simple example, this may be too lengthy/unclear of a question for anyone to want to provide an answer. I have been trying to write two functions. My goal is to have an outer function ("foo") that will do some computations based on data created by the nested

[R] Trouble with installing Rmpi package

2011-01-07 Thread Tena Sakai
Hi, I am having a problem with installing Rmpi package on redhat linux machine. The R I am using is version 2.10.1. Here’s what happens. > install.packages( 'Rmpi' ) --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done trying URL 'http://cran.cnr.

Re: [R] Summing over specific columns in a matrix

2011-01-07 Thread Dennis Murphy
Hi: It's impolite on this list to hijack a thread to ask your own question. Please start a new thread in the future if you have a question of your own. Re your question, try this: Data1$Daily <- with(Data1, PL_Pos - Costs) Data1Sum <- aggregate(Daily ~ EnDate, FUN = sum) # Merge the two data fr

Re: [R] Compare the risk

2011-01-07 Thread kiotoqq
thanks a lot! I got it! -- View this message in context: http://r.789695.n4.nabble.com/Compare-the-risk-tp3189084p3204512.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

Re: [R] Compare the risk

2011-01-07 Thread David Winsemius
On Jan 7, 2011, at 5:28 PM, kiotoqq wrote: thank you.. but it says "dfrm not found" Of course it says, "dfrm not found". That's because it's on _my_ workspace. You did not say what you were calling your dataframe and I cannot read your mind. I had to make up some name, and the chanc

[R] Trouble compiling R-2.10.0

2011-01-07 Thread zacz
Hi, I am having trouble compiling R-2.10.0 on the Solaris x86_64 platform using the native solaris-studio cc/F99 compilers. I am pretty sure that I have all my environment set up for a 64-bit compile. However, when doing a make I get the following error: /opt/solstudio12.2/bin/cc -m64 -I./api -I

Re: [R] Compare the risk

2011-01-07 Thread kiotoqq
thank you.. but it says "dfrm not found" (sorry, I'm just very new here) -- View this message in context: http://r.789695.n4.nabble.com/Compare-the-risk-tp3189084p3204440.html Sent from the R help mailing list archive at Nabble.com. __ R-hel

Re: [R] Compare the risk

2011-01-07 Thread David Winsemius
On Jan 7, 2011, at 1:58 PM, kiotoqq wrote: I have a dataset which looks like this: cbr dust smoking expo 1 0 0.20 15 2 0 0.25 14 3 0 0.25 18 4 0 0.25 14 5 0 0.25 14 6 0 0.25 18 7 0 0.25

[R] Error: unexpected string constant

2011-01-07 Thread paogeomat
I want to analize some points location using the ppp, but i have this problem: Datos=read.table("puntos_texto.txt",dec=".",sep="\t",header=T) > summary(Datos) id y x Min. : 1.0 Min. :1013581 Min. :1177842 1st Qu.: 821.2 1st Qu.:1014

[R] Error in x %*% coef(object) : non-conformable arguments

2011-01-07 Thread Mike Harwood
Hello, and thanks in advance! What does the error message "Error in x %*% coef(object) : non- conformable arguments" when indicate when predicting values for newdata with a model from bigglm (in package biglm), and how can I debug it? I am attempting to do Monte Carlo simulations, which may expla

Re: [R] how to run linear regression models at once

2011-01-07 Thread Dennis Murphy
Hi: On Fri, Jan 7, 2011 at 7:04 AM, wangwallace wrote: > > hey, folks, > > I have two very simple questions. I am not quite sure if I can do this > using > R. > > so, I am analyzing a large data frame with thousands of variables. For > example: > > Dependent variables: d1, d2, d3 (i.e., there ar

Re: [R] Waaaayy off topic...Statistical methods, pub bias, scientific validity

2011-01-07 Thread Ravi Varadhan
"Conclusion: try to be/become a good scientist: with a high prevalence of good ideas." Or, I would say: "try to publish only good and mature ideas". Gauss said it best "pauca sed matura" or "few, but ripe." Ravi. --- Ravi Varadhan, Ph.D. Ass

[R] Fitting an Inverse Gamma Distribution to Survey Data

2011-01-07 Thread emorway
Hello, I've been attempting to fit the data below with an inverse gamma distribution. The reason for this is outside proprietary software (@Risk) kicked back a Pearson5 (inverse gamma) as the best fitting distribution with a Chi-Sqr goodness-of-fit roughly 40% better than with a log-normal fit.

[R] survval analysis microarray expression data

2011-01-07 Thread Terry Therneau
For any given pre-specified gene or short list of genes, yes the Cox model works fine. Two important caveats: 1. Remeber the rule of thumb for a Cox model of 20 events per variable (not n=20). Many microarray studies will have very marginal sample size. 2. If you are looking at many genes the

Re: [R] Problem with 2-ways ANOVA interactions

2011-01-07 Thread Greg Snow
Maybe a simple concrete example would help: > tmpdat <- data.frame( One= rep( c('A','B'), each=10 ), + Two=rep( c('C','D'), each=5, length.out=20 ), + mu1 = rep( c(10, 11, 12, 16), each=5 ) ) > > tmpdat$e <- with(tmpdat, ave( rnorm(20), One, Two, FUN=scale ) ) > tmpdat$y <- with(tmpdat, mu1+e) > >

Re: [R] Accessing data via url

2011-01-07 Thread Henrique Dallazuanna
In firefox, after the download, rigth click in the download and "copy download link" On Fri, Jan 7, 2011 at 4:35 PM, John Kane wrote: > Great, but how did you do that? > > --- On *Fri, 1/7/11, Henrique Dallazuanna * wrote: > > > From: Henrique Dallazuanna > Subject: Re: [R] Accessing data via u

Re: [R] Accessing data via url

2011-01-07 Thread Henrique Dallazuanna
Google redirect to: https://6326258883408400442-a-1802744773732722657-s-sites.googlegroups.com/site/jrkrideau/home/general-stores/duplicates.csv?attachauth=ANoY7crKufJCh6WJtrooAoCEKIYzT9u-TObiYElZaXj2XQhKRI9-oEMyKH3VN8YGuNtMHs2ec2qKeF0YBWrpSd9jTIs2JI4e6aR60v_AirgtSahjNNjoReLiE2XPZrhm4SF_NwCTu9rBwm

Re: [R] how to calculate this natural logarithm

2011-01-07 Thread Petr Savicky
On Sat, Jan 08, 2011 at 12:20:59AM +0800, zhaoxing731 wrote: > Hello > > I want to calculate natural logarithm of sum of combinations as follow: > (R code) > > { > > com_sum=choose(200,482)*choose(100,118)+choose(200,483)*choose(100,117)+...+choose(2000

Re: [R] Summing over specific columns in a matrix

2011-01-07 Thread emj83
Thanks- this works just as I needed- Emma -- View this message in context: http://r.789695.n4.nabble.com/Summing-over-specific-columns-in-a-matrix-tp3179400p3179439.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] Random Effects Meta Regression

2011-01-07 Thread s306
Hi All, I have run a series of random effects meta regressions on binomial outcomes using the metabin function in R. Now I would like to conduct some random effects meta regressions on the outcomes. Is there a command available which will allow for me to test the impact of a certain variable on t

Re: [R] vector of character with unequal width

2011-01-07 Thread Petr Savicky
On Fri, Jan 07, 2011 at 02:55:18PM +, jose Bartolomei wrote: > > Dear R users, > > Thanks for your help > The recomendations were exaclty what I was searching. > Bellow the one I will use for my script. > Thanks again, > jose > > nchar(xx) > [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

[R] Compare the risk

2011-01-07 Thread kiotoqq
I have a dataset which looks like this: cbr dust smoking expo 1 0 0.20 15 2 0 0.25 14 3 0 0.25 18 4 0 0.25 14 5 0 0.25 14 6 0 0.25 18 7 0 0.25 18 8 0 0.25 14 9

[R] rprofile.site

2011-01-07 Thread Julian Pritsch
Hi all, i just installed R 2.12.1 and Tinn-R 2.3.7.1. My OS is Windows 7 32bit. Here is my question: Do I have to execute the rprofile.site manually every time I start a R/Tinn-R session? Because it seems that way. Here is the error code I receive after sending "selection(echo=TRUE): source(.t

Re: [R] How to export/save an "mrpp" object?

2011-01-07 Thread Nikos Alexandris
Gavin: [...] > I think you should read ?load to rethink what these functions do and how > they do it. [...] Absolutely correct. I will. Thank you for your time Gavin, Nikos __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

Re: [R] plot without points overlap

2011-01-07 Thread JD
Hey, thanks for the suggestions but I'm still having some problem. I was able to modify the size pdf/ps file that I generate, but still labels of the right side of the heatmap are not plot entirely. I tried par(mar..) par(pin..) but still cannot do it, any ideas? Thanks! g 2011/1/4 Joshua Wile

Re: [R] plot without points overlap

2011-01-07 Thread Joshua Wiley
On Fri, Jan 7, 2011 at 10:34 AM, JD wrote: > Hey, thanks for the suggestions but I'm still having some problem. > I was able to modify the size pdf/ps file that I generate, This is a somewhat different question. The size of the finally created portable document or postscript file is determined b

Re: [R] Assumptions for ANOVA: the right way to check the normality

2011-01-07 Thread Ben Ward
I believe what I'm doing, is an ancova, because I have two categorical and a numerical explanatory variables, and a numerical response variable (this is the same experiment as before, the bacteria), and I'm just, at the minute (because I'm only half way through), doing some modelling and seeing

Re: [R] Waaaayy off topic...Statistical methods, pub bias, scientific validity

2011-01-07 Thread Joel Schwartz
The issue Spencer brings up is a problem whether the funding is private or public. Just as businesses fund studies that support their goals, government agencies fund studies that justify the need for their services and expansion of their powers and budgets. In fact, there's a whole field of study v

Re: [R] Accessing data via url

2011-01-07 Thread David Winsemius
I don't know how Henrique did it, but in Firefox one can go to the Downloads panel and right click on the downloaded file and choose "Copy Download link" (or something similar) and get: https://6326258883408400442-a-1802744773732722657-s-sites.googlegroups.com/site/jrkrideau/home/general-stor

Re: [R] Waaaayy off topic...Statistical methods, pub bias, scientific validity

2011-01-07 Thread Claudia Beleites
On 01/07/2011 06:13 AM, Spencer Graves wrote: A more insidious problem, that may not affect the work of Jonah Lehrer, is political corruption in the way research is funded, with less public and more private funding of research Maybe I'm too pessimistic, but the term _political_ corruption

Re: [R] Waaaayy off topic...Statistical methods, pub bias, scientific validity

2011-01-07 Thread John Kane
--- On Fri, 1/7/11, Peter Langfelder wrote: > From: Peter Langfelder > Subject: Re: [R] Wyy off topic...Statistical methods, pub bias, > scientific validity > To: "r-help@r-project.org" > Received: Friday, January 7, 2011, 2:06 AM > >From a purely statistical and > maybe somewhat naive p

Re: [R] Accessing data via url

2011-01-07 Thread John Kane
Great, but how did you do that?  --- On Fri, 1/7/11, Henrique Dallazuanna wrote: From: Henrique Dallazuanna Subject: Re: [R] Accessing data via url To: "John Kane" Cc: r-help@r-project.org, "Dieter Menne" Received: Friday, January 7, 2011, 1:31 PM Google redirect to: https://63262588834084

Re: [R] Assumptions for ANOVA: the right way to check the normality

2011-01-07 Thread Greg Snow
A lot of this depends on what question you are really trying to answer. For one way anova replacing y-values with their ranks essentially transforms the distribution to uniform (under the null) and the Central Limit Theorem kicks in for the uniform with samples larger than about 5, so the norma

Re: [R] Accessing data via url

2011-01-07 Thread John Kane
Well it seems to mean that the file has moved.  It , to my untrained eye, seems to be in the same sport as it was yesterday BTW I am now talking about dd <- "https://sites.google.com/site/jrkrideau/home/general-stores/duplicates.csv"; Would this indicate it's physically moving on googe servers?

Re: [R] Waaaayy off topic...Statistical methods, pub bias, scientific validity

2011-01-07 Thread Ravi Varadhan
I think that the strategy of Editors simply telling the authors to share or perish is a bit naïve. There are a number of practical challenges that need to be addressed in order to create a fair and effective open-learning environment. Eysenbach (BMJ 2001) and Vickers (2006) discuss these and some

Re: [R] Summing over specific columns in a matrix

2011-01-07 Thread Mark Knecht
On Fri, Jan 7, 2011 at 8:42 AM, Henrique Dallazuanna wrote: > Try this: > > rowSums(rowsum(t(m), rep(1:3, c(2, 2, 1)), na.rm = TRUE)) > > > On Fri, Jan 7, 2011 at 2:29 PM, emj83 wrote: > >> >> Hi, >> >> I would like to sum some specific columns in my matrix- for example, my >> matrix looks like t

Re: [R] Accessing data via url

2011-01-07 Thread Henrique Dallazuanna
Take a look on the return of: rawToChar(x) On Fri, Jan 7, 2011 at 4:13 PM, John Kane wrote: > > > --- On Fri, 1/7/11, Dieter Menne wrote: > > > From: Dieter Menne > > > Your original file is no longer there, but when I try RCurl > > with a png file > > that is present, I get a certificate er

Re: [R] Merging zoo objects

2011-01-07 Thread Pete B
Thanks Gabor. Much appreciated (as always). -- View this message in context: http://r.789695.n4.nabble.com/Merging-zoo-objects-tp3184696p3186113.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https:/

Re: [R] Accessing data via url

2011-01-07 Thread John Kane
--- On Fri, 1/7/11, Prof Brian Ripley wrote: > From: Prof Brian Ripley > Subject: Re: [R] Accessing data via url > ?read.table says > >            ‘file’ > can also be a complete URL. > > This is implemented by url(): see the section on URLs on > its help Thanks > page.  You haven't foll

Re: [R] Merging zoo objects

2011-01-07 Thread Gabor Grothendieck
On Fri, Jan 7, 2011 at 1:01 PM, Pete B wrote: > > Hi > > I have n zoo objects M1, M2, M3, ... , Mn that I want to merge where n is a > number calculated at run-time. > > I am struggling to find the correct syntax to do this > > Assuming n is calculated as 10 (for example), I have tried > > n = 10

Re: [R] Accessing data via url

2011-01-07 Thread John Kane
--- On Fri, 1/7/11, Dieter Menne wrote: > From: Dieter Menne > Your original file is no longer there, but when I try RCurl > with a png file > that is present, I get a certificate error: > > Dieter Since replaced with dd <- "https://sites.google.com/site/jrkrideau/home/general-stores/dupli

Re: [R] Waaaayy off topic...Statistical methods, pub bias, scientific validity

2011-01-07 Thread Spencer Graves
I applaud your efforts, Ravi. Regarding "Whose data is it?", I humbly suggest that referees and editorial boards push (demand?) for rules that require the raw data be made available to the referees and concurrent with publication. Spencer On 1/7/2011 8:43 AM, Ravi Varadhan wrot

[R] Merging zoo objects

2011-01-07 Thread Pete B
Hi I have n zoo objects M1, M2, M3, ... , Mn that I want to merge where n is a number calculated at run-time. I am struggling to find the correct syntax to do this Assuming n is calculated as 10 (for example), I have tried n = 10 # First Effort alldata= merge(paste("M",rep(1:n), sep=""),all=T

Re: [R] Accessing data via url

2011-01-07 Thread John Kane
This seems to get me something (the binary format) but what do I do with it? Thanks to everyone for the help. Results: Original dd file on my hard drive: mydd <- structure(list(AUA9363 = structure(c(1L, 1L, 2L, 3L, 3L, 4L, 4L, 4L, 6L, 5L, 5L), .Label = c("AUA9733", "AUA9734", "JAF104", "KLM686

Re: [R] how to calculate this natural logarithm

2011-01-07 Thread Ted Harding
On 07-Jan-11 16:20:59, zhaoxing731 wrote: > Hello > I want to calculate natural logarithm of sum of combinations > as follow: (R code) {com_sum=choose(200,482)*choose(100,118)+ choose(200,483)*choose(100,117)+...+ choose(200,i)*choose(100,600-i)+...+ choose(200,600)*

Re: [R] Match numeric vector against rows in a matrix?

2011-01-07 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Petr Savicky > Sent: Friday, January 07, 2011 2:11 AM > To: r-help@r-project.org > Subject: Re: [R] Match numeric vector against rows in a matrix? > > On Wed, Jan 05, 2011 at 07:

Re: [R] Waaaayy off topic...Statistical methods, pub bias, scientific validity

2011-01-07 Thread Alan Kelly
Bert, consider the short rebuttal offered by George Musser in Scientific American: http://www.scientificamerican.com/blog/post.cfm?id=in-praise-of-scientific-error-2010-12-20 Perhaps a more realistic assessment of the (acknowledged) problem. Regards, Alan Kelly Trinity College Dublin On 7 Jan

Re: [R] How to export/save an "mrpp" object?

2011-01-07 Thread Gavin Simpson
On Fri, 2011-01-07 at 14:04 +0200, Nikos Alexandris wrote: > Nikos: > > > > I finally ran mrpp tests. I think all is fine but one very important > > > issue: I > > > have no idea how to export/save an "mrpp" object. Tried anything I > > > know and > > > searched the archives but found nothing. >

Re: [R] Waaaayy off topic...Statistical methods, pub bias, scientific validity

2011-01-07 Thread Ravi Varadhan
I have just recently written about this issue (i.e. open learning and data sharing) in a manuscript that is currently under review in a clinical journal. I have argued that data hoarding is unethical. Participants in research studies give their time, effort, saliva and blood in the altruistic hop

Re: [R] Summing over specific columns in a matrix

2011-01-07 Thread Henrique Dallazuanna
Try this: rowSums(rowsum(t(m), rep(1:3, c(2, 2, 1)), na.rm = TRUE)) On Fri, Jan 7, 2011 at 2:29 PM, emj83 wrote: > > Hi, > > I would like to sum some specific columns in my matrix- for example, my > matrix looks like this: > [,1] [,2] [,3] [,4] [,5] > [1,]1 NA NA NA NA > [2,

Re: [R] Problems with glht function for lme object

2011-01-07 Thread David Winsemius
On Jan 7, 2011, at 8:28 AM, anord wrote: Dear all, I'm trying to make multiple comparisons for an lme-object. The data is for an experiment on parental work load in birds, in which adults at different sites were induced to work at one of three levels ('treat'; H, M, L). The response is

[R] how to calculate this natural logarithm

2011-01-07 Thread zhaoxing731
Hello I want to calculate natural logarithm of sum of combinations as follow: (R code) { com_sum=choose(200,482)*choose(100,118)+choose(200,483)*choose(100,117)+...+choose(200,i)*choose(100,600-i)+...+choose(200,600)*choose(100,0)

[R] Summing over specific columns in a matrix

2011-01-07 Thread emj83
Hi, I would like to sum some specific columns in my matrix- for example, my matrix looks like this: [,1] [,2] [,3] [,4] [,5] [1,]1 NA NA NA NA [2,]21 NA1 NA [3,]321 21 [4,]432 32 [5,] NA NA NA43 [6,] NA

Re: [R] Odp: Currency return calculations

2011-01-07 Thread Amelia Vettori
My mistake sir. I was literally engrossed in my stupid logic, and while doing so, overlooked the simple and very effective solution you had offered. Sorry once again sir and will certainly try to be very careful in future. Thanks again and have a great weekend sir. Regards Amelia --- On Fri,

Re: [R] Different LLRs on multinomial logit models in R and SPSS

2011-01-07 Thread David Winsemius
On Jan 7, 2011, at 8:26 AM, sovo0...@gmail.com wrote: On Thu, 6 Jan 2011, David Winsemius wrote: On Jan 6, 2011, at 11:23 AM, Sören Vogel wrote: Thanks for your replies. I am no mathematician or statistician by far, however, it appears to me that the actual value of any of the two LLs i

Re: [R] Problems with glht function for lme object

2011-01-07 Thread Ben Bolker
anord zooekol.lu.se> writes: > > > Dear all, > > I'm trying to make multiple comparisons for an lme-object. The data is for > an experiment on parental work load in birds, in which adults at different > sites were induced to work at one of three levels ('treat'; H, M, L). The > response is 'f

[R] anova vs aov commands for anova with repeated measures

2011-01-07 Thread Frodo Jedi
Dear all, I need to understand a thing in the beheaviour of the two functions aov and anova in the following case involving an analysis of ANOVA with repeated measures: If I use the folowing command I don´t get any problem: >aov1 = aov(response ~ stimulus*condition + >Error(subject/(stimulus*co

Re: [R] Problem with timeSequence {timeDate} - wrong end date

2011-01-07 Thread Joshua Wiley
Thank you, Martin (and all of R core) for all your work making such wonderful software available. Not only is it practical, using R, going through the source code and the documentation has been a huge learning experience for me. I am very grateful to you and everyone else for being so generous wi

Re: [R] POSIXct issue

2011-01-07 Thread Prof Brian Ripley
On Fri, 7 Jan 2011, Rustamali Manesiya wrote: Hello I have trouble getting my original datetime back see below. I hope I am missing something. Please help. The numeric form (which you should never use) has an origin at midnight in UTC, not EST. Note too that 'EST' is not very plausible for

[R] how to run linear regression models at once

2011-01-07 Thread wangwallace
hey, folks, I have two very simple questions. I am not quite sure if I can do this using R. so, I am analyzing a large data frame with thousands of variables. For example: Dependent variables: d1, d2, d3 (i.e., there are three dependent variables) Independent variables: s1, s2, s3, ..s100

Re: [R] vector of character with unequal width

2011-01-07 Thread jose Bartolomei
Dear R users, Thanks for your help The recomendations were exaclty what I was searching. Bellow the one I will use for my script. Thanks again, jose nchar(xx) [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

[R] Contour plot with time on X-axis (day) and Y-axis (hours)

2011-01-07 Thread xbodin
Hello all, I'd like to graphically represent an hourly temperature timeseries ( http://r.789695.n4.nabble.com/file/n3179098/data.csv data.csv , and see below for pre-process of the data) with the R functions image + contour. To do that I wrote that script ( http://r.789695.n4.nabble.com/file/n317

[R] POSIXct issue

2011-01-07 Thread Rustamali Manesiya
Hello I have trouble getting my original datetime back see below. I hope I am missing something. Please help. > tt <- as.POSIXct("2011-01-07 07:49:13", tz="EST") > tt [1] "2011-01-07 07:49:13 EST" > ttn <- as.numeric(tt) > ttn [1] 1294404553 > tt <- as.POSIXct(ttn,origin='1970-01-01',tz="EST") >

Re: [R] Problem with timeSequence {timeDate} - wrong end date

2011-01-07 Thread Martin Maechler
> Joshua Wiley > on Thu, 6 Jan 2011 06:47:43 -0800 writes: > On Thu, Jan 6, 2011 at 5:27 AM, Joshua Wiley wrote: >> timeSequence() ultimately is relying on seq.POSIXt(). If you look at > My apologies, I spoke nonsense---timeSequence() does NOT rely on > seq.POSIXt(

Re: [R] defining a formula method for a weighted lm()

2011-01-07 Thread Michael Friendly
Thanks, Martin Now I understand 'standard non-standard evaluation' magic, and the code in http://developer.r-project.org/model-fitting-functions.txt explains how this works. Still, I can't help but think of this as evil-magic, for which some anti-magic would be extremely useful, so that a simp

Re: [R] Accessing data via url

2011-01-07 Thread Dieter Menne
Henrique Dallazuanna wrote: > > With the ssl.verifypeer = FALSE argument it works: > > x = getBinaryURL(dd, ssl.verifypeer = FALSE) > > Thank, good to know. It's only in the examples of ..., but is looks like a parameter important enough to be included in the docs of getBinaryURL. Digging t

[R] Problems with glht function for lme object

2011-01-07 Thread anord
Dear all, I'm trying to make multiple comparisons for an lme-object. The data is for an experiment on parental work load in birds, in which adults at different sites were induced to work at one of three levels ('treat'; H, M, L). The response is 'feedings', which is a quantitative measure of nes

Re: [R] Different LLRs on multinomial logit models in R and SPSS

2011-01-07 Thread sovo0815
On Thu, 6 Jan 2011, David Winsemius wrote: On Jan 6, 2011, at 11:23 AM, Sören Vogel wrote: Thanks for your replies. I am no mathematician or statistician by far, however, it appears to me that the actual value of any of the two LLs is indeed important when it comes to calculation of Pseudo-R-S

Re: [R] Waaaayy off topic...Statistical methods, pub bias, scientific validity

2011-01-07 Thread Spencer Graves
I wholeheartedly agree with the trend towards publishing datasets. One way to do that is as datasets in an R package contributed to CRAN. Beyond this, there seems to be an increasing trend towards journals requiring authors of scientific research to publish their data as well.

Re: [R] Parsing JSON records to a dataframe

2011-01-07 Thread Martin Morgan
On 01/07/2011 12:05 AM, Dieter Menne wrote: > > > Jeroen Ooms wrote: >> >> What is the most efficient method of parsing a dataframe-like structure >> that has been json encoded in record-based format rather than vector >> based. For example a structure like this: >> >> [ {"name":"joe", "gender":"

Re: [R] Cairo pdf canvas size

2011-01-07 Thread Eduardo de Oliveira Horta
Thanks! On Thu, Jan 6, 2011 at 7:13 PM, Dennis Murphy wrote: > Hi: > > On Thu, Jan 6, 2011 at 5:36 AM, Eduardo de Oliveira Horta > wrote: >> >> Peter, >> thank you, that's what I was looking for! >> David, I forgot to tell you my OS. Sorry... it's Win7. I'm running a >> RKWard session. >> And th

Re: [R] Prediction error for Ordinary Kriging

2011-01-07 Thread Jon Olav Skoien
Pearl, You find the prediction error as the var1.var column in your result object, i.e., y in your script. For plotting: spplot(y, 2) or spplot(y,"var1.var") Jon On 1/5/2011 9:28 PM, pearl may dela cruz wrote: Hi ALL, Can you please help me on how to determine the prediction error for or

Re: [R] Dont show zero values in line graph

2011-01-07 Thread Uwe Ligges
On 07.01.2011 04:10, LCOG1 wrote: Hey everyone, Im getting better at plotting my data but cant for the life of me figure out how to show a line graph with missing data that doesnt continue the line down to zero then back up to the remaining values. Consider the following x<-c(1:5,0,0,8:10

Re: [R] Cross validation for Ordinary Kriging

2011-01-07 Thread Jon Olav Skoien
On 1/7/2011 12:40 PM, Jon Olav Skoien wrote: Pearl, The error suggests that there is something wrong with x2, and that there is a difference between the row names of the coordinates and the data. If you call str(x2) see if the first element of @coords is different from NULL, as this can caus

Re: [R] How to make a Cluster of Clusters

2011-01-07 Thread Diego Pujoni
Hi Michael, I agree with you and I will make this ordination. But I also want to check a spatial correlation of the variables, so I thought that comparing the dendrogram of the environmental variables with the dendrogram of the geographical distances of the lakes it will indicates if similar lakes

[R] Odp: Currency return calculations

2011-01-07 Thread Petr PIKAL
Hi What is wrong with my suggestion then. > rate1 USDGBP EURO CHFAUD 1 112.05 171.52 42.71 41.50 109.55 2 112.90 168.27 42.68 41.47 102.52 3 110.85 169.03 41.86 42.84 114.91 4 109.63 169.64 44.71 43.44 122.48 5 108.08 169.29 44.14 43.69 122.12 6 111.23 169.47 44.58 42.30 12

Re: [R] Match numeric vector against rows in a matrix?

2011-01-07 Thread Henrique Dallazuanna
Try this: which(colSums(t(combs) == x) == ncol(combs)) On Wed, Jan 5, 2011 at 5:16 PM, Kevin Ummel wrote: > Two posts in one day is not a good day...and this question seems like it > should have an obvious answer: > > I have a matrix where rows are unique combinations of 1's and 0's: > > > com

[R] Currency return calculations

2011-01-07 Thread Amelia Vettori
Dear sir, I am extremely sorry for messing up the logic asking for help w.r.t. my earlier mails   I have tried to explain below what I am looking for.     I have a database (say, currency_rates) storing datewise currency exchange rates with some base currency XYZ.   currency_rates <- data

Re: [R] How to export/save an "mrpp" object?

2011-01-07 Thread Nikos Alexandris
Nikos: > > I finally ran mrpp tests. I think all is fine but one very important > > issue: I > > have no idea how to export/save an "mrpp" object. Tried anything I > > know and > > searched the archives but found nothing. David W: > And what happened when you tried what seems like the obvious:

Re: [R] Waaaayy off topic...Statistical methods, pub bias, scientific validity

2011-01-07 Thread Mike Marchywka
> Date: Thu, 6 Jan 2011 23:06:44 -0800 > From: peter.langfel...@gmail.com > To: r-help@r-project.org > Subject: Re: [R] Wyy off topic...Statistical methods, pub bias, > scientific validity > > >From a purely statistical and maybe somewhat naive point of view, > published p-values should

Re: [R] How to join matrices of different row length from a list

2011-01-07 Thread A.N. Spiess
Dear Emma, there is a 'cbind.na', 'rbind.na' and 'data.frame.na' function in my qpcR package. library(qpcR) matLis <- list(matrix(1:4, 2, 2), matrix(1:6, 3, 2), matrix(2:1, 1, 2)) do.call(cbind.na, matLis) They are essentially the generic functions extended with an internal fill. You migh

[R] Extracting user specified variables from data frame to use as function arguments

2011-01-07 Thread nikhil abhyankar
Hello All; I am writing an R program in the form of a function to find out the summary statistics for response variable(s) in a data frame. I need to accept variable names from the data as arguments and use them inside the function for various tasks. The dataset name is also one of the arguments

Re: [R] Accessing data via url

2011-01-07 Thread Henrique Dallazuanna
With the ssl.verifypeer = FALSE argument it works: x = getBinaryURL(dd, ssl.verifypeer = FALSE) On Fri, Jan 7, 2011 at 6:24 AM, Dieter Menne wrote: > > > John Kane-2 wrote: > > > > # Can anyone suggest why this works > > > > datafilename <- > > "http://personality-project.org/r/datasets/maps

Re: [R] Accessing data via url

2011-01-07 Thread Mike Marchywka
> Date: Fri, 7 Jan 2011 00:24:19 -0800 > From: dieter.me...@menne-biomed.de > To: r-help@r-project.org > Subject: Re: [R] Accessing data via url > > > > John Kane-2 wrote: > > > > # Can anyone suggest why this works > > > > datafilename <- > > "http://personality-project.org/r/datasets/maps.mix

Re: [R] weighed mean of a data frame row-by-row

2011-01-07 Thread Vassilis
Thanks for the help guys! For my purpose I think that rharlow2's answer, i.e. the `rowSums' function is the most appropriate since it also takes care of the NAs. Best, Vassilis -- View this message in context: http://r.789695.n4.nabble.com/weighed-mean-of-a-data-frame-row-by-row-tp3177421p31

Re: [R] Cross validation for Ordinary Kriging

2011-01-07 Thread Jon Olav Skoien
Pearl, The error suggests that there is something wrong with x2, and that there is a difference between the row names of the coordinates and the data. If you call str(x2) see if the first element of @coords is different from NULL, as this can cause some problems when cross-validating. If it i

Re: [R] Match numeric vector against rows in a matrix?

2011-01-07 Thread Petr Savicky
On Wed, Jan 05, 2011 at 07:16:47PM +, Kevin Ummel wrote: > Two posts in one day is not a good day...and this question seems like it > should have an obvious answer: > > I have a matrix where rows are unique combinations of 1's and 0's: > > > combs=as.matrix(expand.grid(c(0,1),c(0,1))) > > co

Re: [R] R packages for R 2.11.1

2011-01-07 Thread Uwe Ligges
On 07.01.2011 09:21, Prof Brian Ripley wrote: On Thu, 6 Jan 2011, Joshua Wiley wrote: I would try using the R 2.12.1 packages first, but if that does not On 32-bit Windows this will not work if compiled code is involved: both the compiler and the package layout changed at 2.12.0. However,

[R] Odp: Calculating Returns : (Extremely sorry for earlier incomplete mail)

2011-01-07 Thread Petr PIKAL
Hi Your code is quite complicated and I get an error spot_returns_table <- lapply(1:nrow(trans), function(z) with(trans[z, ], spot_trans(currency_trans=trans$currency_transacted))) Error in if (currency_trans == "USD") { : argument is of length zero It seems to me that you do not know what is y

Re: [R] Stepwise SVM Variable selection

2011-01-07 Thread Georg Ruß
On 06/01/11 23:10:59, Noah Silverman wrote: > I have a data set with about 30,000 training cases and 103 variable. > I've trained an SVM (using the e1071 package) for a binary classifier > {0,1}. The accuracy isn't great. I used a grid search over the C and G > parameters with an RBF kernel to fi

[R] Converting Fortran or C++ etc to R

2011-01-07 Thread Murray Jorgensen
I will wind this thread up with some happy comments. I have indeed succeeded in constructing an R program to do the same thing as my Fortran program for an EM algorithm. I have not done timings yet but it seems to run acceptably fast for my purposes. The key code to be replaced was the E and t

Re: [R] Help with IF operator

2011-01-07 Thread Petr Savicky
On Thu, Jan 06, 2011 at 12:21:33PM -0800, ADias wrote: > > Hi, > > I am with a problem on how to do a comparison of values. My script is as > follows: > > repeat{ > cat("How many teams to use? (to end write 0) ") > nro<-scan(n=1) > if(nro==0)break > cat("write the", nro, "teams names \n") > team

Re: [R] Creating a Matrix from a vector with some conditions

2011-01-07 Thread Petr Savicky
On Thu, Jan 06, 2011 at 01:34:31PM -0800, ADias wrote: > > Hi > > Suppose we have an object with strings: > > A<-c("a","b","c","d") > > Now I do: > > B<-matrix(A,4,4, byrow=F) > > and I get > > a a a a > b b b b > c c c c > d d d d > > But what I really want is: > > a b c d > b c d a > c d

  1   2   >