Re: [R] Discrete Uniform Distribution

2017-08-08 Thread Jeff Newmiller
Which step do you need HELP with? Read the Posting Guide... you should be posting plain-text-formatted emails, with example code and data showing how far you have come. This is not a free programming service. Of course if this is homework then you should be asking your instructor or other

Re: [R] Inheritance for S3 classes

2017-08-08 Thread Hadley Wickham
You might find http://adv-r.hadley.nz/s3.html to be helpful (in particular, http://adv-r.hadley.nz/s3.html#constructors-1, gives my advice about subclass constructors) Hadley On Mon, Aug 7, 2017 at 7:06 PM, Kym Nitschke wrote: > Hi R Users, > > I am relatively new to

[R] Discrete Uniform Distribution

2017-08-08 Thread Muhammad-Usman Zaheer
Hey I want to generate a discrete uniform distribution as follows: For example: I want to get 278734 records each with a numbers between 7-10. And the sum of numbers in 278734 records to be equal to 2253712. Once this is done, I want to get that printed to an excel file such that Record

Re: [R] Latin hypercube sampling from a non-uniform distribution

2017-08-08 Thread Marine Regis
Thanks for your answer. I have attached the plot for representing the variable. I think that I need to draw a Hypercube sample for each age class (i.e., for 0, 1, 2, 3, 4, 5, 6, 7) in a given simulation (i.e., N = 1) and the LHS values for all age classes should be like the observed cumulative

Re: [R-es] unir varios archivos .csv en una serie historica

2017-08-08 Thread Carlos Ortega
Hola, Para la próxima vez...: https://cloud.r-project.org/web/packages/easycsv/index.html Saludos, Carlos Ortega www.qualityexcellence.es El 8 de agosto de 2017, 15:04, Sebastian Kruk escribió: > Hola Eric. Muchas gracias. Era exactamente lo que quería. Te agradezco

[R] Problem with serialization via readRDS() on a textConnection()

2017-08-08 Thread Christopher Walker
Hi All, I had working code under R v3.2 that serialized an object, stored the serialized object in a database, and then successfully retrieved and hydrated that object. I recently updated to R v3.4.1 and the same code now fails. Here is the code in question (simplified), and the resulting

Re: [R] Bug?

2017-08-08 Thread William Dunlap via R-help
I think the help file for apply() warns you that if you give it a data.frame, the data.frame will be converted to a matrix, with X <- as.matrix(X), before FUN is called on its rows or columns. Look at what as.matrix does to your data: since there is a non-numeric column it produces a character

[R] Bug?

2017-08-08 Thread Ramiro Barrantes
Hello, In my code I found something that looks like an anomaly, I found a reproducible example in which I am just trying to compare each row in a data frame against the first row:

Re: [R] how to extract individual values from varcomp?

2017-08-08 Thread Sharada Ramadass
Thanks! That helped. Was able to extract by character Rgds, Sharada On Tue, Aug 8, 2017 at 8:20 PM, PIKAL Petr wrote: > Hi > > try > str(varcompobject) > > to see structure of this object. You can extract parts by standard R means. > > Cheers > Petr > >> -Original

[ESS] inferior-ess-own-frame

2017-08-08 Thread Benjamin Rogers
Hello, I'm having a bit of a problem with my init.el file. When I installed ESS in windows 10, I installed a custom init.el file, which I have included as an attachment. The difficulty I'm having arises when I open R using C-c C-c, S-Enter, or any eval command. I'm used to having R start in a

[R] Obtaining estimates and significance of random factors

2017-08-08 Thread Bharat Parthasarathy
0down votefavorite I'm looking for way to obtain parameter estimates (such as *beta*, *SE* and *t* scores) and *P* values of random factors after GLMM in R. My model

Re: [R] map_data

2017-08-08 Thread Jeff Newmiller
My guess is that you have either forgotten to load the package library(maps) or you have upgraded from R3.3 to R3.4, and such minor version changes lead to using a fresh package library and you need to (re-)install the maps package for the new version of R: install.packages("maps") so that

Re: [R] Inheritance for S3 classes

