Re: [R] dotplot

2015-05-16 Thread Duncan Mackay
if this is using lattice panel.dotplot gives the clues The vertical lines are inserted by panel abline. You can make your own panel.dotplot function by removing panel.abline which uses col.line for the vertical line colour A quick fix is by making col.line = "transparent". If you want to add lin

Re: [R] Variable number of loops

2015-05-16 Thread Jim Lemon
Hi all, Given the number of help requests that involve permutations/combinations, and the less than obvious naming of the expand.grid function, perhaps adding an alias such as "permute.elements" or "combine.elements" might ease the tasks of both searchers and those offering help. Neither of the abo

Re: [R] dotplot

2015-05-16 Thread Daniel Nordlund
On 5/16/2015 1:19 PM, Daniel Nordlund wrote: On 5/16/2015 12:32 PM, li li wrote: Hi all, I wrote the following code and have two questions: (1) As you can see, I would like different colors for different types. It does not come out that way in the graph from this code. Anyone know how to f

Re: [R] dotplot

2015-05-16 Thread Daniel Nordlund
On 5/16/2015 12:32 PM, li li wrote: Hi all, I wrote the following code and have two questions: (1) As you can see, I would like different colors for different types. It does not come out that way in the graph from this code. Anyone know how to fix this? (2) How do I made the lots number

Re: [R] Variable number of loops

2015-05-16 Thread Bert Gunter
1. Please always reply to the list unless there is a compelling reason to keep the discussion private. You will have a better chance of getting something useful that way. 2. I don't know what you mean by "I don't have a fixed number of variables." You have to specify at least the number of variabl

[R] dotplot

2015-05-16 Thread li li
Hi all, I wrote the following code and have two questions: (1) As you can see, I would like different colors for different types. It does not come out that way in the graph from this code. Anyone know how to fix this? (2) How do I made the lots number on x axis eligible to read? (3) How d

Re: [R] Convert to a vector to read.table output format

2015-05-16 Thread Rui Barradas
Hello, I'm not exactly sure of what you want. 1) If you just want that output, just set the names attribute of index_data. names(index_data) <- paste0("V", 1:length(index_data)) 2) If you want to create a data.frame from index_data try the following. dat <- data.frame(index_data[1]) for(i i

[R] Convert to a vector to read.table output format

2015-05-16 Thread കുഞ്ഞായി kunjaai
Dear all, I want to convert a variable (that variable obtained from an 'nc ' file) I want to convert it into a* read.table* output format Example: > index_data<-get.var.ncdf(f_hist ,"meant_iitm_ALLIN_YEAR") > index_data [1] 24.06333 24.07208 24.20208 24.12625 24.27333 24.42458 24.26583 [8] 2

Re: [R] Template Engine for R

2015-05-16 Thread Luca Cerone
On Sat, May 16, 2015 at 5:17 PM, Henrik Bengtsson wrote: > _any text-based formats_, That's exactly what I am looking for then :) I have to create a set of .txt templates. 90% of the time I just will have to do simple "tags" substitutions, but there are some times where I'll need some control fl

Re: [R] Template Engine for R

2015-05-16 Thread Henrik Bengtsson
Hi Luca, I must admit I've not used template engines like the ones you refer to, but I can guess the idea and I believe RSP (the name of the markup language defined in R.rsp) is powerful enough to achieve something similar. RSP, has two main sets of constructors: (a) RSP pre-processing directives

Re: [R] Variable number of loops

2015-05-16 Thread Bert Gunter
Are you trying to reinvent ?expand.grid ? -- Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." Clifford Stoll On Fri, May 15, 2015 at 1:40 PM, WRAY NICHOLAS wrote: > I am tryi

[R] Variable number of loops

2015-05-16 Thread WRAY NICHOLAS
I am trying to build a programme which will work out the permutations of a number of variables, eg a=0 to 1, b=0 to 1, and c=0 to 2, so permutations would be (0,0,0), (1,0,0), (0,1,0)... etc In this case there would be 2 x 2x 3 = 12 permutations. If the number of variables are fixed it's easy to l

[R] Illustrating use of R package

2015-05-16 Thread Glenn Schultz
I have an R package Bond Lab which actually supports a book Investing in MBS using R and Open Source Computing.  The Bond Lab beta is stable.  I have also created a package companion to investing in MBS.  Both are on my Github site https://github.com/glennmschultz/ I wrote the companion as fun

Re: [R] Template Engine for R

2015-05-16 Thread Luca Cerone
Thanks Henrik! That's seem more like what I am looking for, though I do not have to use a template engine for reporting purposes. I do not need to create html, nor markdown but I'll see if I can use it for what I need :) Cheers, luca On Sat, May 16, 2015 at 9:41 AM, Henrik Bengtsson wrote: > Se

Re: [R] print dataframe names in loop

2015-05-16 Thread Kai Mx
Thanks for all the input. It seems like there is no way around introducing names for the list items, but the namedList-function is really neat. Function returns are not at issue for me, I rather want to use it on plots or outputs in the console. Best, Kai On Fri, May 15, 2015 at 10:51 PM, Willi

Re: [R] Template Engine for R

2015-05-16 Thread Henrik Bengtsson
See http://cran.r-project.org/package=R.rsp Henrik (author) On Fri, May 15, 2015 at 11:34 PM, Luca Cerone wrote: > Dear all, > I am looking for a template engine for R. > > I have already come across {{mustache}} and its R implementation whisker, > however I am looking for something with a few m

Re: [R] Template Engine for R

2015-05-16 Thread Luca Cerone
Hi Jeff, thanks for your reply. Can you elaborate a bit more what you mean? I know very lillte knitr, mostly because I use it in Rstudio to render Rmarkdown documents. However I do not need a template engine for reporting, and I can't see how I should use it. Can you provide me with just a minim

Re: [R] Template Engine for R

2015-05-16 Thread Jeff Newmiller
Not familiar with your examples, but knitr relies on R for control flow and whisker for template substitution, so it kind of seems unnecessary to have yet another syntax for control flow. --- Jeff Newmiller