[R] Wanted to make g widgets GUI a Package

2014-03-23 Thread Ashis Deb
Hi all , I know i am asking a silly question , please help me a bit , fun-function() ---I have this function , dont know what to return here. { JUSTGIVING HERE THE MAINWINDOW , AVOIDING GIVING THE WHOLE FUNCTION

Re: [R] Conditional expressions in commands -- basic

2014-03-23 Thread Richard Sherman
Sarah, i = 1 while i0 { print(Thank you) i = i + 1 } --- Richard Sherman On Mar 22, 2014, at 8:06 PM, Sarah Goslee sarah.gos...@gmail.com wrote: Hi Richard, ?if ?ifelse ?subset ?[ depending on the specific operation. See inline. Given a data frame tdf with x, y, and a

[R] R task views graph representation

2014-03-23 Thread paul sorenson
I created a graph of the R task views using python to scrape the HTML, networkx to construct the graph at runtime then dumped it out as a graphviz dot file. Finally creating an SVG file with dot: see http://metrak.com/R/taskview.svg I was wondering what people find useful for visualising

Re: [R] time series processing - count of datestamp delta's, per group

2014-03-23 Thread Stephan Kolassa
Hi Martin, it sounds like you want the difference between the first and the last observation per user, not, e.g., all the date differences between successive observations of each separate user. Correct me if I'm wrong. That said, let's build some toy data: set.seed(1) dataset -

Re: [R] points with-in boundaries of a map

2014-03-23 Thread eliza botto
Thankyou very much jim. it worked! but regarding second part of my question, isn't there a way to read the coordinates of intersecting lines with the premises of the map?thanks, Eliza Date: Sun, 23 Mar 2014 14:19:43 +1100 From: j...@bitwrit.com.au To: eliza_bo...@hotmail.com CC:

Re: [R] Merge two vectors into one

2014-03-23 Thread David Winsemius
On Mar 22, 2014, at 3:22 PM, Tham Tran wrote: Dear R users, Given two vectors x and y a=1 2 3 b=4 5 6 i want to combine them into a single vector z as 1 4 2 5 3 6 One way: c( matrix(c(a,b), nrow=2, byrow=TRUE) ) Leaving in the usual footer because Nabble's interface usually omits

[R] Customise a symbol in a scatterplot with for loop

2014-03-23 Thread amcc
Hi, I have the code below to generate a pentagon in R. I have generated a regular scatterplot and need to draw a scatterplot with a pentagon at each (x,y) position, for the radius use r x 0.3. The hint I've been given is that I do not need to store the polygons in a list, simply construct and

Re: [R] Customise a symbol in a scatterplot with for loop

2014-03-23 Thread Jeff Newmiller
Please read the Posting Guide... this is not a homework help forum. Please use the assistance provided by your educational institution for homework. --- Jeff NewmillerThe . . Go

[R] What formula does the acf() function use?

2014-03-23 Thread C W
Dear list, I am curious about how R computes the autocorrelation? What formula does it use? Theoretical or sample ACF? I have tried to type acf in the R console, but I don't understand what it is actually doing besides the basic if...else... statement. Could someone help me read this output?

Re: [R] Customise a symbol in a scatterplot with for loop

2014-03-23 Thread Jim Lemon
On 03/24/2014 07:00 AM, amcc wrote: Hi, I have the code below to generate a pentagon in R. I have generated a regular scatterplot and need to draw a scatterplot with a pentagon at each (x,y) position, for the radius use r x 0.3. The hint I've been given is that I do not need to store the

Re: [R] points with-in boundaries of a map

2014-03-23 Thread Jim Lemon
On 03/23/2014 10:29 PM, eliza botto wrote: Thankyou very much jim. it worked! but regarding second part of my question, isn't there a way to read the coordinates of intersecting lines with the premises of the map? Hi Eliza, I think you want the locator function, which will return the

Re: [R] points with-in boundaries of a map

2014-03-23 Thread eliza botto
Thankyou very much. I actually knew abt this command, I just wanted to have a more direct command instead of manual.But anyway, thankyou very much indeed.:DEliza Date: Mon, 24 Mar 2014 09:50:50 +1100 From: j...@bitwrit.com.au To: eliza_bo...@hotmail.com CC: r-help@r-project.org Subject:

Re: [R] points with-in boundaries of a map

2014-03-23 Thread Ted Harding
On 23-Mar-2014 22:50:50 Jim Lemon wrote: On 03/23/2014 10:29 PM, eliza botto wrote: Thankyou very much jim. it worked! but regarding second part of my question, isn't there a way to read the coordinates of intersecting lines with the premises of the map? Hi Eliza, I think you want the

Re: [R] Merge two vectors into one

2014-03-23 Thread Rolf Turner
On 24/03/14 08:37, David Winsemius wrote: On Mar 22, 2014, at 3:22 PM, Tham Tran wrote: Dear R users, Given two vectors x and y a=1 2 3 b=4 5 6 i want to combine them into a single vector z as 1 4 2 5 3 6 One way: c( matrix(c(a,b), nrow=2, byrow=TRUE) ) It is more perspicuous to use

[R] Simulating from the Weibull with right censoring

2014-03-23 Thread Lucy Leigh
Hi everyone, I am currently attempting to simulate some survival data, based on a Weibull model. I basically need to simulate some survival data so that I can then test out a program I'm writing, before applying it to some real data. I've managed to create failure time data, using the rweibull

Re: [R] Simulating from the Weibull with right censoring

2014-03-23 Thread Lucy Leigh
Hi Dennis, Thanks for your feedback. I do apologise, I omitted the lines of code that created the censoring variable, I was focused more on altering the actual outcome times. So it is actually more like this, if (outcomeType == 'Weibull'){ Y[i] - rweibull(1, shape, shape)) } if