[R] Random slope random intercept plot after clmm regression

2017-08-08 Thread Bharat Parthasarathy
0down votefavorite I'm trying to generate a random slope random intercept plot after ordinal regression using the clmmfunction from the ordinal package in R. I have

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 supp

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 programming in R … so I apol

[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

[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 error:

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 mat

[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: a<-data.frame(row=c("B","C","B"),column=c(2,2,10),assay=c("Assay1","Assay1","Assay1"),plate=c(1,1,1),stringsAsFacto

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 Message- >> From: R-help

[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 is

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 th

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 phone.

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 “m

[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] 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 the

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 w

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 wrot

[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 http