[R] dead code removal

2011-07-18 Thread Alex Bird
Hi there, I have some unused code in my project but have no idea how to clean it up in some kind of automatic way. Maybe there are some tools/ways to identify and remove/mark dead parts of the code? Thanks in advance! Kind regards, Alex __ R-help@

Re: [R] Plotting intraday data in quantmod

2011-07-18 Thread Joshua Ulrich
What's your problem? What have you tried? -- Joshua Ulrich  |  FOSS Trading: www.fosstrading.com On Mon, Jul 18, 2011 at 11:39 PM, kev946 wrote: > Hello, I'm new to R and am having trouble plotting intraday data on a chart. > I haven't had any success with using ideas from some other posts or

[R] Plotting intraday data in quantmod

2011-07-18 Thread kev946
Hello, I'm new to R and am having trouble plotting intraday data on a chart. I haven't had any success with using ideas from some other posts or other content. My data is in csv format, here's the first few rows: TimeStamp..UTC. OpenHighLow Close 1 2011-06-15 13:30:00:0

Re: [R] grey colored lines and overwriting labels i qqplot2

2011-07-18 Thread Sigrid
Hi I apologize for not providing reproducible codes more clearly, and I hope this will be more understandable. I have 14 lines (7 per facet that I would like to add). I will provide you with six of the lines from the data as that should enough data to work with, and also result in less plotting

Re: [R] strange problem with strptime and date variable

2011-07-18 Thread Edwin Sun
David - Thanks very much. That is a great hint. I believe that is the solution. Edwin Sun -- View this message in context: http://r.789695.n4.nabble.com/strange-problem-with-strptime-and-date-variable-tp3677178p3677205.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] strange problem with strptime and date variable

2011-07-18 Thread David Winsemius
On Jul 18, 2011, at 11:21 PM, Edwin Sun wrote: Hello all, I am manipulating a large database with 70,000 records. "strptime" generates a date variable but R treats some of the values as NA. I attach a simple example below. Cannot duplicate but I'm betting on three words: daylight savin

[R] strange problem with strptime and date variable

2011-07-18 Thread Edwin Sun
Hello all, I am manipulating a large database with 70,000 records. "strptime" generates a date variable but R treats some of the values as NA. I attach a simple example below. I have spent hours on this problem. Any hint would be greatly appreciated. Many thanks, Edwin Sun # ===start of sa

Re: [R] "may be used in an incorrect context" [solved]

2011-07-18 Thread Ross Boylan
On Tue, 2011-07-19 at 13:55 +1200, Rolf Turner wrote: > I can't give you a definitive answer, but your use of "..." in your call > to optim() > makes no sense at all to me. The "..." argument to optim() is used to > pass further > arguments (in addition to the argument over which the objective f

Re: [R] "may be used in an incorrect context"

2011-07-18 Thread Rolf Turner
I can't give you a definitive answer, but your use of "..." in your call to optim() makes no sense at all to me. The "..." argument to optim() is used to pass further arguments (in addition to the argument over which the objective function is being optimized) to the objective function. If th

[R] "may be used in an incorrect context"

2011-07-18 Thread Ross Boylan
R CMD check tells me * checking R code for possible problems ... NOTE agexact.fit.rds: ... may be used in an incorrect context: ‘optim(init, agfitfn, ...)’ Warning: : ... may be used in an incorrect context: ‘optim(init, agfitfn, ...)’ Can anyone tell me what this message means? My searches ha

Re: [R] ecdf() to nls() - how to transform data?

