Re: [R] Beginner s quwry about cfa in lavaan

2017-07-09 Thread PIKAL Petr
Hi

Fo R basics best what you can do is to go through R intro document. Should be 
located in doc folder.

If you searched
r krippendorff alpha

you should find package irr, which maybe could do what you want (I am not an 
expert in this field).

Cheers
Petr

> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Martina
> Hulešová
> Sent: Friday, July 7, 2017 6:53 PM
> To: r-help@r-project.org
> Subject: [R] Beginner s quwry about cfa in lavaan
>
> Dear all,
> I am trying to learn about R. As a Phd student, I would like to use R for
> Krippendorff s alpha and later for a series of CFA. Is there any good
> introduction to these kind of analyses, or could you recommend me some
> tutorials on youtube, for example? I am new to R, so I need something basic ,
> starting from opening the R environment😉.
> Thank you .
> Martina Hulesova
>
> Odesláno z mého Windows Phone
>
>   [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a jsou určeny 
pouze jeho adresátům.
Jestliže jste obdržel(a) tento e-mail omylem, informujte laskavě neprodleně 
jeho odesílatele. Obsah tohoto emailu i s přílohami a jeho kopie vymažte ze 
svého systému.
Nejste-li zamýšleným adresátem tohoto emailu, nejste oprávněni tento email 
jakkoliv užívat, rozšiřovat, kopírovat či zveřejňovat.
Odesílatel e-mailu neodpovídá za eventuální škodu způsobenou modifikacemi či 
zpožděním přenosu e-mailu.

V případě, že je tento e-mail součástí obchodního jednání:
- vyhrazuje si odesílatel právo ukončit kdykoliv jednání o uzavření smlouvy, a 
to z jakéhokoliv důvodu i bez uvedení důvodu.
- a obsahuje-li nabídku, je adresát oprávněn nabídku bezodkladně přijmout; 
Odesílatel tohoto e-mailu (nabídky) vylučuje přijetí nabídky ze strany příjemce 
s dodatkem či odchylkou.
- trvá odesílatel na tom, že příslušná smlouva je uzavřena teprve výslovným 
dosažením shody na všech jejích náležitostech.
- odesílatel tohoto emailu informuje, že není oprávněn uzavírat za společnost 
žádné smlouvy s výjimkou případů, kdy k tomu byl písemně zmocněn nebo písemně 
pověřen a takové pověření nebo plná moc byly adresátovi tohoto emailu případně 
osobě, kterou adresát zastupuje, předloženy nebo jejich existence je adresátovi 
či osobě jím zastoupené známá.

This e-mail and any documents attached to it may be confidential and are 
intended only for its intended recipients.
If you received this e-mail by mistake, please immediately inform its sender. 
Delete the contents of this e-mail with all attachments and its copies from 
your system.
If you are not the intended recipient of this e-mail, you are not authorized to 
use, disseminate, copy or disclose this e-mail in any manner.
The sender of this e-mail shall not be liable for any possible damage caused by 
modifications of the e-mail or by delay with transfer of the email.

In case that this e-mail forms part of business dealings:
- the sender reserves the right to end negotiations about entering into a 
contract in any time, for any reason, and without stating any reasoning.
- if the e-mail contains an offer, the recipient is entitled to immediately 
accept such offer; The sender of this e-mail (offer) excludes any acceptance of 
the offer on the part of the recipient containing any amendment or variation.
- the sender insists on that the respective contract is concluded only upon an 
express mutual agreement on all its aspects.
- the sender of this e-mail informs that he/she is not authorized to enter into 
any contracts on behalf of the company except for cases in which he/she is 
expressly authorized to do so in writing, and such authorization or power of 
attorney is submitted to the recipient or the person represented by the 
recipient, or the existence of such authorization is known to the recipient of 
the person represented by the recipient.
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Histogram plots in Lattice with spatialgrid dataframe data

2017-07-09 Thread Thomas Adams
Jeff,

Thank you! I know what I did was very inelegant and I understand about
providing a reproducible example; I just could not do it with my data -- I
guess I was too lazy to make up a toy one. I apologize about the email
formatting.

I would never have known to use 'stack', 'levels' 'gather' and 'mutate' --
still very much learning... so, I appreciate what you provided. Thank you
so much!

Tom


On Sun, Jul 9, 2017 at 10:16 PM, Jeff Newmiller 
wrote:

> Glad you found an answer, though it looks more self-educational than
> efficient (see suggestions below). In the future, follow the
> recommendations of the Posting Guide: use plain text, and provide a
> reproducible example. Some elaborations on what "reproducible" means are
> [1][2][3]. One issue here was that you did not include sample data to work
> with (I have assumed below that ann_bias has no other columns than the
> bias columns, which is not the usual case).
>
> There are a number of ways to achieve the reshaping of your ann_bias data
> frame that are less painful than your approach. For example, the base R
> "stack" function:
>
> bias2 <- stack( ann_bias )
> names( bias2 ) <- c( "bias", "year )
> levels( bias2$year ) <- sub( "bias", "", levels( bias2$year ) )
>
> Or... if you are willing to venture into the tidyverse...
>
> library(dplyr)
> library(tidyr)
> bias3  <- (   ann_bias
>  %>% gather( year, bias )
>  %>% mutate( year = factor( sub( "bias", "", year ) ) )
>  )
>
> [1] http://stackoverflow.com/questions/5963269/how-to-make-
> a-great-r-reproducible-example
>
> [2] http://adv-r.had.co.nz/Reproducibility.html
>
> [3] https://cran.r-project.org/web/packages/reprex/index.html
>
> --
> Sent from my phone. Please excuse my brevity.
>
> On July 9, 2017 12:32:32 PM PDT, Thomas Adams  wrote:
> >Hello all,
> >
> >After more digging I was able to find out how to do this. The answer
> >came
> >from an example here:
> >
> >https://stackoverflow.com/questions/3541713/how-to-plot-
> two-histograms-together-in-r
> >
> >
> >yr_1997<-data.frame(bias=ann_bias$bias1997)
> >yr_1998<-data.frame(bias=ann_bias$bias1998)
> >yr_1999<-data.frame(bias=ann_bias$bias1999)
> >yr_2000<-data.frame(bias=ann_bias$bias2000)
> >yr_2001<-data.frame(bias=ann_bias$bias2001)
> >yr_2002<-data.frame(bias=ann_bias$bias2002)
> >yr_2003<-data.frame(bias=ann_bias$bias2003)
> >yr_2004<-data.frame(bias=ann_bias$bias2004)
> >yr_2005<-data.frame(bias=ann_bias$bias2005)
> >yr_2006<-data.frame(bias=ann_bias$bias2006)
> >yr_2007<-data.frame(bias=ann_bias$bias2007)
> >yr_2008<-data.frame(bias=ann_bias$bias2008)
> >yr_2009<-data.frame(bias=ann_bias$bias2009)
> >yr_2010<-data.frame(bias=ann_bias$bias2010)
> >yr_2011<-data.frame(bias=ann_bias$bias2011)
> >yr_2012<-data.frame(bias=ann_bias$bias2012)
> >yr_2013<-data.frame(bias=ann_bias$bias2013)
> >yr_2014<-data.frame(bias=ann_bias$bias2014)
> >yr_2015<-data.frame(bias=ann_bias$bias2015)
> >yr_2016<-data.frame(bias=ann_bias$bias2016)
> >
> >
> >yr_1997$year<-'1997'
> >yr_1998$year<-'1998'
> >yr_1999$year<-'1999'
> >yr_2000$year<-'2000'
> >yr_2001$year<-'2001'
> >yr_2002$year<-'2002'
> >yr_2003$year<-'2003'
> >yr_2004$year<-'2004'
> >yr_2005$year<-'2005'
> >yr_2006$year<-'2006'
> >yr_2007$year<-'2007'
> >yr_2008$year<-'2008'
> >yr_2009$year<-'2009'
> >yr_2010$year<-'2010'
> >yr_2011$year<-'2011'
> >yr_2012$year<-'2012'
> >yr_2013$year<-'2013'
> >yr_2014$year<-'2014'
> >yr_2015$year<-'2015'
> >yr_2016$year<-'2016'
> >
> >
> >bias<-rbind(yr_1997,yr_1998,yr_1999,yr_2000,yr_2001,yr_
> 2002,yr_2003,yr_2004,yr_2005,yr_2006,yr_2007,yr_2008,yr_
> 2009,yr_2010,yr_2011,yr_2012,yr_2013,yr_2014,yr_2015,yr_2016)
> >histogram(~ bias | year, data=bias)
> >
> >Cheers!
> >Tom
> >
> >
> >On Sun, Jul 9, 2017 at 11:21 AM, Thomas Adams  wrote:
> >
> >> Hi all,
> >>
> >> I can not seem to get what I want using the Lattice package to
> >generate an
> >> array of histograms of
> >> spatialgrid dataframe data.
> >>
> >> I can use the sp package and spplot to generate an array of maps that
> >> display an array of spatialgrid dataframe data -- that's good. I
> >have:
> >>
> >> spplot(ann_bias,xlim=c(1423987.5,2614612.5),ylim=c(-
> >>
> >5862637.5,-4624387.5),at=brks,col.regions=colp(length(
> brks)-1),main="NOAA/NWS
> >> OHRFC Stage-3/MPE Precipitation Estimate Bias with respect to
> >PRISM\n1997 -
> >> 2016")
> >>
> >> Which works... I can also do histogram(ann_bias$bias1997), which
> >works
> >> too. I have also created a 'time-series' of boxplots successfully
> >with
> >> these data as well...
> >>
> >> But if I try:
> >>
> >> year<-c('1997','1998','1999','2000','2001','2002','2003','
> >> 2004','2005','2006','2007','2008','2009','2010','2011','
> >> 2012','2013','2014','2015','2016')
> >> dat<-c(ann_bias$bias1997,ann_bias$bias1998,ann_bias$
> >> bias1999,ann_bias$bias2000,ann_bias$bias2001,ann_bias$
> >> bias2002,ann_bias$bias2003,ann_bias$bias2004,ann_bias$
> >> bias2005,ann_bias$bias2006,ann_bias$bias2007,ann_bias$
> >> bias2008,ann_bia

Re: [R] Help documentation of "The Studentized range Distribution"

2017-07-09 Thread Jeff Newmiller
We cannot help you understand what you are doing if you do not show us what you 
are doing.  Here are some discussions about how to communicate questions about 
R [1][2][3].

[1] 
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

[2] http://adv-r.had.co.nz/Reproducibility.html

[3] https://cran.r-project.org/web/packages/reprex/index.html
-- 
Sent from my phone. Please excuse my brevity.

On July 6, 2017 11:36:47 AM PDT, Ursula Garczarek  
wrote:
>Dear all,
>I wanted to compare Bonferroni vs TukeyHSD correction over a range of
>groups and group sizes, and wanted to use the function qtukey.
>
>In the help documentation it says
>
>qtukey(p, nmeans, df, nranges = 1, lower.tail = TRUE, log.p = FALSE)
>Arguments
>q
>
>vector of quantiles.
>
>p
>
>vector of probabilities.
>
>nmeans
>
>sample size for range (same for each group).
>
>df
>
>degrees of freedom for s (see below).
>
>nranges
>
>number of groups whose maximum range is considered.
>
>log.p
>
>logical; if TRUE, probabilities p are given as log(p).
>
>lower.tail
>
>logical; if TRUE (default), probabilities are P[X � x], otherwise, P[X
>> x].
>
>
>But when I test it, "nmeans" actually should be the number of groups,
>and not "nrange" to fit with tables of the studentized range
>distribution.
>
>Can that be - it should be a rather old procedure, so I wonder whether
>I get something completely wrong...
>
>Regards,
>Ursula
>
>
>
>
>
>
>
>
>
>
>
>
>
>This email and any attachments are confidential and may
>...{{dropped:8}}

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Histogram plots in Lattice with spatialgrid dataframe data

2017-07-09 Thread Jeff Newmiller
Glad you found an answer, though it looks more self-educational than efficient 
(see suggestions below). In the future, follow the recommendations of the 
Posting Guide: use plain text, and provide a reproducible example. Some 
elaborations on what "reproducible" means are [1][2][3]. One issue here was 
that you did not include sample data to work with (I have assumed below that 
ann_bias has no other columns than the bias columns, which is not the usual 
case).

There are a number of ways to achieve the reshaping of your ann_bias data frame 
that are less painful than your approach. For example, the base R "stack" 
function:

bias2 <- stack( ann_bias )
names( bias2 ) <- c( "bias", "year )
levels( bias2$year ) <- sub( "bias", "", levels( bias2$year ) )

Or... if you are willing to venture into the tidyverse...

library(dplyr)
library(tidyr)
bias3  <- (   ann_bias
 %>% gather( year, bias )
 %>% mutate( year = factor( sub( "bias", "", year ) ) )
 )

[1] 
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

[2] http://adv-r.had.co.nz/Reproducibility.html

[3] https://cran.r-project.org/web/packages/reprex/index.html

-- 
Sent from my phone. Please excuse my brevity.

On July 9, 2017 12:32:32 PM PDT, Thomas Adams  wrote:
>Hello all,
>
>After more digging I was able to find out how to do this. The answer
>came
>from an example here:
>
>https://stackoverflow.com/questions/3541713/how-to-plot-two-histograms-together-in-r
>
>
>yr_1997<-data.frame(bias=ann_bias$bias1997)
>yr_1998<-data.frame(bias=ann_bias$bias1998)
>yr_1999<-data.frame(bias=ann_bias$bias1999)
>yr_2000<-data.frame(bias=ann_bias$bias2000)
>yr_2001<-data.frame(bias=ann_bias$bias2001)
>yr_2002<-data.frame(bias=ann_bias$bias2002)
>yr_2003<-data.frame(bias=ann_bias$bias2003)
>yr_2004<-data.frame(bias=ann_bias$bias2004)
>yr_2005<-data.frame(bias=ann_bias$bias2005)
>yr_2006<-data.frame(bias=ann_bias$bias2006)
>yr_2007<-data.frame(bias=ann_bias$bias2007)
>yr_2008<-data.frame(bias=ann_bias$bias2008)
>yr_2009<-data.frame(bias=ann_bias$bias2009)
>yr_2010<-data.frame(bias=ann_bias$bias2010)
>yr_2011<-data.frame(bias=ann_bias$bias2011)
>yr_2012<-data.frame(bias=ann_bias$bias2012)
>yr_2013<-data.frame(bias=ann_bias$bias2013)
>yr_2014<-data.frame(bias=ann_bias$bias2014)
>yr_2015<-data.frame(bias=ann_bias$bias2015)
>yr_2016<-data.frame(bias=ann_bias$bias2016)
>
>
>yr_1997$year<-'1997'
>yr_1998$year<-'1998'
>yr_1999$year<-'1999'
>yr_2000$year<-'2000'
>yr_2001$year<-'2001'
>yr_2002$year<-'2002'
>yr_2003$year<-'2003'
>yr_2004$year<-'2004'
>yr_2005$year<-'2005'
>yr_2006$year<-'2006'
>yr_2007$year<-'2007'
>yr_2008$year<-'2008'
>yr_2009$year<-'2009'
>yr_2010$year<-'2010'
>yr_2011$year<-'2011'
>yr_2012$year<-'2012'
>yr_2013$year<-'2013'
>yr_2014$year<-'2014'
>yr_2015$year<-'2015'
>yr_2016$year<-'2016'
>
>
>bias<-rbind(yr_1997,yr_1998,yr_1999,yr_2000,yr_2001,yr_2002,yr_2003,yr_2004,yr_2005,yr_2006,yr_2007,yr_2008,yr_2009,yr_2010,yr_2011,yr_2012,yr_2013,yr_2014,yr_2015,yr_2016)
>histogram(~ bias | year, data=bias)
>
>Cheers!
>Tom
>
>
>On Sun, Jul 9, 2017 at 11:21 AM, Thomas Adams  wrote:
>
>> Hi all,
>>
>> I can not seem to get what I want using the Lattice package to
>generate an
>> array of histograms of
>> spatialgrid dataframe data.
>>
>> I can use the sp package and spplot to generate an array of maps that
>> display an array of spatialgrid dataframe data -- that's good. I
>have:
>>
>> spplot(ann_bias,xlim=c(1423987.5,2614612.5),ylim=c(-
>>
>5862637.5,-4624387.5),at=brks,col.regions=colp(length(brks)-1),main="NOAA/NWS
>> OHRFC Stage-3/MPE Precipitation Estimate Bias with respect to
>PRISM\n1997 -
>> 2016")
>>
>> Which works... I can also do histogram(ann_bias$bias1997), which
>works
>> too. I have also created a 'time-series' of boxplots successfully
>with
>> these data as well...
>>
>> But if I try:
>>
>> year<-c('1997','1998','1999','2000','2001','2002','2003','
>> 2004','2005','2006','2007','2008','2009','2010','2011','
>> 2012','2013','2014','2015','2016')
>> dat<-c(ann_bias$bias1997,ann_bias$bias1998,ann_bias$
>> bias1999,ann_bias$bias2000,ann_bias$bias2001,ann_bias$
>> bias2002,ann_bias$bias2003,ann_bias$bias2004,ann_bias$
>> bias2005,ann_bias$bias2006,ann_bias$bias2007,ann_bias$
>> bias2008,ann_bias$bias2009,ann_bias$bias2010,ann_bias$
>> bias2011,ann_bias$bias2012,ann_bias$bias2013,ann_bias$
>> bias2014,ann_bias$bias2015,ann_bias$bias2016)
>>
>> > data<-data.frame(year=c(year),bias=c(dat))
>> > histogram(~ bias | year, data=data)
>>
>> I get a lattice plot of histograms, where the years vary, but all the
>> histograms are identical, which I know they should not be. It seem
>that all
>> the data from the combined spatialgrid dataframes are being used and
>> repeated.
>>
>> Obviously, I'm not constructing the data correctly. Can someone tell
>me
>> what I doing wrong. I've poured over this for a solid day, now...
>>
>> Regards,
>> Tom
>>
>>
>
>   [[alternative HTML version deleted]]
>
>

Re: [R] Help with ftable.svyby

2017-07-09 Thread Orsola Costantini via R-help
Thanks, Anthony! It worked!!
Only, for future reference, I had to exclude INCOME from the reset (which
is the variable in the svymean function)
q50 <- update( q50 , AGECL = factor( AGECL ) , RACECL = factor( RACECL ) )



2017-07-09 15:52 GMT-04:00 Anthony Damico :

> try resetting your factor levels and re-run?
>
> q50 <- update( q50 , INCOME = factor( INCOME ) , AGECL = factor( AGECL ) ,
> RACECL = factor( RACECL ) )
>
>
>
>
> On Sun, Jul 9, 2017 at 2:59 PM, Orsola Costantini via R-help <
> r-help@r-project.org> wrote:
>
>> Hi all,
>>
>> When I try the following with pkg Survey it returns the error below:
>>
>> ftable(svyby(~INCOME, ~AGECL+RACECL, svymean, design=q50),
>> rownames=list(AGECL=c("<35", "35-44", "45-54", "55-64",
>> "65-74", ">=75"),
>>RACECL=c("white non hispanic", "non white or hispanic"))
>>
>> Error in rbind(matrix("", nrow = length(xcv), ncol = length(xrv)),
>> charQuote(makeNames(xrv)),  :
>>   number of columns of matrices must match (see arg 3)
>>
>> When I do the follwing instead all is good. But it only works for small
>> subsets!
>>
>> h<-svymean(~interaction(INCOME, AGECL, RACECL), q3)
>>
>> fh<-ftable(h, rownames=list(AGECL=c("<35", "35-44", "45-54", "55-64",
>> "65-74", ">=75"),
>>RACECL=c("white non his", "non white or hispanic")))
>>
>>
>> any idea why?
>>
>> Thanks!!!
>>
>> U.
>>
>> [[alternative HTML version deleted]]
>>
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posti
>> ng-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Help with ftable.svyby

2017-07-09 Thread Anthony Damico
try resetting your factor levels and re-run?

q50 <- update( q50 , INCOME = factor( INCOME ) , AGECL = factor( AGECL ) ,
RACECL = factor( RACECL ) )




On Sun, Jul 9, 2017 at 2:59 PM, Orsola Costantini via R-help <
r-help@r-project.org> wrote:

> Hi all,
>
> When I try the following with pkg Survey it returns the error below:
>
> ftable(svyby(~INCOME, ~AGECL+RACECL, svymean, design=q50),
> rownames=list(AGECL=c("<35", "35-44", "45-54", "55-64",
> "65-74", ">=75"),
>RACECL=c("white non hispanic", "non white or hispanic"))
>
> Error in rbind(matrix("", nrow = length(xcv), ncol = length(xrv)),
> charQuote(makeNames(xrv)),  :
>   number of columns of matrices must match (see arg 3)
>
> When I do the follwing instead all is good. But it only works for small
> subsets!
>
> h<-svymean(~interaction(INCOME, AGECL, RACECL), q3)
>
> fh<-ftable(h, rownames=list(AGECL=c("<35", "35-44", "45-54", "55-64",
> "65-74", ">=75"),
>RACECL=c("white non his", "non white or hispanic")))
>
>
> any idea why?
>
> Thanks!!!
>
> U.
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Help with ftable.svyby

2017-07-09 Thread Orsola Costantini via R-help
Hi all,

When I try the following with pkg Survey it returns the error below:

ftable(svyby(~INCOME, ~AGECL+RACECL, svymean, design=q50),
rownames=list(AGECL=c("<35", "35-44", "45-54", "55-64",
"65-74", ">=75"),
   RACECL=c("white non hispanic", "non white or hispanic"))

Error in rbind(matrix("", nrow = length(xcv), ncol = length(xrv)),
charQuote(makeNames(xrv)),  :
  number of columns of matrices must match (see arg 3)

When I do the follwing instead all is good. But it only works for small
subsets!

h<-svymean(~interaction(INCOME, AGECL, RACECL), q3)

fh<-ftable(h, rownames=list(AGECL=c("<35", "35-44", "45-54", "55-64",
"65-74", ">=75"),
   RACECL=c("white non his", "non white or hispanic")))


any idea why?

Thanks!!!

U.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] CRAN I-MR / Xbar-R / Xbar-S control chart package ?

2017-07-09 Thread Tim Smith
Interesting, thanks for that.  I came accross qcc but my quick scan of
the docs is that it only did xbars but maybe I need to re-read the
docs, I guess it does the individual plot versions (I-MR) too.

Tim

On 8 July 2017 at 20:53, Rui Barradas  wrote:
> Hello,
>
> I have no experience with I-MR charts but a google search found package qcc.
> Maybe it's what you're looking for.
>
> Hope this helps,
>
> Rui Barradas
>
>
> Em 08-07-2017 09:07, Tim Smith escreveu:
>>
>> Hi,
>>
>> I've had a quick look through the package list, and unless I've missed
>> something, I can't seem to find anything that will do I-MR / Xbar-R /
>> Xbar-S control charts ?
>>
>> Assuming there is something out there, can anyone point me in the
>> right direction ?
>>
>> Thanks !
>>
>> TIm
>>
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Error in WGCNA package

2017-07-09 Thread Ankush Sharma
Dear all ,

I would like to reconstruct coexpression networks from proteomic count data
having integer values. Some internal function doesn't like to work well
with integers.  How can this error be rectified?


> adjacency = adjacency(datExpr, power = softPower, type = "signed");
Error in cor(datExpr, use = "p") :
REAL() can only be applied to a 'numeric', not a 'integer'



Appreciate your help , Many thanks

Best Regards,
Ankush Sharma

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] [R-pkgs] R package hypred: Simulation of genomic data in applied genetics

2017-07-09 Thread Khabat Kheirabadi
Dear Frank,

I hope everything is well with you. ​
​First of all​
​, I​
​'d like thank you for your nice genomic simulation program (*hypred *package)
and also for taking your time to answer my question. Dear Frank, I'm a PhD
student of animal breeding science from Iran. Unfortunately although I try
more time for running your package in order to simulate of a historical and
reference population based on hypred manual (step by step) but linkage
disequilibrium (LD) value was true (near 0.20) only when the generations
was less than 50. In other words when I try for more generations this value
increased subsequently. If it is possible please help me and let me know
how should I change your program for getting near true value of LD when
generation increased to 1000?





*Best regards,*
Khabat
*-*
*PhD. Student of Animal Genetics & Breeding*
*Ramin University of Agriculture and Natural Resources, Ahwaz, Khuzestan,
Iran.*
Tel: 98-918-247-4501
Alternative email: k.kheirab...@outlook.com

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Histogram plots in Lattice with spatialgrid dataframe data

2017-07-09 Thread Thomas Adams
Hello all,

After more digging I was able to find out how to do this. The answer came
from an example here:

https://stackoverflow.com/questions/3541713/how-to-plot-two-histograms-together-in-r


yr_1997<-data.frame(bias=ann_bias$bias1997)
yr_1998<-data.frame(bias=ann_bias$bias1998)
yr_1999<-data.frame(bias=ann_bias$bias1999)
yr_2000<-data.frame(bias=ann_bias$bias2000)
yr_2001<-data.frame(bias=ann_bias$bias2001)
yr_2002<-data.frame(bias=ann_bias$bias2002)
yr_2003<-data.frame(bias=ann_bias$bias2003)
yr_2004<-data.frame(bias=ann_bias$bias2004)
yr_2005<-data.frame(bias=ann_bias$bias2005)
yr_2006<-data.frame(bias=ann_bias$bias2006)
yr_2007<-data.frame(bias=ann_bias$bias2007)
yr_2008<-data.frame(bias=ann_bias$bias2008)
yr_2009<-data.frame(bias=ann_bias$bias2009)
yr_2010<-data.frame(bias=ann_bias$bias2010)
yr_2011<-data.frame(bias=ann_bias$bias2011)
yr_2012<-data.frame(bias=ann_bias$bias2012)
yr_2013<-data.frame(bias=ann_bias$bias2013)
yr_2014<-data.frame(bias=ann_bias$bias2014)
yr_2015<-data.frame(bias=ann_bias$bias2015)
yr_2016<-data.frame(bias=ann_bias$bias2016)


yr_1997$year<-'1997'
yr_1998$year<-'1998'
yr_1999$year<-'1999'
yr_2000$year<-'2000'
yr_2001$year<-'2001'
yr_2002$year<-'2002'
yr_2003$year<-'2003'
yr_2004$year<-'2004'
yr_2005$year<-'2005'
yr_2006$year<-'2006'
yr_2007$year<-'2007'
yr_2008$year<-'2008'
yr_2009$year<-'2009'
yr_2010$year<-'2010'
yr_2011$year<-'2011'
yr_2012$year<-'2012'
yr_2013$year<-'2013'
yr_2014$year<-'2014'
yr_2015$year<-'2015'
yr_2016$year<-'2016'


bias<-rbind(yr_1997,yr_1998,yr_1999,yr_2000,yr_2001,yr_2002,yr_2003,yr_2004,yr_2005,yr_2006,yr_2007,yr_2008,yr_2009,yr_2010,yr_2011,yr_2012,yr_2013,yr_2014,yr_2015,yr_2016)
histogram(~ bias | year, data=bias)

Cheers!
Tom


On Sun, Jul 9, 2017 at 11:21 AM, Thomas Adams  wrote:

> Hi all,
>
> I can not seem to get what I want using the Lattice package to generate an
> array of histograms of
> spatialgrid dataframe data.
>
> I can use the sp package and spplot to generate an array of maps that
> display an array of spatialgrid dataframe data -- that's good. I have:
>
> spplot(ann_bias,xlim=c(1423987.5,2614612.5),ylim=c(-
> 5862637.5,-4624387.5),at=brks,col.regions=colp(length(brks)-1),main="NOAA/NWS
> OHRFC Stage-3/MPE Precipitation Estimate Bias with respect to PRISM\n1997 -
> 2016")
>
> Which works... I can also do histogram(ann_bias$bias1997), which works
> too. I have also created a 'time-series' of boxplots successfully with
> these data as well...
>
> But if I try:
>
> year<-c('1997','1998','1999','2000','2001','2002','2003','
> 2004','2005','2006','2007','2008','2009','2010','2011','
> 2012','2013','2014','2015','2016')
> dat<-c(ann_bias$bias1997,ann_bias$bias1998,ann_bias$
> bias1999,ann_bias$bias2000,ann_bias$bias2001,ann_bias$
> bias2002,ann_bias$bias2003,ann_bias$bias2004,ann_bias$
> bias2005,ann_bias$bias2006,ann_bias$bias2007,ann_bias$
> bias2008,ann_bias$bias2009,ann_bias$bias2010,ann_bias$
> bias2011,ann_bias$bias2012,ann_bias$bias2013,ann_bias$
> bias2014,ann_bias$bias2015,ann_bias$bias2016)
>
> > data<-data.frame(year=c(year),bias=c(dat))
> > histogram(~ bias | year, data=data)
>
> I get a lattice plot of histograms, where the years vary, but all the
> histograms are identical, which I know they should not be. It seem that all
> the data from the combined spatialgrid dataframes are being used and
> repeated.
>
> Obviously, I'm not constructing the data correctly. Can someone tell me
> what I doing wrong. I've poured over this for a solid day, now...
>
> Regards,
> Tom
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Error in WGCNA package

2017-07-09 Thread Peter Langfelder
First, please read WGCNA FAQ at
https://labs.genetics.ucla.edu/horvath/CoexpressionNetwork/Rpackages/WGCNA/faq.html
regarding using RNA-seq and other count data.

Second, if you insist on using WGCNA on raw count data (which I don't
recommend), use something like

storage.mode(datExpr) = "double"

and try again.

Peter

On Sun, Jul 9, 2017 at 2:29 AM, Ankush Sharma  wrote:
> Dear all ,
>
> I would like to reconstruct coexpression networks from proteomic count data
> having integer values. Some internal function doesn't like to work well with
> integers.  How can this error be rectified?
>
>
>> adjacency = adjacency(datExpr, power = softPower, type = "signed");
> Error in cor(datExpr, use = "p") :
> REAL() can only be applied to a 'numeric', not a 'integer'
>
>
>
> Appreciate your help , Many thanks
>
> Best Regards,
> Ankush Sharma

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Histogram plots in Lattice with spatialgrid dataframe data

2017-07-09 Thread Thomas Adams
Hi all,

I can not seem to get what I want using the Lattice package to generate an
array of histograms of
spatialgrid dataframe data.

I can use the sp package and spplot to generate an array of maps that
display an array of spatialgrid dataframe data -- that's good. I have:

spplot(ann_bias,xlim=c(1423987.5,2614612.5),ylim=c(-5862637.5,-4624387.5),at=brks,col.regions=colp(length(brks)-1),main="NOAA/NWS
OHRFC Stage-3/MPE Precipitation Estimate Bias with respect to PRISM\n1997 -
2016")

Which works... I can also do histogram(ann_bias$bias1997), which works too.
I have also created a 'time-series' of boxplots successfully with these
data as well...

But if I try:

year<-c('1997','1998','1999','2000','2001','2002','2003','2004','2005','2006','2007','2008','2009','2010','2011','2012','2013','2014','2015','2016')
dat<-c(ann_bias$bias1997,ann_bias$bias1998,ann_bias$bias1999,ann_bias$bias2000,ann_bias$bias2001,ann_bias$bias2002,ann_bias$bias2003,ann_bias$bias2004,ann_bias$bias2005,ann_bias$bias2006,ann_bias$bias2007,ann_bias$bias2008,ann_bias$bias2009,ann_bias$bias2010,ann_bias$bias2011,ann_bias$bias2012,ann_bias$bias2013,ann_bias$bias2014,ann_bias$bias2015,ann_bias$bias2016)

> data<-data.frame(year=c(year),bias=c(dat))
> histogram(~ bias | year, data=data)

I get a lattice plot of histograms, where the years vary, but all the
histograms are identical, which I know they should not be. It seem that all
the data from the combined spatialgrid dataframes are being used and
repeated.

Obviously, I'm not constructing the data correctly. Can someone tell me
what I doing wrong. I've poured over this for a solid day, now...

Regards,
Tom

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.