Re: [R] R [coding : do not run for every row ]

2016-04-17 Thread Thierry Onkelinx
Dear anonymous, The big mistake in the output might be obvious to you but not to others. Please make clear what the correct output should be or at least what is wrong with the current output. And please DO read the posting guide which asks you not to post in HTML. ir. Thierry Onkelinx Instituut v

Re: [R] Last

2016-04-17 Thread Boris Steipe
According to the docs: getSheets() returns a list of java object references each pointing to an worksheet. ...and the Examples section of the help page shows you how to work with that. Can't tell whether the methods cover what you need though. B. On Apr 17, 2016, at 5:36 PM, Val wrote:

[R] R [coding : do not run for every row ]

2016-04-17 Thread tan sj
i have combined all the variables in a matrix, and i wish to conduct a simulation row by row. But i found out the code only works for the every first row after a cycle of nine samples. But after check out the code, i don know where is my mistake... can anyone pls help #For gamma disribu

Re: [R] Bug in by() function which works for some FUN argument and does not work for others

2016-04-17 Thread Akhilesh Singh
Dear All, Yes, I certainly now agree with the suggestion of Adrian Dusa for using colMeans in place of mean in the situation that I had reported to r-help. And I am sorry that I did not personally extend my thanks to him. I really wish to thank him for his suggestion, and I do this now. However,

[R] use hjust or vjust with dendextend

2016-04-17 Thread Sergio Fonda
Following "Introduction to dendextend" from Tal Galili, I applied this code on iris data: ## library(dendextend) library(dendextendRcpp) library(ggplot2) dend2 <- iris[1:30,-5] %>% dist %>% hclust %>% as.dendrogram %>% set("branches_k_color", k=3) %>% set("branches_lwd", rep(1,4)) %>% set("branches

Re: [R] Solved: Communication in for() loop (Linux version)

2016-04-17 Thread Bert Gunter
I am not exactly sure what YOU mean by a "multidimensional array," but I do know what R means: all elements must be the same mode (e.g all numeric, all character, etc.) . See ?array for how to do this in R if this accords with what you want to do. BTW, searching rseek.org, google, and/or using the

[R] Solved: Communication in for() loop (Linux version)

2016-04-17 Thread Robert D. Bowers
Thanks for the advice I've received. FYI - It turns out that the problem was connected to the way R handles pipes and FIFOs, compared to the way the socat command does. (I don't know exactly what, but trying different things solved it!) I found that if you use FIFO() in R AND set up a FIFO c

Re: [R] Trying to understand cut

2016-04-17 Thread David Winsemius
> On Apr 16, 2016, at 9:12 PM, John Sorkin wrote: > > Jeff, > Perhaps I was sloppy with my notation: > I want groups >> =0 <10 >> =10 <20 >> =20<30 > .. >> =90 <100 > > In any event, my question remains, why did the four different versions of cut > give me the same results? I hope someone

Re: [R] Last

2016-04-17 Thread Boris Steipe
Does length(getSheets(loadWorkbook("las.xlsx")) give you the index you need? (Untested). B. On Apr 17, 2016, at 9:43 AM, Val wrote: > Hi all, > > I am trying to read data from a particular excel sheet. > > library(xlsx) > dat1=read.xlsx("las.xlsx", sheetIndex = 5) > > I know that thi

[R] Last

2016-04-17 Thread Val
Hi all, I am trying to read data from a particular excel sheet. library(xlsx) dat1=read.xlsx("las.xlsx", sheetIndex = 5) I know that this is sheet is the last one and this number grows over time When I run my script to read the last sheet then I have to change this number every time manually.

Re: [R] Trying to understand cut

2016-04-17 Thread peter dalgaard
This isn't really FAQ 7.31 (for once). The clue is in this part of cut.default(): breaks <- seq.int(rx[1L], rx[2L], length.out = nb) breaks[c(1L, nb)] <- c(rx[1L] - dx/1000, rx[2L] + dx/1000) which _is_ as documented. Notice that it is based on the range