Re: [R] EOF within quoted string

2017-08-11 Thread Mohan.Radhakrishnan
Yes. I tried that already. Not straightforward. data <- read.csv("20_newsgroups.csv",fill=TRUE,as.is=T,header=F, quote="", sep=",", encoding="UTF-8") This line does read it haphazardly. The emails in the column are split into multiple columns and there are several columns with just ‘NA’.

[R] EOF within quoted string

2017-08-10 Thread Mohan.Radhakrishnan
Hi, Reading http://ssc.wisc.edu/~ahanna/20_newsgroups.csv after downloading it using data <- read.csv("20_newsgroups.csv",header=TRUE) throws this. Warning message: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : EOF within quoted string So, for example, the first

[R] Extract XMLAtrributeValue

2017-07-10 Thread Mohan.Radhakrishnan
Hi, I am trying to extract an attribute value which is like this. (e.g) class="whQuestion" The 'extract' function prints this. But I am not sure how to get "whQuestion" from that. The type of 'x' in extract is "character" [1] "XMLAttributeValue" class "whQuestion" attr(,"class")

Re: [R] Operating on RC in a list

2017-06-08 Thread Mohan.Radhakrishnan
I am replying to my question. AFAIK dplyr works only with data frames. So I flattened the RC's like this. A pure OO approach and a functional representation of it are at loggerheads. I think. filteredmeasurements <-

[R] Operating on RC in a list

2017-06-07 Thread Mohan.Radhakrishnan
Hi, I have a hierarchy of such classes. Subject has a list of measurements. Let assume I have a list of such 'Subject' RC's. Can I use dplyr to navigate from Subject to the list of measurement RC's and filter and group data ? dplyr should be able to call the methods on these RC's to operate on

[R] RC class composition

2017-05-22 Thread Mohan.Radhakrishnan
Hi, The last line should give me the value of 'amount'. Is the syntax wrong ? Measurement <- setRefClass("Measurement", fields = list(subject = Subject, quantity = Quantity)) s <- Subject$new(id = 100) u <- CompoundUnit$new( micrograms = 100,

[R] Task estimation - Monte Carlo

2015-07-06 Thread Mohan.Radhakrishnan
Hi I am trying to simulate task estimation person days using this type of R code. But I am not sure about reasoning here. Should the distribution be beta or triangular or something else ? How do we get the values of mu,z and s here ? Are there any explanations available ? Sections of some

[R] Simple monte carlo

2015-06-22 Thread Mohan.Radhakrishnan
Hi, I am a developer and I code 'R'. We have some project tasks and durations(Expected, 50% - Average Case and 90% - Worst Case ) and I am trying to understand how a simulation of this using monte carlo would help. Most of the websites deal with either the math or some commercial

Re: [R] Error bars and CI

2015-06-18 Thread Mohan.Radhakrishnan
Hi Dennis, I have copied the 'r' group. Could you explain ? Why can't we compute CI and error bars using this data set ? The graph generated has equal-sized error bars and a 99% confidence band. Groups are not needed here. But the error bar and CI calculations could be

Re: [R] Error bars and CI

2015-06-17 Thread Mohan.Radhakrishnan
Your sample code is working. But I am missing the logic when my dataset is involved. My full dataset is this. It is the V1 column I am interested in. I am not 'grouping' here. V1 IDX 1 0.796 1 2 0.542 2 3 0.510 3 4 0.617 4 5 0.482 5 6 0.387 6 7 0.272 7 8 0.536 8

Re: [R] Error bars and CI

2015-06-17 Thread Mohan.Radhakrishnan
I think it could be something like this. But the mean is for the entire set. Not groups. I get a graph with this code but error bars are not there. p-ggplot(jc,aes(IDX,V1,colour=V1)) p - p + stat_summary(fun.y=mean,geom=point) p - p + stat_summary(fun.y=mean,geom=line) p - p +

[R] Error bars and CI

2015-06-15 Thread Mohan.Radhakrishnan
Hi, I want to plot a line graph using this data. IDX is x-axis and V1 is y-axis. I also want standard error bars and 99% CI to be shown. My code is given below. The section that plots the graph is the problem. I don't see all the points in the line graph with error bars. How can I also show