Re: [R] R code for overlapping variables -- count

2024-06-03 Thread Ebert,Timothy Aaron
dalgaard Sent: Monday, June 3, 2024 5:02 AM To: Shadee Ashtari Cc: r-help@r-project.org Subject: Re: [R] R code for overlapping variables -- count [External Email] If they are binary (0/1 dummies), can't you just "&" them as in table(Female & USA & MidIncome) (or sum()

Re: [R] R code for overlapping variables -- count

2024-06-03 Thread peter dalgaard
If they are binary (0/1 dummies), can't you just "&" them as in table(Female & USA & MidIncome) (or sum() if you don't care about the number of 0s) -pd > On 2 Jun 2024, at 00:31 , Shadee Ashtari wrote: > > Hi! > > I am trying to find the code for how to get counts for intersectional > varia

Re: [R] R code for overlapping variables -- count

2024-06-02 Thread Rui Barradas
Às 18:40 de 02/06/2024, Rui Barradas escreveu: Às 18:34 de 02/06/2024, Leo Mada via R-help escreveu: Dear Shadee, If you have a data.frame with the following columns: n = 100; # population size x = data.frame(   Sex = sample(c("M","F"), n, T),   Country = sample(c("AA", "BB", "US"), n,

Re: [R] R code for overlapping variables -- count

2024-06-02 Thread Leo Mada via R-help
Correcting a small glitch - see new code. From: Leo Mada Sent: Sunday, June 2, 2024 8:34 PM To: Shadee Ashtari Cc: r-help@r-project.org Subject: [R] R code for overlapping variables -- count Dear Shadee, If you have a data.frame with the following columns: n

Re: [R] R code for overlapping variables -- count

2024-06-02 Thread Rui Barradas
Às 18:34 de 02/06/2024, Leo Mada via R-help escreveu: Dear Shadee, If you have a data.frame with the following columns: n = 100; # population size x = data.frame(   Sex = sample(c("M","F"), n, T),   Country = sample(c("AA", "BB", "US"), n, T),   Income = as.factor(sample(1:3, n, T)

[R] R code for overlapping variables -- count

2024-06-02 Thread Leo Mada via R-help
Dear Shadee, If you have a data.frame with the following columns: n = 100; # population size x = data.frame(   Sex = sample(c("M","F"), n, T),   Country = sample(c("AA", "BB", "US"), n, T),   Income = as.factor(sample(1:3, n, T)) ) # Dummy variable ONE = rep(1, nrow(x)) r = aggrega

Re: [R] R code for overlapping variables -- count

2024-06-02 Thread Duncan Murdoch
On 2024-06-01 6:31 p.m., Shadee Ashtari wrote: Hi! I am trying to find the code for how to get counts for intersectional variables. For example, I have three unique categorical variables -- "Female," "USA," and "MidIncome" -- and I'm trying to see how many people I have at the intersection of th

[R] R code for overlapping variables -- count

2024-06-02 Thread Shadee Ashtari
Hi! I am trying to find the code for how to get counts for intersectional variables. For example, I have three unique categorical variables -- "Female," "USA," and "MidIncome" -- and I'm trying to see how many people I have at the intersection of the three. Thank you so much, Shadee [[al

Re: [R] R Code Execution taking forever

2022-04-24 Thread Paul Bernal
n with run time and trial size should let you > estimate run time for 1 million. > > > Tim > > -Original Message- > From: R-help On Behalf Of Rui Barradas > Sent: Sunday, April 24, 2022 5:44 AM > To: Paul Bernal ; R > Subject: Re: [R] R Code Execution taking

Re: [R] R Code Execution taking forever

2022-04-24 Thread Ebert,Timothy Aaron
ial size should let you estimate run time for 1 million. Tim -Original Message- From: R-help On Behalf Of Rui Barradas Sent: Sunday, April 24, 2022 5:44 AM To: Paul Bernal ; R Subject: Re: [R] R Code Execution taking forever [External Email] Hello, I'm having trouble running

Re: [R] R Code Execution taking forever

2022-04-24 Thread Rui Barradas
Hello, Thanks for the link, the package is TeachingDemos, it's the function that's named dice. And the source code shows that it calls sample() in a way similar to mine, so the code I posted should give approximately the same results. To run just once, change to K <- 1L, right before the mai

Re: [R] R Code Execution taking forever