2017-08-08 Thread Jeff Newmiller
The direct question seemed to be how to pass many optional parameters through, which seems obvious once you know it but the OP might not have seen it yet... f1 <- function( x, y=1, z=2 ) { x*y + z } f2 <- function( x, ... ) { x <- x + 1 f1( x, ... ) } f2( 2, y=3 ) -- Sent from my

Re: [R] how to extract individual values from varcomp?

2017-08-08 Thread PIKAL Petr
Hi try str(varcompobject) to see structure of this object. You can extract parts by standard R means. Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Sharada > Ramadass > Sent: Tuesday, August 8, 2017 3:33 PM > To: r-help@r-project.org

[R] map_data

2017-08-08 Thread Полтораднев Максим Сергеевич
Hello, I have some problems with calling the map_data function in maps package. Not so long ago it was not a problem, but for some reasons in July this year it became unavailable. For instance, if I call the following code: m<-map_data(“world”) The R returns to me: Error: cannot find function

[R] how to extract individual values from varcomp?

2017-08-08 Thread Sharada Ramadass
Hello, I am trying to use varcomp to decompose the variance across multiple nested levels on a lme object. I am able to successfully do this and when I view the varcomp object I can see the individual values / estimates for the variance at different levels. However, I want to be able to extract

Re: [R-es] unir varios archivos .csv en una serie historica

2017-08-08 Thread Sebastian Kruk
Hola Eric. Muchas gracias. Era exactamente lo que quería. Te agradezco mucho. Saludos, Sebastián. Enviado desde Correo para Windows 10 De: eric Enviado: martes, 8 de agosto de 2017 8:25 Para: Sebastian Kruk; Lista R Asunto: Re: [R-es] unir varios archivos .csv en una serie historica hola

Re: [R] Latin hypercube sampling from a non-uniform distribution

2017-08-08 Thread S Ellison
> However, my variable is simulated from the cumulative distribution function > of the Poisson distribution. Then I am afraid I don't know what you're trying to achieve. Or why. However, the principle holds; write a function that maps [0,1] to the 'pattern' you want, do that and apply it to

Re: [R] Nested for loop

2017-08-08 Thread S Ellison
> The code I've attached works for a population of 400 and samples 100 times. > I'd like to extend this to 300 samples and 3 populations. So, the x-axis would > range from 0-300 samples. > > What I'm having trouble with is finding a way to change the population mid- > way through the function. I

Re: [R-es] unir varios archivos .csv en una serie historica

2017-08-08 Thread eric
hola sebastian, invente 3 archivos con la estructura que describes y probe el codigo, le hice un par de arreglos necesarios, ahi va ... funciona bien con los archivos que te adjunto: # usando la libreria data.table library(data.table)

Re: [R] Nested cross validation with lapply

2017-08-08 Thread Suzen, Mehmet
Hi Jesús, Do you have a code you tried without lapply? Why don't you post that here too? There are a couple of packages supporting nested CV; TANDEM, blkbox you may want to check their code. Also, `cvTools` package may help you to write one. On 7 August 2017 at 15:21, Jesús Para Fernández

Re: [R-es] unir varios archivos .csv en una serie historica

2017-08-08 Thread Sebastian Kruk
Hola Eric. Me diste una muy buena orientación. Para algunos años los archivos son de excel donde cada uno tiene 12 hojas, una hoja por mes. Cada hoja tiene el siguiente formato: Hora 1 2 3 4 … 31 1 0 0 0 0 … 23 2 0 0 0 24 … 0 3 0 0 0 24,5 … 21 4 0 0 0 26 … 12 … 24 0 0 0 0 … 0 Por

Re: [R-es] unir varios archivos .csv en una serie historica

2017-08-08 Thread eric
Hola sebastian, sin el archivo de datos para probar y ver la estructura de los datos es un poco dificil, pero haciendo algunas suposiciones imagino que algo como esto te puede ayudar, seguro tendras que hacer ajustes: # usando la libreria data.table

[R] [R-pkgs] itunesr - new package to access iTunes App Store Ratings and Reviews

2017-08-08 Thread AMR RS
Hello Fellow Rusers, Introducing '*itunesr' *my first package to help iOS Product Managers to access Ratings and Reviews via R: https://cran.r-project.org/package=itunesr Please give me suggestions to improve my next version Would love contributions also! https://github.com/amrrs/itunesr