[R] troubleshooting data structure to run krippendorff's alpha

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Mon Jan 28 08:25:23 CET 2019


I don't understand most of what you wrote, but when you say "matrix" you are mistaken. A matrix is NOT the same thing as a data frame, which is what you get when you call read.csv(). Read 

RShowDoc("R-intro")

Sections 5 and 6... A data frame is a list of column vectors, while a matrix is a vector with a dimension attribute.

You can use the as.matrix function to convert a data frame to a matrix.

On January 27, 2019 9:08:02 AM PST, Hallie Kamesch <hallie.kamesch using gmail.com> wrote:
>Hi -
>I'm trying to run Krippendorff's alpha for data consisting of 4
>subjects
>rated on 6 events each by three raters.  The ratings are interval ratio
>scale data.
>
>I've rearranged my data into a 3 x 24  of ratersXevents. (per this
>discussion on CrossValidated: (
>https://stats.stackexchange.com/questions/255164/inter-rater-reliability-for-binomial-repeated-ratings-from-two-or-more-raters/256144#256144)
>).
>
>This is the code I've used:
>library(irr)
>dat <- read.csv(file.choose(), header = TRUE)
>head(dat)
>kripp.alpha(dat, method=c("ratio"))
>#### error message: Error in sort.list(y) : 'x' must be atomic for
>'sort.list'
>Have you called 'sort' on a list?
>kripp.alpha(dat,"ratio")
>#### error message: Error in sort.list(y) : 'x' must be atomic for
>'sort.list'
>Have you called 'sort' on a list?
>
>I read rhelp on sort, but I'm still confused.  Please help!
>Thank you!
>
>PS
>I arranged my data in that matrix based upon this comment and response
>from
>the CrossValidated posting forum (
>https://stats.stackexchange.com/questions/255164/inter-rater-reliability-for-binomial-repeated-ratings-from-two-or-more-raters/256144#256144),
>but my question above was rejected there.
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help using 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.

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



More information about the R-help mailing list