Re: [R] Finding unique terms

2018-10-15 Thread Bert Gunter
Here is a base R solution: "dat" is the data frame as in Robert's solution. > aggregate(dat[,3:6], by= dat[1], FUN = sum, na.rm = TRUE) STUDENT_ID PO1M PO1T PO2M PO2T 1AA15285 287.80 350 37 50 2AA15286 240.45 330 41 50 Cheers, Bert Bert Gunter "The trouble with having

[R] Unlisting a nested dataset

2018-10-15 Thread Nathan Parsons
I’m attempting to do some content analysis on a few million tweets, but I can’t seem to get them cleaned correctly. I’m trying to replicate the process outlined here:  https://stackoverflow.com/questions/46734501/opposite-of-unnest-tokens My code: tweets %>%  unnest_tokens(word, text, token =

Re: [R] Finding unique terms

2018-10-15 Thread Robert Baer
On 10/11/2018 5:12 PM, roslinazairimah zakaria wrote: Dear r-users, I have this data: structure(list(STUDENT_ID = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L), .Label = c("AA15285", "AA15286"), class = "factor"), COURSE_CODE = structure(c(1L, 2L, 5L, 6L, 7L, 8L, 2L, 3L,

Re: [R] Finding unique terms

2018-10-15 Thread Robert Baer
Dear r-users, I have this data: structure(list(STUDENT_ID = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L), .Label = c("AA15285", "AA15286"), class = "factor"), COURSE_CODE = structure(c(1L, 2L, 5L, 6L, 7L, 8L, 2L, 3L, 4L, 5L, 6L), .Label = c("BAA1113", "BAA1322",

Re: [R] RTools and previous Cygwin installation--conflict?

2018-10-15 Thread Brent via R-help
I sent a query on this subject over 4 years ago. https://www.mail-archive.com/r-help@r-project.org/msg212269.html I used to use Duncan Murdoch's suggestion to install only cygwin 32 bit and then put RTools first in my Windows path, so that its versions of cygwin commands would get pick up

Re: [R] limit bar graph output

2018-10-15 Thread Jeff Reichman
Bert Jeff I just resorted and took the top 30 and then reordered again in the geom_bar function – below ggplot(data=st.cnt)+ geom_bar(aes(x=reorder(CourseName, -n), y=n),fill = "dark blue", stat="identity")+ theme(axis.text.x = element_text(angle = 60, hjust = 1)) Jeff

[R] new edition of An R Companion to Applied Regression

2018-10-15 Thread Fox, John
Dear r-help list members, Sandy Weisberg and I would like to announce a new (third) edition of our book An R Companion to Applied Regression, which has recently been published by Sage Publications. The book provides a broad introduction to R in the general context of applied regression