[R] Viewport help

2015-05-24 Thread Glenn Schultz
Hello All, I have a function which outputs graphically the results of a pass-through OAS analysis.  The viewport is 2x2.  The idea is to leave a small margin at the top and enter a title with something like the following.  Bond Lab Pass Through OAS  Bond Id: f...@bond.id OAS : foo@OAS I am a

Re: [R] problem with duplicated function

2015-05-24 Thread Rolf Turner
On 25/05/15 09:34, Curtis Burkhalter wrote: Hello everyone, I have two very large dataframes (~1 million rows x 5 columns), of which two of the columns are lat/long coordinates. The names of the dataframes are 'data07' and 'data 08'. Data08 has a few more sampling points than data 07 so I want t

Re: [R] problem with duplicated function

2015-05-24 Thread Jeff Newmiller
You are going wrong in a few places: posting using HTML format, not using dput to share your data sample, and comparing floating point numbers for equality. HTML email is stripped to plain text on this list so we don't see what you see. In addition, HTML formatting corrupts code, so we cannot ev

Re: [R] problem with duplicated function

2015-05-24 Thread Bert Gunter
I have NOT looked at your code in detail -- I might have if you had used dput() to make available small subsets of your data frames that exhibited the problems. However, the following, from ?duplicated, sounds like it may be relevant: "When used on a data frame with more than one column, or an arr

[R] problem with duplicated function

2015-05-24 Thread Curtis Burkhalter
Hello everyone, I have two very large dataframes (~1 million rows x 5 columns), of which two of the columns are lat/long coordinates. The names of the dataframes are 'data07' and 'data 08'. Data08 has a few more sampling points than data 07 so I want to subset data08 so that it has the same number

[R] Online courses in Event History / Survival analysis with R

2015-05-24 Thread Faradj Koliev
Dear all, I am looking for some online courses – paid or free – in survival analysis with R. Perhaps you can recommend some interesting online courses? Best, Faradj Koliev __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://

Re: [R] Problem with apply list to function: numerical expression has 4 elements: only the first used

2015-05-24 Thread David Winsemius
> On May 24, 2015, at 6:35 AM, Narua wrote: > > Dear kd, > thanks for your fast reply > hm, I thougth, F is normally the abbrevation, but in R FALSE represents > "false"? > Anyway, your function works and I got the idea to work with "apply" > > I had actually a little more complicate function

Re: [R] Problem with apply list to function: numerical expression has 4 elements: only the first used

2015-05-24 Thread Narua
Dear kd, thanks for your fast reply :-D hm, I thougth, F is normally the abbrevation, but in R FALSE represents "false"? Anyway, your function works. I had actually a little more complicate functions (put I posted in the forum first an easier example): f<-function(a,b)((1/(sum(sqrt(1:a*sqrt(b)

Re: [R] Problem with apply list to function: numerical expression has 4 elements: only the first used

2015-05-24 Thread Narua
Dear kd, thanks for your fast reply hm, I thougth, F is normally the abbrevation, but in R FALSE represents "false"? Anyway, your function works and I got the idea to work with "apply" I had actually a little more complicate functions (put I posted in the forum first an easier example): f<-funct

Re: [R] Problem with comparing multiple data sets

2015-05-24 Thread Jim Lemon
Hi Mohammad, You know, I thought this would be fairly easy, but it wasn't really. df1<-data.frame(Class=c(0,2,1),Comment=c("com1","com2","com3"), Term=c("aac","aax","vvx"),Text=c("text1","text2","text3")) df2<-data.frame(Class=c(0,2,1),Comment=c("com1","com2","com3"), Term=c("aac","aax","vvx"),T

Re: [R] plot: rug colors

2015-05-24 Thread Brian Smith
Thanks Duncan! That works! On Sun, May 24, 2015 at 8:09 AM, Duncan Murdoch wrote: > On 24/05/2015 7:47 AM, Brian Smith wrote: > > Hi, > > > > I wanted the rug (in plot) to have different colors. For example: > > > > vals1 <- sample(1:100,5) > > vals2 <- sample(1:100,5) > > > > rugcols <- c("red"

Re: [R] plot: rug colors

2015-05-24 Thread Duncan Murdoch
On 24/05/2015 7:47 AM, Brian Smith wrote: > Hi, > > I wanted the rug (in plot) to have different colors. For example: > > vals1 <- sample(1:100,5) > vals2 <- sample(1:100,5) > > rugcols <- c("red","blue","brown","red","yellow") > > plot(vals1,vals2) > rug(vals1,col=rugcols,lwd=2) > > > Howeve

[R] plot: rug colors

2015-05-24 Thread Brian Smith
Hi, I wanted the rug (in plot) to have different colors. For example: vals1 <- sample(1:100,5) vals2 <- sample(1:100,5) rugcols <- c("red","blue","brown","red","yellow") plot(vals1,vals2) rug(vals1,col=rugcols,lwd=2) However, with this code I only get 'red' for all the ticks. Is there a way I

Re: [R] Problem with apply list to function: numerical expression has 4 elements: only the first used

2015-05-24 Thread Kehl Dániel
Dear Narua, Others might suggest other things but here are some of my points. In general it is not a good idea to call a function F as it is an abbreviation for FALSE. Also it might be a good idea to write your functions in a way that they check the length of the arguments and behave accordingly