2022-04-24 Thread Rui Barradas
Hello, I'm having trouble running the code, where does function dice come from? CRAN package dice only has two functions, getEventProb getSumProbs not a function dice. Can you post a link to where the package/function can be found? Rui Barradas Às 02:00 de 24/04/2022, Paul Bernal escreveu:

Re: [R] R Code Execution taking forever

2022-04-23 Thread Jim Lemon
HI Paul, I had a problem a bit like this when trying to implement the Lim-Wolfe imputation for ranks. The size of the output matrix increases exponentially with the size of the initial matrix and it goes into disk-swapping slow motion. It works for small matrices, but rapidly runs out of memory. I

Re: [R] R code in RData

2021-10-28 Thread Martin Maechler
> Bert Gunter > on Wed, 27 Oct 2021 10:47:14 -0700 writes: > See ?load, but you may be confused. Strictly speaking, there is no code in > an .Rdata file, only a (typically binary, but possibly ascii) > representation of objects, usually as produced by ?save. Of course,

Re: [R] R code in RData

2021-10-28 Thread Martin Maechler
> Jeff Newmiller > on Wed, 27 Oct 2021 11:43:08 -0700 writes: > Sounds right, though the OP appears to be assuming that the code used to generate the data objects in the file will also be there, and we need to be more definitive about that: it is not. Depending how the code was

Re: [R] R code in RData

2021-10-27 Thread Jeff Newmiller
Sounds right, though the OP appears to be assuming that the code used to generate the data objects in the file will also be there, and we need to be more definitive about that: it is not. Depending how the code was constructed, there may be useful information in the functions that were stored in

Re: [R] R code in RData

2021-10-27 Thread Bert Gunter
See ?load, but you may be confused. Strictly speaking, there is no code in an .Rdata file, only a (typically binary, but possibly ascii) representation of objects, usually as produced by ?save. Of course, functions are also objects, so that if you load a file with functions, the function code is av

[R] R code in RData

2021-10-27 Thread Bogdan Tanasa
Dear all, would you please advice : I have an Rdata file, what is the way to print the R code that has been used inside the Rdata file ? thank you, Bogdan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSC

Re: [R] [R Code] Split long names in format.ftable

2021-09-17 Thread Leonard Mada via R-help
Dear List members, I have uploaded an improved version on Github. The function is now fully functional: - justify: left, right, cent...: TODO centre vs center; - sep: separator when printing; - pos: Top, Bottom; TODO: Middle; see: https://github.com/discoleo/R/blob/master/Stat/Tools.Data. I

Re: [R] [R Code] Split long names in format.ftable

2021-09-15 Thread Leonard Mada via R-help
Dear List members, I have uploaded an improved version on Github: - new option: align top vs bottom; Functions: split.names: splits and aligns the names; merge.align: aligns 2 string matrices; ftable2: enhanced version of format.ftable (proof of concept); see: https://github.com/discoleo/R/blob

[R] [R Code] Split long names in format.ftable

2021-09-14 Thread Leonard Mada via R-help
Dear List members, I wrote some code to split long names in format.ftable. I hope it will be useful to others as well. Ideally, this code should be implemented natively in R. I will provide in the 2nd part of the mail a concept how to actually implement the code in R. This may be interesti

Re: [R] R code required

2019-12-23 Thread Jeff Newmiller
You are corresponding to a mailing list, but you need to be corresponding with the author of the paper you are referring to. I have no idea who that is or what the paper is that you are referring to. On December 23, 2019 6:32:26 AM PST, Salwa El-Aty wrote: > > >Dear Sir >I want to help me abou

[R] R code required

