Re: [R] Error in Rose Method (class balancing)

2020-07-24 Thread David Winsemius
On 7/24/20 3:08 AM, Neha gupta wrote: > O, I am very sorry for that, I have now included > > output of dput is: structure(list(unique_id = c("L116", "L117", > "L496", "L9719", > "L9720", "L9721", "L9722", "L9723", "L10200", "L10201", "L10202", > "L10203", "L10204", "L10205", "L10206", "L1070

Re: [R] Fortune nomination .... Re: Looping through a dataframe

2020-07-24 Thread Chris Evans
I really don't want to put too many Emails to the list but I had the same reaction to that lovely line ... so now my question is: Is there a way to make fortune nominations other than through the list. I see the package has a long list of illustrious authors but I can't find a side channel or

[R] prevent XML::readHTMLTable from suppressing

2020-07-24 Thread Spencer Graves
Hello, All:   Thanks to Rasmus Liland, William Michels, and Luke Tierney with my earlier web scraping question.  With their help, I've made progress.  Sadly, I still have a problem:  One field has "", which gets suppressed by XML::readHTMLTable: sosURL <- "https://s1.sos.mo.gov/Candid

Re: [R] Fortune nomination .... Re: Looping through a dataframe

2020-07-24 Thread John Kane
Yes I think so. On Fri, 24 Jul 2020 at 20:53, David Winsemius wrote: > > On 7/21/20 2:31 PM, Jim Lemon wrote: > > I want to get a total for the number of years of data for each > company. When I loop through the data > > After two one liners using `table`: > > I'm too lazy to provide a di

[R] Fortune nomination .... Re: Looping through a dataframe

2020-07-24 Thread David Winsemius
On 7/21/20 2:31 PM, Jim Lemon wrote: I want to get a total for the number of years of data for each company. When I loop through the data After two one liners using `table`: I'm too lazy to provide a difficult way. Jim __ R-help@r-proje

Re: [R] Arranging ggplot2 objects with ggplotGrob()

2020-07-24 Thread Rui Barradas
Hello, I've just tried it. library(ggplot2) #library(grid) library(cowplot) s <- ggplot(data = subset(iris, Species == 'virginica'), aes(Sepal.Length, Sepal.Width)) + geom_point() v <- ggplot(data = subset(iris, Species == 'setosa'), aes(Sepal.Length, Sepal.Width)) + geom_point() #g2 <- ggp

Re: [R] curl options?

2020-07-24 Thread Roy Mendelssohn - NOAA Federal via R-help
Found it. On June 9, in the R-developers mail-list, a chain under the topic "SSL certificate issues". -Roy > On Jul 24, 2020, at 1:21 PM, Roy Mendelssohn - NOAA Federal > wrote: > > Thank you very much. That indeed did work, more specifically as (to include > solution for the record):

Re: [R] curl options?

2020-07-24 Thread Roy Mendelssohn - NOAA Federal via R-help
Thank you very much. That indeed did work, more specifically as (to include solution for the record): > sshInfo <- rerddap::info('hawaii_soest_f75b_adc6_12ab', url = > 'https://apdrc.soest.hawaii.edu/erddap/', ssl_verifyhost=0, ssl_verifypeer=0) BTW - my clock and date are fine, the reason it

Re: [R] Arranging ggplot2 objects with ggplotGrob()

2020-07-24 Thread Bert Gunter
?grid.frame, etc. should be straightforward for this I would think. But of course you have to resort to the underlying grid framework rather than the ggplot2 interface. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Be

Re: [R] A Question about MLE in R

2020-07-24 Thread Andrew Robinson
Hi Ravi, that's an interesting claim and N-M. Can you provide any reading matter to support it? Cheers, Andrew -- Andrew Robinson Director, CEBRA and Professor of Biosecurity, School/s of BioSciences and Mathematics & Statistics University of Melbourne, VIC 3010 Australia Tel: (+61) 0403 138

Re: [R] A Question about MLE in R

2020-07-24 Thread Andrew Robinson
Hi John, I wonder if you can suggest some reading material on that topic? A cursory search of the net doesn't uncover anything obvious. Andrew -- Andrew Robinson Director, CEBRA and Professor of Biosecurity, School/s of BioSciences and Mathematics & Statistics University of Melbourne, VIC 3010

Re: [R] Arranging ggplot2 objects with ggplotGrob()

2020-07-24 Thread H
On 07/24/2020 02:50 PM, H wrote: > On 07/24/2020 02:03 PM, Jeff Newmiller wrote: >> The set of people interested in helping when you supply a minimal >> reproducible example is rather larger than the set of people willing to read >> the documentation for you (hint) and guess what aspect of alignm

Re: [R] Arranging ggplot2 objects with ggplotGrob()

2020-07-24 Thread Felipe Carrillo via R-help
What about cowplot? https://cran.r-project.org/web/packages/cowplot/vignettes/introduction.html On Friday, July 24, 2020, 11:51:17 AM PDT, H wrote: On 07/24/2020 02:03 PM, Jeff Newmiller wrote: > The set of people interested in helping when you supply a minimal > reproducible example i

Re: [R] Arranging ggplot2 objects with ggplotGrob()

2020-07-24 Thread H
On 07/24/2020 02:03 PM, Jeff Newmiller wrote: > The set of people interested in helping when you supply a minimal > reproducible example is rather larger than the set of people willing to read > the documentation for you (hint) and guess what aspect of alignment you are > having trouble with. >

Re: [R] Arranging ggplot2 objects with ggplotGrob()

2020-07-24 Thread Jeff Newmiller
The set of people interested in helping when you supply a minimal reproducible example is rather larger than the set of people willing to read the documentation for you (hint) and guess what aspect of alignment you are having trouble with. On July 24, 2020 10:46:57 AM PDT, H wrote: >On 07/24/2

Re: [R] Arranging ggplot2 objects with ggplotGrob()

2020-07-24 Thread H
On 07/24/2020 01:14 PM, John Kane wrote: > Well, I am not looking for help debugging my code but for information to > better understand arranging plots vertically. The code above aligns them > horizontally as expected. > > Sigh, we know the code works but we do not know what the plots are   and w

Re: [R] Arranging ggplot2 objects with ggplotGrob()

2020-07-24 Thread John Kane
Well, I am not looking for help debugging my code but for information to better understand arranging plots vertically. The code above aligns them horizontally as expected. Sigh, we know the code works but we do not know what the plots are and we cannot play around with them to see if we can help

Re: [R] Arranging ggplot2 objects with ggplotGrob()

2020-07-24 Thread H
On 07/24/2020 05:29 AM, Erich Subscriptions wrote: > Hav a look at the packages cowplot and patchwork > >> On 24.07.2020, at 02:36, H wrote: >> >> I am trying to arrange two plots vertically, ie plot 2 below plot 1, where I >> want the plots to align columnwise but have a height ratio of eg 3:1.

Re: [R] Arranging ggplot2 objects with ggplotGrob()

2020-07-24 Thread H
On 07/24/2020 10:16 AM, John Kane wrote: > We reallly need to see more code (a minimum working example and some data. > > For some suggestions on how to do this see > >  http://adv-r.had.co.nz/Reproducibility.html > > http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-exa

Re: [R] [External] Re: help with web scraping

2020-07-24 Thread Spencer Graves
Dear Rasmus: On 2020-07-24 09:16, Rasmus Liland wrote: > On 2020-07-24 08:20 -0500, luke-tier...@uiowa.edu wrote: >> On Fri, 24 Jul 2020, Spencer Graves wrote: >>> On 2020-07-23 17:46, William Michels wrote: On Thu, Jul 23, 2020 at 2:55 PM Spencer Graves wrote: > Hello, All: >

Re: [R] Windows, R version 4.0.2, read.csv() - -Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file 'hw1_data': No such file or

2020-07-24 Thread Jeff Newmiller
Per the Posting Guide, homework help is off-topic on this mailing list, since educational institutions are supposed to have support tailored to your educational pragram. Regardless of policy, it is very difficult to address very basic questions such as yours via written communication only... fo

Re: [R] mice package won't install

2020-07-24 Thread J C Nash
Apologies in advance if this is a red herring, but I've had a number of issues with installing latest (4.0.2) version of R and related packages. Maybe my experience will be helpful to you. Note that you don't give your OS etc., which also my mean my suggestions are moot. I run Linux, mostly Mint.

Re: [R] Arranging ggplot2 objects with ggplotGrob()

2020-07-24 Thread John Kane
We reallly need to see more code (a minimum working example and some data. For some suggestions on how to do this see http://adv-r.had.co.nz/Reproducibility.html http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example On Fri, 24 Jul 2020 at 01:16, H wrote: > I a

Re: [R] [External] Re: help with web scraping

2020-07-24 Thread Rasmus Liland
On 2020-07-24 08:20 -0500, luke-tier...@uiowa.edu wrote: > On Fri, 24 Jul 2020, Spencer Graves wrote: > > On 2020-07-23 17:46, William Michels wrote: > > > On Thu, Jul 23, 2020 at 2:55 PM Spencer Graves > > > wrote: > > > > Hello, All: > > > > > > > > I've failed with multiple > > > > attempts t

Re: [R] [External] Re: help with web scraping

2020-07-24 Thread Spencer Graves
On 2020-07-24 08:20, luke-tier...@uiowa.edu wrote: Maybe try something like this: url <- "https://s1.sos.mo.gov/CandidatesOnWeb/DisplayCandidatesPlacement.aspx?ElectionCode=750004975"; h <- xml2::read_html(url) Error in open.connection(x, "rb") : HTTP error 404.   Thanks for the su

Re: [R] How to create a readable plot in R with 10000+ values in a dataframe

2020-07-24 Thread Ritwik Mohapatra
Hi All, These are the two codes i have used so far:- ggplot(df3_machine_region,aes(Region,Machine.Name)) + geom_count() !![2nd Plot|690x375](upload://gTyYUXe6lPJXCdyvqRBtUZ8zsyL.png) [1st Plot|690x375](upload://bb0ux9WheqM4ViyYf3Gki6TKtlG.png) ggplot(df3_machine_region,aes(Region,Machine.Name))

Re: [R] [External] Re: help with web scraping

2020-07-24 Thread luke-tierney
Maybe try something like this: url <- "https://s1.sos.mo.gov/CandidatesOnWeb/DisplayCandidatesPlacement.aspx?ElectionCode=750004975"; h <- xml2::read_html(url) tbl <- rvest::html_table(h) Best, luke On Fri, 24 Jul 2020, Spencer Graves wrote: Hi Bill et al.:   That broke the dam:  It g

Re: [R] help with web scraping

2020-07-24 Thread Spencer Graves
Hi Bill et al.:   That broke the dam:  It gave me a character vector of length 1 consisting of 218 KB.  I fed that to XML::readHTMLTable and purrr::map_chr, both of which returned lists of 337 data.frames. The former retained names for all the tables, absent from the latter.  The columns

Re: [R] Windows, R version 4.0.2, read.csv() - -Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file 'hw1_data': No such file or

2020-07-24 Thread Eric Berger
What happens when you give the command list.files(".","hw1_data") ? On Fri, Jul 24, 2020 at 3:53 PM Mounica Miriyala < mounicamiriyala0...@gmail.com> wrote: > HI, > I am currently taking my week 1 quiz 1. The quiz has 1 to 20 questions in > which 11 to 20 should be dealt with dataset given by th

[R] Windows, R version 4.0.2, read.csv() - -Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file 'hw1_data': No such file or dire

2020-07-24 Thread Mounica Miriyala
HI, I am currently taking my week 1 quiz 1. The quiz has 1 to 20 questions in which 11 to 20 should be dealt with dataset given by the coursera. But I am not able to open due to the mentioned error above. When I give dir() it shows the exact file that has the dataset to be used in the quiz1 but wh

Re: [R] A Question about MLE in R

2020-07-24 Thread Ravi Varadhan
I agree with John that SANN should be removed from optim. More importantly, the default choice of optimizer in optim should be changed from "Nelder-Mead" to "BFGS." Nelder-Mead is a bad choice for the most commonly encountered optimization problems in statistics. I really do not see a good

Re: [R] How to create a readable plot in R with 10000+ values in a dataframe

2020-07-24 Thread Martin Maechler
> Ritwik Mohapatra > on Thu, 23 Jul 2020 23:41:57 +0530 writes: > How to create a readable and legible plot in R with 10k+ values.I have a > dataframe with 17298 records.There are two columns:Machine Name(Character) > and Region(Character).So i want to create a readable pl

Re: [R] How to create a readable plot in R with 10000+ values in a dataframe

2020-07-24 Thread Duncan Murdoch
On 23/07/2020 2:11 p.m., Ritwik Mohapatra wrote: How to create a readable and legible plot in R with 10k+ values.I have a dataframe with 17298 records.There are two columns:Machine Name(Character) and Region(Character).So i want to create a readable plot with region in x axis and machine name in

[R] How to create a readable plot in R with 10000+ values in a dataframe

2020-07-24 Thread Ritwik Mohapatra
How to create a readable and legible plot in R with 10k+ values.I have a dataframe with 17298 records.There are two columns:Machine Name(Character) and Region(Character).So i want to create a readable plot with region in x axis and machine name in y axis.How do i do that using ggplot or any other w

Re: [R] Error in Rose Method (class balancing)

2020-07-24 Thread Neha gupta
O, I am very sorry for that, I have now included output of dput is: structure(list(unique_id = c("L116", "L117", "L496", "L9719", "L9720", "L9721", "L9722", "L9723", "L10200", "L10201", "L10202", "L10203", "L10204", "L10205", "L10206", "L10705", "L10706", "L10707", "L10708", "L10709", "L10710"