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

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,

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:

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

[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

[ESS] Hang when opening remote session

2018-07-10 Thread Gammel Holte via ESS-help
Hi, I'm using ESS version 17.11 from MELPA (build 20180710.400) on Emacs 26.1, Linux. No configuration, just (use-package ess). ESS hangs when I open a remote session. I first open a remote file at /ssh:root@localhost#6000:/root/foo.r (this is an Docker container listening on port 6000, but it

Re: [R-es] Construcción de archivo de texto

2018-07-10 Thread eric
Hola Jorge, para guardar un objeto tipo data.frame o similar en un archivo al disco duro, puedes usar la funcion: write.csv() para detalles de su funcionamiento, dentro de una consola R escribes: ?write.csv() Slds, eric.

Re: [R-es] Construcción de archivo de texto

2018-07-10 Thread Marcelino de la Cruz Rot
O más fácil aún: sink(file="datos3.txt")    for (i in 1:length(d)){     cat(paste("Pedigree: ",unique(d[[i]]$ped),"\n")) print(d[[i]],row.names=F) } sink() El 10/07/2018 a las 17:39, Marcelino de la Cruz Rot escribió: O así, también: file="datos.txt" for (i in 1:length(d)){  

Re: [R-es] Construcción de archivo de texto

2018-07-10 Thread Marcelino de la Cruz Rot
O así, también: file="datos.txt" for (i in 1:length(d)){     di<-d[[i]]     nc<-ncol(di)   write(paste("Pedigree: ",  unique(di$ped)),file=file, append=TRUE)   write(colnames(di),file=file, sep = "\t", ncolumns=nc, append=TRUE)   write(t(as.matrix(di)), file=file, sep = "\t",

[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

Re: [R-es] Construcción de archivo de texto

2018-07-10 Thread Javier Marcuzzi
Estimado Jorge I Velez Yo lo guardaría en json, porque si es txt habría que encontrar los "encabezados", cosa que en json están ubicados en el archivo y al procesar los reconoce, pero el inconveniente es un archivo más grande. Javier Rubén Marcuzzi El mar., 10 jul. 2018 a las 10:58, Jorge I

Re: [R-es] Construcción de archivo de texto

2018-07-10 Thread Jorge I Velez
Gracias, Marcelino. Alguna idea sobre cómo almacenarlo en un archivo de texto? Saludos, Jorge.- On Tue, Jul 10, 2018 at 5:13 AM Marcelino de la Cruz Rot < marcelino.delac...@urjc.es> wrote: > Hola. A ver esto, qué tal: > > > for (i in 1:length(d)){ > cat(paste("Pedigree:

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,

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

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

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

Re: [R-es] Construcción de archivo de texto

2018-07-10 Thread Marcelino de la Cruz Rot
Hola. A ver esto, qué tal: for (i in 1:length(d)){      cat(paste("Pedigree: ",unique(d[[i]]$ped),"\n"))      print(d[[i]],row.names=F) } Saludos, Marcelino El 10/07/2018 a las 11:31, Jorge I Velez escribió: Hola a todos, A partir de los siguientes datos: d <- list(`1` =

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-es] Construcción de archivo de texto

2018-07-10 Thread Jorge I Velez
Hola a todos, A partir de los siguientes datos: d <- list(`1` = structure(list(ped = c(1L, 1L, 1L, 1L, 1L, 1L, 1L), id = 1:7, father = c(2L, 0L, 0L, 2L, 2L, 2L, 2L), mother = c(3L, 0L, 0L, 3L, 3L, 3L, 3L), sex = c(2L, 1L, 2L, 2L, 2L, 1L, 2L), affected = c(1L, 2L, 1L, 1L, 2L, 2L,

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: > > (##

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