Re: [R] (no subject)

2018-07-10 Thread PIKAL Petr
Hi see in line > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Werning, Jan- > Philipp > Sent: Monday, July 9, 2018 9:42 PM > To: r-help@r-project.org > Subject: [R] (no subject) > > Dear all, > > > In the end I try to run a system dynamics simulatio

Re: [R] Something simple not working in group_by

2018-07-10 Thread Eric Berger
Hi Sumit, I was not able to reproduce this problem. I tried it in both R 3.5.1 and R 3.4.4. Both gave the expected output (which differs from yours.) Eric On Tue, Jul 10, 2018 at 1:32 AM, Bert Gunter wrote: > Dunno. > > But if I understand correctly, here's a base R way to do it: > > (## using

Re: [R] (no subject)

2018-07-10 Thread Werning, Jan-Philipp
Hi, thanks a lot! Now it works. Yours Jan Am 10.07.2018 um 09:00 schrieb PIKAL Petr mailto:petr.pi...@precheza.cz>>: Hi see in line -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Werning, Jan- Philipp Sent: Monday, July 9, 2018 9:42 PM To: r-help

Re: [R] inconsistency in display of character vector....

2018-07-10 Thread akshay kulkarni
dear members, I've gone through debug(update.snlcqn) (update.snlcqn is the above function) and I think the problem lies in read_excel returning a tibble...any suggestions on how to convert it to a regular data frame? Any other packages that read xls files as a regu

Re: [R] inconsistency in display of character vector....

2018-07-10 Thread Eric Berger
Hi Akshay, Package "openxlsx" has function read.xlsx() which returns a data frame. HTH, Eric On Tue, Jul 10, 2018 at 2:43 PM, akshay kulkarni wrote: > dear members, > I've gone through debug(update.snlcqn) > (update.snlcqn is the above function) and I think the pr

Re: [R] inconsistency in display of character vector....

2018-07-10 Thread PIKAL Petr
Hi What about dat<-as.data.frame(tibble.dat) Cheers Petr Osobn� �daje: Informace o zpracov�n� a ochran� osobn�ch �daj� obchodn�ch partner� PRECHEZA a.s. jsou zve�ejn�ny na: https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information about processing and protection of business partner

Re: [R] Something simple not working in group_by

2018-07-10 Thread Sumitrajit Dhar
Hello everyone, I figured it out late last night. I was loading both dplyr and plyr and that was causing the problem. Loading plyr after dplyr leads to the faulty behavior. Just loading dplyr gives you expected behavior. Sorry for the confusion and false alarm. Regards, Sumit > On Jul 10, 201

[R] select.list cuts results to 100 characters on Win 10 when graphics = TRUE

2018-07-10 Thread Sergei Ko
mstring1 <- c("123456789012345678901234567890123456789012345678901234567890 123456789012345678901234567890123456789012345678901234567890") mstring2 <- c("123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890") vec.in <

[R] Revolutions blog: June 2018 roundup

2018-07-10 Thread David Smith (CDA) via R-help
Since 2008, Microsoft staff and guests have written about R at the Revolutions blog (http://blog.revolutionanalytics.com) and every month I post a summary of articles from the previous month of particular interest to readers of r-help. In case you missed them, here are some articles related to R f

Re: [R] Generate N random numbers with a given probability and condition

2018-07-10 Thread Nelly Reduan
Thank you very much for your reply. By omitting the probability, the expected results could be: c(2, 0, 0, 0, 0, 0, 1, 0, 5, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0) c(0, 0, 1, 0, 0, 1, 1, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0) If I omit the probability, I would like to generate N random positive i

Re: [R] Generate N random numbers with a given probability and condition

2018-07-10 Thread Jim Lemon
Hi Nell, I may not have the right idea about this, but I think you need to do this in two steps if it can be done. Let's say you want a sequence of 20 (N) numbers between 0 and 10 that sums to 10 (M). You can enumerate the monotonically increasing sequences like this: c(0,0,0,0,0,0,0,0,0,0,1,1,1,1

Re: [R] Generate N random numbers with a given probability and condition

2018-07-10 Thread Bert Gunter
You need to heed Rolf's advice. N random integers by definition cannot have a fixed sum. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Ju

Re: [R] ASExtras library

2018-07-10 Thread Duncan Mackay
Hi I was trying to find a file on my computer when the ASReml directory showed up on the directory tree. The ASExtras may be part of the R interface/standalone of ASReml available in Splus as well. I think the interface to Splus came first >From what I can remember ASReml R extra packages had a