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

2019-01-27 Thread Jeff Newmiller
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 vec

Re: [R] Requested r code and references for doing network analysis with experimental data

2019-01-27 Thread PIKAL Petr
Hi Well, I tried google and this https://www.jessesadler.com/post/network-analysis-with-r/ seems to provide some insights. If it is not appropriate to your situation, you should be more specific. Cheers Petr BTW, what is factor in continuous scale? I am almost sure that factors are discrete

[R] Requested r code and references for doing network analysis with experimental data

2019-01-27 Thread Bhubaneswor Dhakal
Hi R support group I have an experimental data of a network analysis problem. One group is treated and another is controlled (untreated). The response of the treatment of three factors are measured in ordinal scale and the other two factors in continuous scale. I am looking for R code which accou

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

2019-01-27 Thread Hallie Kamesch
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/quest

[R] how to run a multinomial logistic regression with fixed effects

2019-01-27 Thread Valerio Leone Sciabolazza
Dear list users, I am looking for a R package implementing a multinomial logistic regression with fixed effects (Chamberlain 1980, Review of Economic Studies 47: 225–238). Over the years, a number of questions have been asked in the R help and in stack-related websites in order to find how to use

[R] Extract the coordinates of a Polylines

2019-01-27 Thread javad bayat
Dear R users; I am trying to extract the X and Y coordinates of a polylines along with Elevation data. I have extracted the Elevations as Z, but I do not know how to extract the X and Y of these Elevations. Is it possible to extract X and Y of the Elevation and create a data frame with three variab

Re: [R] positive deviance plot for Binomial distribution

2019-01-27 Thread Jeff Newmiller
I haven't found much call to mess with this, but I think the built-in "glm" function could do it. You might have to reformulate the inputs to outcome/observation (ratio) and outcome+observation (weight) to get glm to accept it [1]... but I am not sure. What I am somewhat more sure of is that y

Re: [R] cumulative data monthly

2019-01-27 Thread Jeff Newmiller
I have no idea what you mean when you say "select starting date and ending date properly form [sic] datai$DATA". For one thing there is no column called DATA, and for another I don't know what starting dates and ending dates you might be interested in. If you need help to subset by time, perhap

Re: [R] cumulative data monthly

2019-01-27 Thread Diego Avesani
Dear Jeff, Dear Rui, Dear all, I will try Rui's solution as soon as possible. If I could ask: As a first step, I would like to follow Jeff's suggestion. I will represent the precipitation data with a cumulative distribution, one for each year. This follow that I would like to select the starting

Re: [R] Purr and Basic Functional Programming Tasks

2019-01-27 Thread Lorenzo Isella
Dear Jim, Thanks a lot for your stellar replies! They address my questions perfectly. Cheers Lorenzo On Fri, Jan 25, 2019 at 07:46:50AM -0800, jim holtman wrote: Try this for the second question: years <- map2(zz, + list(c(2000, 2001), c(2001, 2003)), + ~ filter(

Re: [R] cumulative data monthly

2019-01-27 Thread Jeff Newmiller
Very succinct, Rui! One warning to Diego automatic data recorders tend to use the local standard timezone year-round. R by default assumes that timestamps converted from character to POSIXct using the current timezone on your computer... which may not be in the same zone that the logger was

Re: [R] cumulative data monthly

2019-01-27 Thread Rui Barradas
Hello, See if the following can get you started. It uses package CRAN zoo, function as.yearmon. dati$MES <- zoo::as.yearmon(dati$DATAORA) PMES <- ave(dati$PREC, dati$MES, FUN = cumsum) plot(dati$DATAORA, PMES) Hope this helps, Rui Barradas Às 15:25 de 27/01/2019, Diego Avesani escreveu: De

Re: [R] cumulative data monthly

2019-01-27 Thread Jeff Newmiller
Are you looking for a plot where each point represents a month? Or a plot where each point represents the accumulated precipitation so far that month? The latter seems closer to your computations so far, but doesn't seem like a typical way to present precipitation data... On January 27, 2019 7

[R] cumulative data monthly

2019-01-27 Thread Diego Avesani
Dear all, I have a set of data with has hourly value: # ID # Lo # L # Q Time,T, RH,PSFC,DIR,VEL10, PREC, RAD, CC,FOG -mm-dd hh:mm, °C, %, hPa, °N, m/s, mm/h,W/m², %,- 2012-01-01 06:00, -0.1,100, 815,313, 2.6, 0.0, 0, 0,0 2012-01-01 07:00, -1.2, 93, 814,314, 4.8, 0.0, 0, 0,0