2019-12-23 Thread Salwa El-Aty
Dear Sir I want to help me about to send the R Code of paper which title Inference of Generalized endpoint inflated binomial regression . In . 2017 Best Regards Salwa. A.Mousa Sent from my Samsung device [[alternative HTML version deleted]] __

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread William R Revelle
Hi all. I am taking a brief vacation and will look at this next week. Bill > On Aug 29, 2019, at 2:53 PM, William Dunlap wrote: > > Element #2 of that output, the empty fomula " F1=~ ", triggers the bug in > omegaSem. > omegaSem needs to ignore such entries in omega's output. psych's auth

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread Danilo Esteban Rodriguez Zapata via R-help
Thank you so much, I'll wait until then. The good thing is that we can make sure now what is the actual problem. I wish you have a good rest. El jue., 29 ago. 2019 a las 14:55, William R Revelle (< reve...@northwestern.edu>) escribió: > Hi all. > > I am taking a brief vacation and will look at t

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread Danilo Esteban Rodriguez Zapata via R-help
well the output with the code that you refer is the following: > psych::omega(my.data)$model$lavaan [1] g =~ +AUT_10_04+AUN_07_01+AUN_07_02+AUN_09_01+AUN_10_01+AUT_11_01+AUT_17_01+AUT_20_03+CRE_05_02+CRE_07_04+CRE_10_01+CRE_16_02+EFEC_03_07+EFEC_05+EFEC_09_02+EFEC_16_03+EVA_02_01+EVA_07_01+EVA_12_

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread Danilo Esteban Rodriguez Zapata via R-help
Dear William, Thank you for your answer, I would like to add some information that I just obtained looking in different sites and forums. Someone there ask me to create a fake data file, so I did that from my original data file. What I did was open the .csv file with notepad and replace all the 4

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread William Dunlap via R-help
Element #2 of that output, the empty fomula " F1=~ ", triggers the bug in omegaSem. omegaSem needs to ignore such entries in omega's output. psych's author should be able to fix things up. Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Aug 29, 2019 at 12:31 PM Danilo Esteban Rodriguez Z

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread William Dunlap via R-help
Please use 'reply to all' for responses to R-help reponses. What do you get with your original data for psych::omega(my.data)$model$lavaan ? Any entries like "F3=~"? Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Aug 29, 2019 at 12:05 PM Danilo Esteban Rodriguez Zapata < danilo_rodrig

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread William Dunlap via R-help
> omegaSem(r9,n.obs=198) Error in parse(text = x, keep.source = FALSE) : :2:0: unexpected end of input This error probably comes from calling factor("~") and psych::omegaSem(data) will do that if all the columns in data are very highly correlated with one another. In that case ome