2011-07-18 Thread Jochen1980
Ok, I think I had a good idea to solve my problem and need someone who second me on that or tell me what a fool I am :-) . My problem: I went for curve-fitting with nls() and took knot()-ecdf() for collecting data for nls-basis-dataframe. I came into trouble, because my x-y-data of the data.frame(

Re: [R] Drawing a histogram from a massive dataset

2011-07-18 Thread Joshua Wiley
On Mon, Jul 18, 2011 at 2:08 PM, Paul Smith wrote: > On Mon, Jul 18, 2011 at 9:11 PM, Joshua Wiley wrote: >>> [snip] I guess that I must have a data frame to plot a histogram. >> >> Not at all! >> >> ## a *vector* of 100 million observation >> x <- rnorm(10^8) >> ## a histogram for it (see attach

[R] R on a server (Windows Server 2008)

2011-07-18 Thread Dimitri Liakhovitski
Apologies for a naive question: Can R be installed and run on a server (operating system Windows Server 2008)? Thank you! -- Dimitri Liakhovitski __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posti

Re: [R] How to speed up interpolation

2011-07-18 Thread jim holtman
To recover the runways, try: levels(df$lrw)[times[, 'runway']] The 'runway' column has the index into 'levels(df$lrw)' On Mon, Jul 18, 2011 at 4:35 PM, James Rome wrote: > There is one problem. No matter what I do, I can't recover the correct > runway in the final list. > You had "rw = as.nume

Re: [R] cluster by unique value

2011-07-18 Thread Petr Savicky
On Mon, Jul 18, 2011 at 06:36:13AM -0400, Sarah Goslee wrote: > Your data1 and your data1_class file differ in the first three > columns. Assuming that's an error, here's one way to do it: > > > data1 <- data.frame(layer1=c(.2, .5, .2, .8, .2, .5, .5, .8, .2, > > .8),layer2=c(2,3,2,2,1,2,3,2,2,2)

[R] Using Mplus via R

2011-07-18 Thread Dimitri Liakhovitski
Clarification question: does one need Mplus installed in order to use Mplus Automation package? -- Dimitri Liakhovitski www.ninah.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide htt

[R] Testers wanted for program that works with R

2011-07-18 Thread Roy Mendelssohn
Hi All: Along with Applied Sciences Associates we have been working on a GUI add-on for R that allows easy access to literally pterabytes of remote oceanographic and meteorological data that can be subsetted in time and space, and then will be brought directly into R using web services. The pr

Re: [R] How to convert number (matlab) to date

2011-07-18 Thread steven mosher
Thanks, I just upgraded to 1.7.1 Also thanks for adding the t() function. On Mon, Jul 18, 2011 at 12:38 PM, Gabor Grothendieck < ggrothendi...@gmail.com> wrote: > On Mon, Jul 18, 2011 at 2:57 PM, peter dalgaard wrote: > > > > On Jul 18, 2011, at 20:19 , Gabor Grothendieck wrote: > > > >> On

[R] Correspondence Analysis of Textual Data and Visualization of Correspondence Results in a 3d plot with the ‘ca’ package.

2011-07-18 Thread gabriele
Good Evening, my aim is to perform a multiple correspondence analysis on a textual matrix by using the ‘ca’ package, which performs a 3d visualization of the results. Specifically, the frequency matrix contains words (rows) and variables (columns), and the contempt of each cell is the occurrence o

Re: [R] heatmap with RNA-Seq data

2011-07-18 Thread rebioman
That what I did, I replaced the -infinite with lowest number I got from my data set. I'm not sure this kind of data manipulation is allowed in a publication -- View this message in context: http://r.789695.n4.nabble.com/heatmap-with-RNA-Seq-data-tp3676207p3676280.html Sent from the R help mailing

[R] Fitting a multi-level logistic model

2011-07-18 Thread Rafael Piñeiro
We are trying to fit a multi-level logistic regression and we work with public opinion data. Our dependent variable is "interest in politics", a dummy variable. We have individual and group-level (country) covariates. Hence, we work with group level predictors. Actually, our theory argues that, th

[R] list of data.frames

2011-07-18 Thread Andrew Winterman
Hey there, I've got a for loop in my code which I'm having difficulty seeing how to avoid. Here's the code, with some sample data. You can safely copy and paste into the interpreter if you want. #I have some data frames. a <- as.data.frame(matrix(runif(50), nrow = 10, ncol = 5)) b <- as.data.fra

Re: [R] Number in interval

2011-07-18 Thread Greg Snow
Good point, I have added a note and example to the documentation to this effect. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: William Dunlap [mailto:wdun...@tibco.com] > Sent: Monday, July

[R] Doesnt' winedt 6 version work as Rwinedt?

2011-07-18 Thread Soyeon Kim
Dear All, I've tried install Rwinedt using my Winedt 6. I cannot see R tab in Rwinedt even though I followed the instruction. (Installed RWinEdt and called the library) Version 6 doesn't work? If not, if would you recommend an R editor for window user?(Except for Emacs) Thanks, [[alterna

Re: [R] Number in interval

2011-07-18 Thread William Dunlap
Note that the precendence of %<=% is not the same as that of <=, so you can be surprised by its behavior in slightly more complex expressions: > z <- seq(1.2, len=5, by=.7) > which( 2 %<=% z %<=% 3 ) # same as which(2<=z & z<=3) [1] 3 > which( 2 %<=% z %<=% 1.5*2 ) Error in which(2 %<=%

Re: [R] Drawing a histogram from a massive dataset

2011-07-18 Thread Paul Smith
On Mon, Jul 18, 2011 at 9:11 PM, Joshua Wiley wrote: >> [snip] I guess that I must have a data frame to plot a histogram. > > Not at all! > > ## a *vector* of 100 million observation > x <- rnorm(10^8) > ## a histogram for it (see attached for the result from my system) > hist(x) > > No data frame

Re: [R] customize output in Excel and creating reports in word.

2011-07-18 Thread Greg Snow
There are several options depending on what exactly you want to do. If you use code like: > write.table(x, 'clipboard', sep='\t') In R, then go to excel and choose a cell and paste to it, the matrix or data frame 'x' will be pasted into excel at that point (topleft corner of data goes in selec

Re: [R] IDE with table/matrix preview

2011-07-18 Thread Steven Kennedy
Try RStudio. It is the best IDE for R I've seen. On Tue, Jul 19, 2011 at 3:31 AM, Michael Bernsteiner wrote: > > I know there are several threads about IDEs for R. > > I've tried Tinn-R, but I am looking for an IDE (win) with a preview function > that shows me the variables and the table/matrix

Re: [R] ?Accuracy of prop.test

2011-07-18 Thread Greg Snow
Others have explained why R gives a different answer based on a different approximation, but if you want to get the same answer as the book/minitab/... for your own understanding (or so the grader doesn't get confused by superior answers, or other reasons) here is one way to do it: > x <- c( re

Re: [R] Number in interval

2011-07-18 Thread Greg Snow
A small modification of this would be: > library(TeachingDemos) > -3 %<=% z %<=% 3 Whether that is prettier or uglier than Jim's answer is in the eye of the beholder (for longer variable names this version could save a few key strokes). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center I

Re: [R] How to speed up interpolation

2011-07-18 Thread James Rome
There is one problem. No matter what I do, I can't recover the correct runway in the final list. You had "rw = as.numeric(df$lrw) # index into 'levels' " I have tried df$lrw = factor(df$lrw, ordered=TRUE) rwys = factor(unique(df$lrw), ordered=TRUE)# Get the names of the runways > rwy

Re: [R] special question on regression

2011-07-18 Thread Greg Snow
I remember seeing an example using the EM algorithm where one of the variables was age of child and they assumed that an age like 16 months was accurate to the month, but ages like 18 months may have been off by as much as 2 months and ages like 3 years could be off by 6 months (or more), so the

Re: [R] Drawing a histogram from a massive dataset

2011-07-18 Thread Joshua Wiley
On Mon, Jul 18, 2011 at 10:57 AM, Paul Smith wrote: > [snip] I guess that I must have a data frame to plot a histogram. Not at all! ## a *vector* of 100 million observation x <- rnorm(10^8) ## a histogram for it (see attached for the result from my system) hist(x) No data frame required. I wou

Re: [R] heatmap with RNA-Seq data

2011-07-18 Thread David Winsemius
On Jul 18, 2011, at 3:34 PM, rebioman wrote: Hi all, new to this forum I'm try to using R to draw a heatmap of my RNA-seq data before doing that I did a log2 transformation of my data and produce a lot -inf in the matrix when I try to use the heatmap function, it seems can not deal with th

[R] Problem compiling in extra/xdr

2011-07-18 Thread Allin Cottrell
I'm building R 2.13.1 on i686-pc-linux-gnu, using gcc 4.6.1 and with glibc 2.14. I get this error: In file included from xdr.c:61:0: ./rpc/types.h:63:14: error: conflicting types for 'malloc' make[4]: *** [xdr.o] Error 1 I can make the build proceed some by commenting out the declaration "exte

Re: [R] line jump in plot legend title

2011-07-18 Thread David Winsemius
On Jul 18, 2011, at 1:14 PM, Dutrieux, Loïc wrote: Hello, In order to reduce the width of my legend in a plot I introduced line jumps in the title. Here's the problem; the legend box hasn't adapted accordingly and part of the title is printed out of the frame. See the example below: plot

[R] heatmap with RNA-Seq data

2011-07-18 Thread rebioman
Hi all, new to this forum I'm try to using R to draw a heatmap of my RNA-seq data before doing that I did a log2 transformation of my data and produce a lot -inf in the matrix when I try to use the heatmap function, it seems can not deal with the -inf so I was wondering how to deal with these gene

[R] np package, estimating the standard errors of Klein and Spady's estimator

2011-07-18 Thread Dimitris.Kapetanakis
Dear all, I would like to estimate the standard errors of Klein and Spady's estimator for that I am using: library(np) N<-100 X<-matrix(c(rnorm(N,1,1), rnorm(N,0,1)), ncol=2) BETA <-matrix(1,2,1) Z<-X%*%BETA L<-rlogis(N,location=0, scale=1) Y <-as.vector(X%*%BETA+L>=0)*1 KS <- npindexbw (xda

[R] Installation of rblas package (R interface to the BLAS and LAPACK)

2011-07-18 Thread Madan Kundu
Hi, I am trying to install the package rblas which is an R interface to the BLAS and LAPACK libraries. I have downloaded the rblas.tar from http://sites.google.com/site/jivsoft/Home/r-blas-interface

Re: [R] How to convert number (matlab) to date

2011-07-18 Thread Gabor Grothendieck
On Mon, Jul 18, 2011 at 2:57 PM, peter dalgaard wrote: > > On Jul 18, 2011, at 20:19 , Gabor Grothendieck wrote: > >> On Mon, Jul 18, 2011 at 1:59 PM, peter dalgaard wrote: >>> >>> On Jul 18, 2011, at 16:36 , Gabor Grothendieck wrote: > > . > > However, this was after reinstal

Re: [R] Understanding R's "Environment" concept

2011-07-18 Thread Barry Rowlingson
On Mon, Jul 18, 2011 at 7:16 PM, Nipesh Bajaj wrote: > Hi all, I am trying to understand the R's "environment" concept > however the underlying help files look quite technical to me. Can > experts here provide me some more intuitive ideas behind this concept > like, why it is there, what exactly i

Re: [R] Drawing a histogram from a massive dataset

2011-07-18 Thread Paul Smith
Thanks, Dennis, for your suggestions. I was thinking about the package 'sqldf', but I guess that I must have a data frame to plot a histogram. Paul On Fri, Jul 15, 2011 at 4:15 PM, Dennis Murphy wrote: > I would suggest that you avoid the histogram and make a density plot > instead. It would be

[R] [SDMtools] how to calculate total edge of patch excluding landscape boundary

2011-07-18 Thread Insu Koh
Hi, R users, I have a question about using ClassStat in SDMtools. I want to calculate total edge of patch; however, according to FRAGSTAT, the "total.edge" value of ClassStat means that "total length (m) of edge in landscape involving patch type (class) i; includes landscape boundary and backgroun

[R] line jump in plot legend title

2011-07-18 Thread Dutrieux , Loïc
Hello, In order to reduce the width of my legend in a plot I introduced line jumps in the title. Here's the problem; the legend box hasn't adapted accordingly and part of the title is printed out of the frame. See the example below: plot(1:10) legend("bottomright", bg="white", fill=c(7,8,12,13,

[R] IDE with table/matrix preview

2011-07-18 Thread Michael Bernsteiner
I know there are several threads about IDEs for R. I've tried Tinn-R, but I am looking for an IDE (win) with a preview function that shows me the variables and the table/matrix etc. when klicking. (comparable to Matlab). Does an IDE like this exist or can't IDEs give this functionality in R?

Re: [R] barplot question

2011-07-18 Thread Sally_roman
I would like to make stacked barplots, but with two stacked columns per x value. For cod - I have kept and discard values for 2 nets. I would like to have one stacked column for the control net with the kept and discard value and then another column with the kept and discard values for the experi

[R] cforest - keep.forest = false option?

2011-07-18 Thread KHOFF
Hi, I'm very new to R. I am most interested in the variable importance measures that result from randomForest, but many of my predictors are highly correlated. My first question is: 1. do highly correlated variables render variable importance measures in randomForest invalid? and 2. I know that

Re: [R] How to convert number (matlab) to date

2011-07-18 Thread peter dalgaard
On Jul 18, 2011, at 20:19 , Gabor Grothendieck wrote: > On Mon, Jul 18, 2011 at 1:59 PM, peter dalgaard wrote: >> >> On Jul 18, 2011, at 16:36 , Gabor Grothendieck wrote: . However, this was after reinstalling and reloading zoo. Restarting R and retrying did inde

Re: [R] Understanding R's "Environment" concept

2011-07-18 Thread Bert Gunter
This **is** an inherently technical topic. Did you try the R Language Manual section on environments (wasn't clear from your message)? You might try posting on R-devel. Folks there may know of tutorials/books that might be useful to you. -- Bert On Mon, Jul 18, 2011 at 11:16 AM, Nipesh Bajaj wr

Re: [R] How to convert number (matlab) to date

2011-07-18 Thread Gabor Grothendieck
On Mon, Jul 18, 2011 at 1:59 PM, peter dalgaard wrote: > > On Jul 18, 2011, at 16:36 , Gabor Grothendieck wrote: >>> >>> . >>> >>> However, this was after reinstalling and reloading zoo. Restarting R and >>> retrying did indeed make things work. >>> >> >> Does the fact that it worked if R was

[R] Understanding R's "Environment" concept

2011-07-18 Thread Nipesh Bajaj
Hi all, I am trying to understand the R's "environment" concept however the underlying help files look quite technical to me. Can experts here provide me some more intuitive ideas behind this concept like, why it is there, what exactly it is doing in R's architecture etc.? I mainly need some non-t

Re: [R] question about linear mixed model

2011-07-18 Thread Kevin Wright
Note: PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Also, your question may be more appropriate for the R mixed-models mailing list. Kevin On Sun, Jul

Re: [R] How to convert number (matlab) to date

2011-07-18 Thread peter dalgaard
On Jul 18, 2011, at 16:36 , Gabor Grothendieck wrote: >> >> . >> >> However, this was after reinstalling and reloading zoo. Restarting R and >> retrying did indeed make things work. >> > > Does the fact that it worked if R was restarted, but not without, > imply that there is something in

Re: [R] Strange graphs

2011-07-18 Thread Liviu Andronic
On Mon, Jul 18, 2011 at 5:04 PM, UnitRoot wrote: > Hello, > I am facing problems with plotting graphs in R. It was working well since > today, but I cannot get some graphs for unknown reasons. Initially it gave > me diagonal straight lines. Now it is giving me very strange curves.  I have > tried

Re: [R] Extract confidence intervals from rma object (metafor package)

2011-07-18 Thread Viechtbauer Wolfgang (STAT)
Dear Jokel, Right now, none of the functions return that information. But it's easy to calculate those CIs by hand (simply take yi +- 1.96 sqrt(vi) and apply, if needed, some appropriate transformation). For example: data(dat.bcg) dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg,

Re: [R] Rmpi fails to install

2011-07-18 Thread Juergen Rose
Am Sonntag, den 03.07.2011, 18:19 +0200 schrieb r...@rz.uni-potsdam.de: > Quoting r...@rz.uni-potsdam.de: > > > Quoting Juergen Rose : > > > >> Hi, > >> > >> I was just able to install the patched Rmpi on the second system with > >> openmpi-1.5.3. What can we that Rmpi_0.5-9a.tar.gz becomes a stan

Re: [R] write merged data frame to a file

2011-07-18 Thread David Winsemius
On Jul 18, 2011, at 11:10 AM, Andrea Franceschini wrote: Dear Philipp, You were right, thankyou very much. Effectively the second read.table didn't work (probably because of the strange characters). From my point of view this is a very bad R bug. When I read this I thought it was an exampl

Re: [R] PCA - princomp can only be used with more units than variables

2011-07-18 Thread Joshua Wiley
Hi, You need to explain what you want to do. This is not a software issue, you simply cannot create more uncorrelated variables than you have observations. Josh On Mon, Jul 18, 2011 at 8:53 AM, a.me...@yahoo.co.uk wrote: > Hi, > > May I ask a question about a thread > https://stat.ethz.ch/pipe

Re: [R] barplot question

2011-07-18 Thread Sarah Goslee
Hi Sally, I'm not sure what your question actually is. How to make a stacked bar plot, perhaps? If so, do any of the examples at these two sites help? http://www.harding.edu/fmccown/R/#barcharts http://addictedtor.free.fr/graphiques/search.php?engine=RGG&q=barplot If not, can you explain what yo

Re: [R] nls() and lines()

2011-07-18 Thread David Winsemius
On Jul 18, 2011, at 10:13 AM, Steven Ranney wrote: Unfortunately, the transposition of lines and list was a typo on my part. Now that I look like a fool and have corrected the issue, I'm still faced with the same dilemma. With the original data set I posted in this thread, No. You did not g

Re: [R] barplot question

2011-07-18 Thread Sally_roman
I have done ?barplot. I have not problems making barplots in R except for this where there are actually two stacked columns for each fish. I have also searched the internet to look for examples like what I would like to plot, but have not found any which is why I thought putting a post would b

[R] PCA - princomp can only be used with more units than variables

2011-07-18 Thread a.me...@yahoo.co.uk
Hi, May I ask a question about a thread https://stat.ethz.ch/pipermail/r-help/2005-March/068365.html? I understand I need to use prcomp instead of princomp when i have less units than variables. However, when I use prcomp the scores is NULL. How can I overcome this? Regards, Armin -- Kind

[R] Extract confidence intervals from rma object (metafor package)

2011-07-18 Thread Jokel Meyer
Dear R-experts! I am working on some meta-analysis using the metafor package. I would like to extract values of the confidence intervals of the effect sizes of the single studies from an rma object. Those values are printed out when plotting a forest plot using the forest function on the rma objec

Re: [R] SDMTools package - calculating overlap?

2011-07-18 Thread Ana Kolar
Many thanks for this, David. It is applicable, indeed! Thank you for sharing the search function as well.  Have a good day! Ana > >From: David Winsemius >To: Ana Kolar >Cc: R >Sent: Monday, 18 July 2011, 17:22 >Subject: Re: [R] SDMTools package - calculating

Re: [R] Survival Analysis

2011-07-18 Thread Kishor Tappita
Thanks a lot. I used survfit to generate KM plots but I will try to figure out to find the corresponding returned value for KM estimate. Thank you for your invaluable help. On Mon, Jul 18, 2011 at 8:28 PM, David Winsemius wrote: > > On Jul 18, 2011, at 10:42 AM, Kishor Tappita wrote: > > Ok Davi

Re: [R] Survival Analysis

2011-07-18 Thread Kishor Tappita
Ok David, Thanks for clearing my misconception. Then could you please suggest me how I could get the KM estimate for a time point. I remember reading the formula for calculating the KM. Do, I have to write a method to compute the KM estimate or will the survival package provide it for me? Thank y

[R] Strange graphs

2011-07-18 Thread UnitRoot
Hello, I am facing problems with plotting graphs in R. It was working well since today, but I cannot get some graphs for unknown reasons. Initially it gave me diagonal straight lines. Now it is giving me very strange curves. I have tried to re-install the softwear. It still did not help. Please,

[R] Missing values and geeglm

2011-07-18 Thread E
Dear all I am struggling with how to deal with missing values using geeglm. I know that geeglm only works with complete datasets, but I cannot seem to get the na.omit function to work. For example assuming DataMiss contains 3 columns, each of which has missing observations, and an id column with

[R] useR! 2011, late registration deadline this Friday (22 July)

2011-07-18 Thread David Firth
This is just a gentle reminder of the final registration deadline for this year's "useR!" conference (University of Warwick, 16-18 August; tutorials 15 August). No further registrations will be accepted after this Friday (22 July). Contributions to the conference programme can still be offered as

Re: [R] SDMTools package - calculating overlap?

2011-07-18 Thread David Winsemius
On Jul 18, 2011, at 11:07 AM, Ana Kolar wrote: Dear David, The toy example doesn't represent functions as such, but represents type of data that I'm operating with. These data are product of an analysis. If I understand you correctly, I would need to approximate distribution functions of

Re: [R] write merged data frame to a file

2011-07-18 Thread Andrea Franceschini
Dear Philipp, You were right, thankyou very much. Effectively the second read.table didn't work (probably because of the strange characters). >From my point of view this is a very bad R bug. I precisely inserted the "\t" separator in the read table command, hence I would expect that everything is

Re: [R] SDMTools package - calculating overlap?

2011-07-18 Thread Ana Kolar
Dear David, The toy example doesn't represent functions as such, but represents type of data that I'm operating with. These data are product of an analysis. If I understand you correctly, I would need to approximate distribution functions of these data first and then integrate. This makes sense

Re: [R] Survival Analysis

2011-07-18 Thread David Winsemius
On Jul 18, 2011, at 10:42 AM, Kishor Tappita wrote: Ok David, Thanks for clearing my misconception. Then could you please suggest me how I could get the KM estimate for a time point. I remember reading the formula for calculating the KM. Do, I have to write a method to compute the KM estim

Re: [R] SDMTools package - calculating overlap?

2011-07-18 Thread David Winsemius
On Jul 18, 2011, at 10:11 AM, Ana Kolar wrote: Yes, indeed! I believe I should integrate differences of min of both functions, no? I'm not quite sure how this should be done in R therefore I was wondering if there are some build in functions that do this job already. If not I would appreci

Re: [R] How to convert number (matlab) to date

2011-07-18 Thread Gabor Grothendieck
On Mon, Jul 18, 2011 at 10:08 AM, peter dalgaard wrote: > > On Jul 18, 2011, at 15:48 , Gabor Grothendieck wrote: > >> On Mon, Jul 18, 2011 at 8:56 AM, peter dalgaard wrote: >>> >>> On Jul 18, 2011, at 14:08 , Gabor Grothendieck wrote: >>> On Sat, Jul 16, 2011 at 11:50 PM, Eduardo M. A. M. M

Re: [R] write merged data frame to a file

2011-07-18 Thread Philipp Pagel
On Mon, Jul 18, 2011 at 04:00:29PM +0200, Andrea Franceschini wrote: > > I use version 13 of R in OSX (downloaded and installed less than 1 year ago). Probably 2.13 ... [...] code omitted > The first lines are OK (i.e. 14 columns, like the dataframe), while at > a certain point I get lines with

Re: [R] nls() and lines()

2011-07-18 Thread Steven Ranney
Unfortunately, the transposition of lines and list was a typo on my part. Now that I look like a fool and have corrected the issue, I'm still faced with the same dilemma. With the original data set I posted in this thread, plot(mpg~x, data=mileage[year==2009,], ylab="Miles per gallon", xlab="200

Re: [R] nls() and lines()

2011-07-18 Thread Steven Ranney
Provided, of course, that I alter the lines for different data sets and data frames, the code to plot a line derived from nls() onto a plot works with no problems. Here's an example: Year NOP 2002 6 2003 8 2004 11 2005 19 2006 26 2007 25 mod1 <- nls(NOP~alpha*exp(beta*Year), data=aic, st

Re: [R] Survival Analysis

2011-07-18 Thread Kishor Tappita
Dear David, Thank you for your reply. I realized that the summary function can help me in finding the the order of the curves. The 0.95UCL (95% upper confidence level) column in particular seems to follow the same pattern as the curves on the plot. I am new to survival analysis, so please corre

Re: [R] Survival Analysis

2011-07-18 Thread David Winsemius
On Jul 18, 2011, at 10:10 AM, Kishor Tappita wrote: > Dear David, > > Thank you for your reply. I realized that the summary function can > help me in finding the the order of the curves. > The 0.95UCL (95% upper confidence level) column in particular seems > to follow the same pattern as the

Re: [R] SDMTools package - calculating overlap?

2011-07-18 Thread Ana Kolar
Yes, indeed! I believe I should integrate differences of min of both functions, no? I'm not quite sure how this should be done in R therefore I was wondering if there are some build in functions that do this job already. If not I would appreciate any help of how should it be done otherwise. Toy

Re: [R] How to convert number (matlab) to date

2011-07-18 Thread peter dalgaard
On Jul 18, 2011, at 15:48 , Gabor Grothendieck wrote: > On Mon, Jul 18, 2011 at 8:56 AM, peter dalgaard wrote: >> >> On Jul 18, 2011, at 14:08 , Gabor Grothendieck wrote: >> >>> On Sat, Jul 16, 2011 at 11:50 PM, Eduardo M. A. M. Mendes >>> wrote: Hello I am new to R and I need

Re: [R] write merged data frame to a file

2011-07-18 Thread Andrea Franceschini
Dear all, Sarah, ok, I start to give some details. I use version 13 of R in OSX (downloaded and installed less than 1 year ago). I pasted below the results of the str() command. The data frame looks perfect for me. I generated the dataframe using the following commands: rog=read.table("/Users/and

Re: [R] ?Accuracy of prop.test

2011-07-18 Thread Peter Ehlers
You might also enjoy the binconf() function in the Hmisc pkg. Peter Ehlers On 2011-07-18 06:17, Jack Sofsky wrote: Ted, Rolf& Peter, Thanks for a truly educational (at least for me) thread. I did indeed look up the article /"Interval Estimation for the Difference Between Independent Proporti

Re: [R] nls() and lines()

2011-07-18 Thread Peter Ehlers
On 2011-07-18 06:38, Steven Ranney wrote: Provided, of course, that I alter the lines for different data sets and data frames, the code to plot a line derived from nls() onto a plot works with no problems. Here's an example: Year NOP 2002 6 2003 8 2004 11 2005 19 2006 26 2007 25 mod1<-

[R] plotting groups via density and different colors

2011-07-18 Thread Jacob Kasper
I have a data set that looks like this: dene <- data.frame(length = c(35,32,33,34,41,40,46,35,41,40,45,36,38,37,39,40,42,42,42,43,44), sex=c(1,1,1,1,2,2,2,1,2,2,2,1,2,2,2,2,2,2,2,2,2)) I would like to plot the density (frequency of occurrence) of each length class but I want to have different colo

Re: [R] How to convert number (matlab) to date

2011-07-18 Thread Gabor Grothendieck
On Mon, Jul 18, 2011 at 8:56 AM, peter dalgaard wrote: > > On Jul 18, 2011, at 14:08 , Gabor Grothendieck wrote: > >> On Sat, Jul 16, 2011 at 11:50 PM, Eduardo M. A. M. Mendes >> wrote: >>> Hello >>> >>> I am new to R and I need to convert some dates (numeric format by matlab) >>> to actual date

Re: [R] SDMTools package - calculating overlap?

2011-07-18 Thread David Winsemius
On Jul 18, 2011, at 9:40 AM, Ana Kolar wrote: Dear R users, Any idea of how to calculate an area of an overlap between two functions? The only R build in function that I found is I Similarity Statistic for Quantifying Niche Overlap and I am really not sure if this function is producing e

[R] SDMTools package - calculating overlap?

2011-07-18 Thread Ana Kolar
Dear R users, Any idea of how to calculate an area of an overlap between two functions? The only R build in function that I found is I Similarity Statistic for Quantifying Niche Overlap and I am really not sure if this function is producing exactly what I am interested in since I was plotting f

Re: [R] ?Accuracy of prop.test

2011-07-18 Thread Jack Sofsky
Ted, Rolf & Peter, Thanks for a truly educational (at least for me) thread. I did indeed look up the article /"Interval Estimation for the Difference Between Independent Proportions: Comparison of Eleven Methods." /which I found here. /http://psychology.stanford.edu/~jlm/pdfs/Newcombe98Proport

Re: [R] How to convert number (matlab) to date

2011-07-18 Thread peter dalgaard
On Jul 18, 2011, at 14:08 , Gabor Grothendieck wrote: > On Sat, Jul 16, 2011 at 11:50 PM, Eduardo M. A. M. Mendes > wrote: >> Hello >> >> I am new to R and I need to convert some dates (numeric format by matlab) to >> actual dates in R. >> >> For instance, >> >> Matlab -> 730456 -> >> datest

Re: [R] write merged data frame to a file

2011-07-18 Thread Sarah Goslee
Hi Andrea, On Mon, Jul 18, 2011 at 6:07 AM, Andrea Franceschini wrote: > Dear all, > > I merged 2 data frames using the merged command and the resulting data frame > looks perfect into R. > > However, I have serious problems when I try to write this new data frame > into a file using the write.ta

[R] 1st Data Analysis Contest Using R

2011-07-18 Thread Emilio Torres Manzanera
1st Data Analysis Contest Using R Nestoria is a specialized web search engine platform in house prices. Nestoria y Lokku Labs aim to improve the understanding of the public of the value of its databases. The company aims to engage a few brilliant statisticians in the expectation that their

Re: [R] Out of Sample Prediction Interval/Point Estimate

2011-07-18 Thread Zd Gibbs
it's not possible to look for a local statistical consultatnt. I was just hoping for help. Thanks anyway. From: Uwe Ligges Cc: r-help@r-project.org Sent: Sun, July 17, 2011 9:27:22 AM Subject: Re: [R] Out of Sample Prediction Interval/Point Estimate On 15

Re: [R] How to convert number (matlab) to date

2011-07-18 Thread Gabor Grothendieck
On Sat, Jul 16, 2011 at 11:50 PM, Eduardo M. A. M. Mendes wrote: > Hello > > I am new to R and I need to convert some dates (numeric format by matlab) to > actual dates in R. > > For instance, > > Matlab -> 730456 -> >> datestr(730456) > > ans = > > 02-Dec-1999 > Set the origin to Matlab's origi

Re: [R] cluster by unique value

2011-07-18 Thread jim holtman
Also read FAQ 7.31 before using 'numerics' as grouping factors. On Mon, Jul 18, 2011 at 6:36 AM, Sarah Goslee wrote: > Your data1 and your data1_class file differ in the first three > columns. Assuming that's an error, here's one way to do it: > >> data1 <- data.frame(layer1=c(.2, .5, .2, .8, .2,

[R] write merged data frame to a file

2011-07-18 Thread Andrea Franceschini
Dear all, I merged 2 data frames using the merged command and the resulting data frame looks perfect into R. However, I have serious problems when I try to write this new data frame into a file using the write.table command. Basically I get parts of the second file that I merged into the file.

Re: [R] Number in interval

2011-07-18 Thread Manuel K.
Thank you Jim, Steve and David. I found findIntervals to work best for my problem. Manuel -- View this message in context: http://r.789695.n4.nabble.com/Number-in-interval-tp3673537p3674969.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] cluster by unique value

2011-07-18 Thread Sarah Goslee
Your data1 and your data1_class file differ in the first three columns. Assuming that's an error, here's one way to do it: > data1 <- data.frame(layer1=c(.2, .5, .2, .8, .2, .5, .5, .8, .2, > .8),layer2=c(2,3,2,2,1,2,3,2,2,2), layer3=c(1,1,1,1,1,1,1,1,1,4)) > data1 <- cbind(data1, class=as.numeri

[R] cluster by unique value

2011-07-18 Thread Alfredo Alessandrini
Hi, I need to make a cluster classification by the unique values of the data frame. I explain the problem. I need to classify this table, and assign to the same cluster each row that has the same combination of value: > data1 layer_1 layer_2 layer_3 [1,] 0.246000 2

  1   2   >