[R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread Danilo Esteban Rodriguez Zapata via R-help
This is a problem related to my last question referred to the omegaSem() function in the psych package (that is already solved because I realized that I was missing a variable assignment and because of that I had an 'object not found' error: https://stackoverflow.com/questions/57661750/one-of-the-

[R] R code for fixed effect multinomial logistic regression and experimental data

2019-01-29 Thread Bhubaneswor Dhakal
Hi R support group team I would like to contribute on two issues posted last days: 1. Addressing question by Valerio [Valerio Leone Sciabolazza < sciabola...@gmail.com>]: [R] how to run a multinomial logistic regression with fixed effects. Application of fixed effect multinomial logistic regressi

Re: [R] R code for if-then-do code blocks

2018-12-19 Thread Paul Miller via R-help
Hi Gabor, Richard, and Thierry, Thanks very much for your replies. Turns out I had already hit on Gabor's idea of "factor out" in writing an initial draft of the code converting from SAS to R. Below is the link Gabor sent describing this and other approaches. https://stackoverflow.com/questio

Re: [R] R code for if-then-do code blocks

2018-12-17 Thread Gabor Grothendieck
There is some discussion of approaches to this here: https://stackoverflow.com/questions/34096162/dplyr-mutate-replace-on-a-subset-of-rows/34096575#34096575 On Mon, Dec 17, 2018 at 10:30 AM Paul Miller via R-help wrote: > > Hello All, > > Season's greetings! > > Am trying to replicate some SAS

Re: [R] R code for if-then-do code blocks

2018-12-17 Thread Richard M. Heiberger
I got another 10% savings with this example by using only one subscripting adjustment. I also fixed a typo in my previous posting (which didn't affect the timing). microbenchmark( rmh={ d3 <-data.frame(ID=rownames(d1), d1, test1=0, test2=0,

Re: [R] R code for if-then-do code blocks

2018-12-17 Thread Richard M. Heiberger
this can be dome even faster, and I think more easily read, using only base R d1 <- data.frame(workshop=rep(1:2,4), gender=rep(c("f","m"),each=4)) ## needed by vector and rowbased, not needed by rmh library(tibble) library(plyr) library(magrittr) microbenchmark( vector = {d1 %>

Re: [R] R code for if-then-do code blocks

2018-12-17 Thread Thierry Onkelinx via R-help
Dear Paul, R's power is that is works vectorised. Unlike SAS which is rowbased. Using R in a SAS way will lead to very slow code. Your examples can be written vectorised d1 %>% rownames_to_column("ID") %>% mutate( test1 = ifelse(gender == "f" & workshop == 1, 7, 0), test2 = ifelse(ge

[R] R code for if-then-do code blocks

2018-12-17 Thread Paul Miller via R-help
Hello All, Season's greetings! Am trying to replicate some SAS code in R. The SAS code uses if-then-do code blocks. I've been trying to do likewise in R as that seems to be the most reliable way to get the same result. Below is some toy data and some code that does work. There are some thing

Re: [R] R code for parameter estimates

2018-08-30 Thread Bert Gunter
As you have completely failed to follow procedures described in the posting guide linked below, your post is unlikely to receive any response. Cheers, Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed i

[R] R code for parameter estimates

2018-08-30 Thread KABELI MEFANE via R-help
Hello R -helpers Can you please be kind enough to help me the R code for GEV parameter estimates using Bayes, I have done them using MLE and it would really be nice to compare. I am trying to model rainfall data, i have used sevaral distributions such as lognormal, Burr, Pearson, GEV but the t

Re: [R] R code for Batch forecasting

2018-03-15 Thread Bert Gunter
Use a for loop or something else, e.g. lapply() with predict(). To get a better answer, read and follow the posting guide linked below. -- 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 hi

[R] R code for Batch forecasting

2018-03-15 Thread Manish Mukherjee
Hi All, Is there was where we can predict the time series for multiple items in one go - i mean can we run the code for any time series model over multiple columns using for loop or something else . If someone can provide some example it will be helpfull. Thanks & Regards Manish Mukherjee

Re: [R] R code helps needed!

2017-03-05 Thread SH
Hi Jim, I added more codes besides your original ones. I bet there should be simpler way(s) to do this but this is the best I can think of. Any feedback from you and others will be highly appreciated. Thanks a lot! Steve result<-read.table(text= "intercept decision expected.decision 1 r

Re: [R] R code helps needed!

2017-03-05 Thread SH
Hi Jim, Thank you very much for replying back. I think the data I presented have not many 'pass' than I thought. The purpose of the code is to skip sampling for 5 consecutive rows when a previous row is found as 'pass'. Thus, because the fourth row is 'pass', sampling will be skipped next five

Re: [R] R code helps needed!

2017-03-02 Thread Jim Lemon
Hi Steve, Try this: result<-read.table(text= "intercept decision 1 reject 2 reject 3 reject 0 pass 3 reject 2 reject 3 reject 5 reject 3 reject 1 reject 1 reject 2 reject 2 reject 0 pass 3 r

[R] R code helps needed!

2017-03-02 Thread SH
Hi Although I posted this in stackoverflow yesterday, I am asking here to get helps as soon as quickly. I need help make code for mocking sampling environment. Here is my code below: First, I generated mock units with 1000 groups of 100 units. Each row is considered as independent sample space.

Re: [R] R code, heat wave statistics

2016-07-18 Thread Christopher W Ryan
I think much depends on how you define heat wave. --Chris Ryan Broome County Health Department Binghamton, NY USA On Mon, Jul 18, 2016 at 6:16 AM, Damjan / wrote: > Dar all, > > I have a txt file with 4 column data about daily maximum temperature for > some years. > > I need to find the number o

[R] R code, heat wave statistics

2016-07-18 Thread Damjan /
Dar all, I have a txt file with 4 column data about daily maximum temperature for some years. I need to find the number of heat waves and : Average (+ standard deviation) and maximum duration of the heatwave, · The number of heat waves, · The number of days in the summer heat wave . txt file is

Re: [R] r code for multilevel latent class analysis

2016-07-09 Thread Cristina Cametti
Dear all, thank you very much for your suggestions! About the fact that I put my variables plus 1, it is because if I don�t do it, I get this message: ALERT: some manifest variables contain values that are not positive integers. For poLCA to run, please recode categorical outcome variabl

Re: [R] r code for multilevel latent class analysis

2016-07-07 Thread David Winsemius
> On Jul 7, 2016, at 3:36 PM, Jim Lemon wrote: > > Hi Cristina, > Try this: > > names(mydata) > > It may be NULL or "ppitrst" may be absent. I've already suggested to Christina that she make sure the variables are spelled correctly and she reports they are all present in her dataset. So I t

Re: [R] r code for multilevel latent class analysis

2016-07-07 Thread Jim Lemon
Hi Cristina, Try this: names(mydata) It may be NULL or "ppitrst" may be absent. Jim On Thu, Jul 7, 2016 at 8:26 PM, Cristina Cametti wrote: > Dear all, > > I am not able to find a reliable r code to run a multilevel latent class > model. Indeed, I have to analyze how social trust (three vari

Re: [R] R code for multilevel latent class analysis

2016-07-07 Thread David Winsemius
> On Jul 7, 2016, at 4:31 AM, Yahoo Mail via R-help > wrote: > > Dear all, > > I am not able to find a reliable r code to run a multilevel latent class > model. Indeed, I have to analyze how social trust (three variables form the > ESS survey) might vary between countries (21 countries in my

Re: [R] r code for multilevel latent class analysis

2016-07-07 Thread Anthony Damico
start at https://github.com/ajdamico/asdfree/blob/master/European%20Social%20Survey/structural%20equation%20modeling%20examples.R maybe? On Thu, Jul 7, 2016 at 6:26 AM, Cristina Cametti wrote: > Dear all, > > I am not able to find a reliable r code to run a multilevel latent class > model. Indee

[R] R code for multilevel latent class analysis

2016-07-07 Thread Yahoo Mail via R-help
Dear all, I am not able to find a reliable r code to run a multilevel latent class model. Indeed, I have to analyze how social trust (three variables form the ESS survey) might vary between countries (21 countries in my database). I tried to use the poLCA package but I am not sure if my code is

[R] r code for multilevel latent class analysis

2016-07-07 Thread Cristina Cametti
Dear all, I am not able to find a reliable r code to run a multilevel latent class model. Indeed, I have to analyze how social trust (three variables form the ESS survey) might vary between countries (21 countries in my database). I tried to use the poLCA package but I am not sure if my code is

Re: [R] R code help!

2015-09-21 Thread SH
Hi Jean, Thank you so much! Steve On Sat, Sep 19, 2015 at 1:02 PM, Adams, Jean wrote: > Here's one way to save your results, using a list of lists and a for() > loop. > > nsim <- 100 > outputs <- vector("list", nsim) > for(i in 1:nsim) { > outputs[[i]] <- sim.f(p.s=.05, N=1000, sample.size=6

Re: [R] R code help!

2015-09-19 Thread Adams, Jean
Here's one way to save your results, using a list of lists and a for() loop. nsim <- 100 outputs <- vector("list", nsim) for(i in 1:nsim) { outputs[[i]] <- sim.f(p.s=.05, N=1000, sample.size=69, n.sim=500) } Jean On Fri, Sep 18, 2015 at 2:27 PM, SH wrote: > Dear R users, > > I am trying to s

[R] R code help!

2015-09-18 Thread SH
Dear R users, I am trying to simulate surveys and the survey result will be used to determine the population to be "accepted" or "rejected". With the results, I would like to calculate cumulative means and plot them to see if a converged value is as expected. Below is R-code I generated. I need

Re: [R] R code/package for calculation of Wasserstein distance between two densities

2015-04-20 Thread Dennis Murphy
Hi Ranjan: Try this: library(sos) findFn("Wasserstein") It appears there are three packages that might be relevant: HistDAWass, transport and TDA. HTH, Dennis On Sat, Apr 18, 2015 at 8:06 PM, Ranjan Maitra wrote: > Dear friends, > > Before reinventing the wheel, I was wondering if anyone can

[R] R code/package for calculation of Wasserstein distance between two densities

2015-04-20 Thread Ranjan Maitra
Dear friends, Before reinventing the wheel, I was wondering if anyone can point me to code for calculating the Wasserstein distance between two densities. I am particularly interested in mixture densities (in functional form). I know that we have the earthmovers distance in R via the emdist pa

Re: [R] r code for mtcars data frame

2014-11-28 Thread Lee, Chel Hee
> dump("mtcars", file="") mtcars <- structure(list(mpg = c(21, 21, 22.8, 21.4, 18.7, 18.1, 14.3, 24.4, 22.8, 19.2, 17.8, 16.4, 17.3, 15.2, 10.4, 10.4, 14.7, 32.4, 30.4, 33.9, 21.5, 15.5, 15.2, 13.3, 19.2, 27.3, 26, 30.4, 15.8, 19.7, 15, 21.4), cyl = c(6, 6, 4, 6, 8, 6, 8, 4, 4, 6, 6, 8, 8, 8, 8, 8

Re: [R] r code for mtcars data frame

2014-11-28 Thread BRC
it is not as I remembered, but I got the my requirement, so I can do my task at my data. Thanks It helped me a lot. On Sat, Nov 29, 2014 at 2:48 AM, Boris Steipe wrote: > try: > dput(mtcars) > > > B. > > On Nov 28, 2014, at 8:24 AM, BRC wrote: > > > I need r-code of data frame of "mtacrs". ple

Re: [R] r code for mtcars data frame

2014-11-28 Thread Boris Steipe
try: dput(mtcars) B. On Nov 28, 2014, at 8:24 AM, BRC wrote: > I need r-code of data frame of "mtacrs". please advise how I can find it. > > regards > faisal > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list

[R] r code for mtcars data frame

2014-11-28 Thread BRC
I need r-code of data frame of "mtacrs". please advise how I can find it. regards faisal [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide htt

[R] R-code for carrying out step-wise panel regression

2014-10-21 Thread Amarjit Singh
Dear all For one of my empirical research investigation,  I tried to carry out step-wise panel regression analysis by making adaptation in the use of plm package (since stepAIC command does not work with plm). Say, I tried to regress an explained variable (DEP) on 3 explanatory variables (EX1, E

[R] R code for Forecasting ARDL

2014-07-19 Thread Ibrahim Alfaki
Dear list members I appreciate if anyone share with or direct me to a source or R code for forecasting ARDL(p,q) times series using Monte Carlo simulation. Kind regards I. Mohamed, CBE, UAEU [[alternative HTML version deleted]] __ R-help@r-p

Re: [R] R code queries

2013-08-20 Thread Richard M. Heiberger
You have been trapped by attempting to use double quotes inside double quotes. Use single quotes on the inside “etsz <- ets(zz,model='ZZZ')" Please send only minimal data to the list. dput(head(mydata)) is the preferred format. That way a reader of this list can pick it up from the email and d

Re: [R] R code queries

2013-08-20 Thread Rui Barradas
Hello, Address your questions to R-Help, please: r-help@r-project.org I don't use VBA, so I can't help you with what you need. Does your code run in R? As a first line of code, you should have written library(forecast) rest of answer inline. Em 20-08-2013 17:10, siddhartha.ged...@eclerx.co

[R] R code parallelized using plyr and doMC: error message: Error in do.ply(i) : task 1 failed - “could not find function ”getClass“”

2013-01-31 Thread Andrew Crane-Droesch
Dear list, I'm just getting started learning how to use remote supercomputers for execution of parallelized code. I got a lot of initial help from this previous post, as wel

Re: [R] r code

2013-01-03 Thread Jim Lemon
On 01/04/2013 02:03 AM, catalin roibu wrote: I have a problem. My data is now in this form: plot area d 1 0.01 34.6 ... 100 0.01 15.7 First, I want to aggregate plots start from a plot in the center of sample (10 plots x 10 plots). I want to aggregate after the model pl

[R] r code

2013-01-03 Thread catalin roibu
I have a problem. My data is now in this form: plot area d 1 0.01 34.6 ... 100 0.01 15.7 First, I want to aggregate plots start from a plot in the center of sample (10 plots x 10 plots). I want to aggregate after the model plot1 in the center of area (0,01 m2), after incr

Re: [R] R code for to check outliers

2012-07-20 Thread Angus Wallace
Really appreciate the discussion on outliers. I come from an engineering signal processing background, and my thinking has generally been that an outlier is outside a threshold of - distance from the mean - rarity that we don't need/want to capture in whatever model we're building. In my

Re: [R] R code for to check outliers

2012-07-18 Thread arun
HI, Check this link: http://stackoverflow.com/questions/1444306/how-to-use-outlier-tests-in-r-code Hope it would be helpful. A.K. - Original Message - From: Sajeeka Nanayakkara To: "r-help@r-project.org" Cc: Sent: Wednesday, July 18, 2012 9:27 AM Subject: [R] R code fo

Re: [R] R code for to check outliers

2012-07-18 Thread Rui Barradas
Hello, Inline Em 18-07-2012 18:44, Nordlund, Dan (DSHS/RDA) escreveu: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Sajeeka Nanayakkara Sent: Wednesday, July 18, 2012 6:28 AM To: r-help@r-project.org Subject: [R] R code for to

Re: [R] R code for to check outliers

2012-07-18 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Sajeeka Nanayakkara > Sent: Wednesday, July 18, 2012 6:28 AM > To: r-help@r-project.org > Subject: [R] R code for to check outliers > > > > >

Re: [R] R code for to check outliers

2012-07-18 Thread Martin Maechler
> Bert Gunter > on Wed, 18 Jul 2012 07:14:31 -0700 writes: > checkforoutliers <- function(series) NULL > Cheers, Bert > *Explanation: There is no such thing as a statistical > outlier -- or, rather,"outlier" is a fraudulent > statistical concept, defined arbitrari

Re: [R] R code for to check outliers

2012-07-18 Thread Duncan Murdoch
On 18/07/2012 10:14 AM, Bert Gunter wrote: checkforoutliers <- function(series)NULL Cheers, Bert *Explanation: There is no such thing as a statistical outlier -- or, rather,"outlier" is a fraudulent statistical concept, defined arbitrarily and without scientific legitimacy. The typical unstated

Re: [R] R code for to check outliers

2012-07-18 Thread S Ellison
> >> What is the R code to check whether data series have >>> outliers or not? In case noone else has pointed you there, you could try the 'outliers' package. That contains some of the 'standard' methods of outlier testing for univariate data. What you do with them when you find them is a

Re: [R] R code for to check outliers

2012-07-18 Thread R. Michael Weylandt
To further what Bert says: You would almost certainly prefer to use robust statistics than "outlier detection". I believe Greg Snow's TeachingDemos package has a data set "outliers" suggesting some of the perils of doing things the outlier-removal way. Best, Michael On Wed, Jul 18, 2012 at 9:14

Re: [R] R code for to check outliers

2012-07-18 Thread Bert Gunter
checkforoutliers <- function(series)NULL Cheers, Bert *Explanation: There is no such thing as a statistical outlier -- or, rather,"outlier" is a fraudulent statistical concept, defined arbitrarily and without scientific legitimacy. The typical unstated purpose of such identification is to remove

[R] R code for to check outliers

2012-07-18 Thread Sajeeka Nanayakkara
 What is the R code to check whether data series have outliers or not? Thanks, Sajeeka Nanayakkara [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

Re: [R] R code help to change table format

2012-07-10 Thread Rui Barradas
Hello, You should say what is the package you are using, EstimateS returns hundreds of hits. [ package sos, findFn() ]. As for the question, try sp <- 1:5 ab <- c(3, 2, 2, 2, 4) rep(sp, ab) Hope this helps, Rui Barradas Em 10-07-2012 18:23, peziza escreveu: I am trying to input an OTU t

[R] R code help to change table format

2012-07-10 Thread peziza
I am trying to input an OTU table into EstimateS, however, the format of the OTU table has to be changed to fit the format EstimateS will accept. In R, I would like to change the format of the OTU table (from excel). Here is what I need to do, take Example 1 and create Example 2. The problem is t

Re: [R] R code for Ljung-Box Test

2012-07-09 Thread Rui Barradas
Hello, The function is ?Box.test It has two types, Box-Pierce and Ljung-Box. Hope this helps, Rui Barradas Em 09-07-2012 15:59, Sajeeka Nanayakkara escreveu: What is the R code for Ljung-Box Test in Statistics? Sajeeka Nanayakkara [[alternative HTML version deleted]] ___

[R] R code for Ljung-Box Test

2012-07-09 Thread Sajeeka Nanayakkara
 What is the R code for Ljung-Box Test in Statistics? Sajeeka Nanayakkara [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-proj

Re: [R] R-Code Project Help

2012-05-07 Thread R. Michael Weylandt
Unfortunately, there's a no-homework policy on this list so we can't really give you much help. Googling "simulate blackjack r-project" does turn up some interesting leads though. Best, Michael On Mon, May 7, 2012 at 5:37 PM, Mark G wrote: > Hello, > > I am trying to do a project on R-Code invo

[R] R-Code Project Help

2012-05-07 Thread Mark G
Hello, I am trying to do a project on R-Code involving black jack simulations for a class of mine and I need help starting it.  I have tried so many different options and am getting no where and am looking for some help.  If anyone can help me out it would be amazing.  thank you Gabriel

Re: [R] R code

2011-12-01 Thread Jim Holtman
the problem might be a missing quote. Try quote = '' Or it might be a comment character, so try comment.char = '' This happens a lot if your data is not clean Sent from my iPad On Nov 30, 2011, at 19:48, nsaraf wrote: > ) __ R-help@r-project.or

[R] R code

2011-11-30 Thread nsaraf
Hi everybody, I am unable to resolve this error using the following for loop. Would appreciate help. The same loop works with for(i in 1:92) strangely. I checked the .raw input file and everything is kosher, even Line 547 mentioned in the error message. I wonder if there is any problem with the p

Re: [R] R code Error : Hybrid Censored Weibull Distribution

2011-10-21 Thread peter dalgaard
On Oct 20, 2011, at 21:25 , ritwi...@isical.ac.in wrote: > Dear Sir/madam, > > I'm getting a problem with a R-code which calculate Fisher Information > Matrix for Hybrid Censored Weibull Distribution. My problem is that: > > when I take weibull(scale=1,shape=2) { i.e shape>1} I got my desired >

[R] R code Error : Hybrid Censored Weibull Distribution

2011-10-20 Thread ritwik_r
Dear Sir/madam, I'm getting a problem with a R-code which calculate Fisher Information Matrix for Hybrid Censored Weibull Distribution. My problem is that: when I take weibull(scale=1,shape=2) { i.e shape>1} I got my desired result but when I take weibull(scale=1,shape=0.5) { i.e shape<1} it give

[R] R code to calculate elixhauser comorbidity score

2011-08-31 Thread Cindy Chen
Hello, I need to calculate elixhauser comorbidity score using ICD9 code. I can find SAS code for the calculation online, but not R code. If you wrote the R code or are aware of existence of this kind of R code, could you please let me know? Thanks! Qingxia (Cindy) Chen __

[R] R code for OptiGrid Clustering

2011-08-26 Thread Michael Pearmain
Hi All, Has anyone coded up the OptiGrid clustering algorithm for high dimensional space? If so is anyone willing to share? Many thanks in Advance Mike [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.eth

Re: [R] R code to extract shape polygons for any state for loading into Geobugs

2011-07-16 Thread Roger Bivand
NEVER, ever, post a question on a new topic in an existing thread - see the posting guide; you pollute the archive, and harm yourself by having your question "disappear". For conversion of SpatialPolygons* objects to read into WinBUGS, see ?sp2WB in the maptools package. Your question is more appro

[R] R code to extract shape polygons for any state for loading into Geobugs

2011-07-10 Thread Shant Ch
Hello R users, I am fitting a spatio-temporal model for the areal data related to school districts of Texas, US using geobugs. For that I need to load the polygon shape file in geobugs.In Bradley Carlin's website there was an S-plus program called poly.S to extract polygons for any state in th

Re: [R] R-code in R-file documentation

2011-05-18 Thread Yihui Xie
I guess what you want is cat(readLines("file.r"), sep = "\n") Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, May 18, 2011 at 4:03 AM, Brian Oney wrote: > Hello List, > I would like to

Re: [R] R-code in R-file documentation

2011-05-18 Thread Ben Bolker
Brian Oney gmail.com> writes: > > Hello List, > I would like to insert code from .r files into a LaTeX appendix > (possibly using Sweave). > I was considering: > [snip] Wouldn't it be easier to use the LaTeX listings package?

[R] R-code in R-file documentation

2011-05-18 Thread Brian Oney
Hello List, I would like to insert code from .r files into a LaTeX appendix (possibly using Sweave). I was considering: <>= source("file.r") @ but I would just like to echo the code and not evaluate the code within the file. maybe: <>= cat("\\begin{verbatim}") readLines("file.r") cat("\\end{v

Re: [R] R-code to generate random rotation matrix for rotation testing

2010-12-29 Thread Martin Maechler
> Martin Krautschke > on Mon, 27 Dec 2010 22:47:26 +0100 writes: > I am looking for an implementation of random rotation > matrix generation in R to do a rotation test: I want to > use the matrices to create random multivariate normal > matrices with common covariance

[R] R-code to generate random rotation matrix for rotation testing

2010-12-27 Thread Martin Krautschke
Dear list, I am looking for an implementation of random rotation matrix generation in R to do a rotation test: I want to use the matrices to create random multivariate normal matrices with common covariance structure and mean based on an observed data matrix. The rRotationMatrix-function in th

  1   2   >