Re: [R] anyone having trouble accesing CRAN?
Yes, the sysadmins at WU Vienna are upgrading the CRAN master. The mirrors should not be affected. Best, Uwe Ligges On 15.11.2023 20:25, Rui Barradas wrote: Às 19:13 de 15/11/2023, Christopher W. Ryan via R-help escreveu: at https://cran.r-project.org/ I get this error message: = Secure Connection Failed An error occurred during a connection to cran.r-project.org. PR_END_OF_FILE_ERROR Error code: PR_END_OF_FILE_ERROR The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. === Three different browsers, two different devices, two different networks. (The text of the error messages varies.) Anyone seeing similar? Thanks. --Chris Ryan __ R-help@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. Hello, Yes, CRAN is down. I know last week there was an anouncement about a maintenance scheduled but I cannot place that e-mail right now and don't remember the date exactly so I cannot say for sure this is what is happening. But it is probably a scheduled maintenance. Rui Barradas __ R-help@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.
Re: [R] Cannot calculate confidence intervals NULL
I believe the problem is here: cor1 <- cor(x1, y1, method="spearman") cor2 <- cor(x2, y2, method="spearman") The x's and y's are not looked for in data (i.e. NSE) but in the environment where the function was defined, which is standard evaluation. Change the above to: cor1 <- with(d, cor(x1, y1, method="spearman")) cor2 <- with(d, cor(x2, y2, method="spearman")) and all should be fine. -- Bert On Wed, Nov 15, 2023 at 12:54 PM varin sacha via R-help < r-help@r-project.org> wrote: > R-Experts, > > Here below my R code working without error message but I don't get the > results I am expecting. > Here is the result I get: > > [1] "All values of t are equal to 0.28611928397257 \n Cannot calculate > confidence intervals" > NULL > > If someone knows how to solve my problem, really appreciate. > Best, > S > > > # > # Difference in Spearman rho > > library(boot) > > > x1=c(4,6,5,7,8,4,2,3,5.5,6.7,5.5,3.5,2,1,3,5,6,3.5,2.5,2,1,2,3,2,1,2,3,4,3,4) > > > y1=c(10,14,12.5,21,15,16,17.5,11,11.5,21,19,16,17.5,18,18.5,12,13,14,11,11,12,18,20,13,23,12,11,14,16,11) > > x2=c(5,3,4,2,1,1,1,2,3,4,5,4,3,2,1,3,4.5,4.5,5.5,6,5,4,7,8,3,4,2,5,4,3) > > > y2=c(11,12,13,11,10,19,21,21,13,15,18,13,12,14,19,18.5,17.5,12.5,10,9,11,13,14,16,11,18,14,13,12,12) > > # Function to calculate the difference in Spearman coefficients > pearson_diff <- function(data, indices) { > > # Sample the data > d <- data[indices, ] > > # Calculate the Spearman correlation coefficients for every sample > cor1 <- cor(x1, y1, method="spearman") > cor2 <- cor(x2, y2, method="spearman") > > # Return the difference > return(cor1 - cor2) > } > > # Create a data.frame with the data > data <- data.frame(x1, y1, x2, y2) > > # Use the boot function to apply the bootstrap > set.seed(123) # For reproducibility > bootstrap_results <- boot(data = data, statistic = pearson_diff, R = 1000) > > # Calculate all the 95% confidence interval > boot.ci(bootstrap_results, type = "all") > ### > > > __ > R-help@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. > [[alternative HTML version deleted]] __ R-help@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.
Re: [R] Cannot calculate confidence intervals NULL
On Wed, 15 Nov 2023 20:53:54 + (UTC) varin sacha via R-help wrote: > # Sample the data > d <- data[indices, ] > > # Calculate the Spearman correlation coefficients for every sample > cor1 <- cor(x1, y1, method="spearman") > cor2 <- cor(x2, y2, method="spearman") You're sampling the data into the `d` variable, but then you use the original `x1`, `y1`, `x2`, `y2` variables unchanged. You need to access the columns in `d` instead. -- Best regards, Ivan __ R-help@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.
[R] Cannot calculate confidence intervals NULL
R-Experts, Here below my R code working without error message but I don't get the results I am expecting. Here is the result I get: [1] "All values of t are equal to 0.28611928397257 \n Cannot calculate confidence intervals" NULL If someone knows how to solve my problem, really appreciate. Best, S # # Difference in Spearman rho library(boot) x1=c(4,6,5,7,8,4,2,3,5.5,6.7,5.5,3.5,2,1,3,5,6,3.5,2.5,2,1,2,3,2,1,2,3,4,3,4) y1=c(10,14,12.5,21,15,16,17.5,11,11.5,21,19,16,17.5,18,18.5,12,13,14,11,11,12,18,20,13,23,12,11,14,16,11) x2=c(5,3,4,2,1,1,1,2,3,4,5,4,3,2,1,3,4.5,4.5,5.5,6,5,4,7,8,3,4,2,5,4,3) y2=c(11,12,13,11,10,19,21,21,13,15,18,13,12,14,19,18.5,17.5,12.5,10,9,11,13,14,16,11,18,14,13,12,12) # Function to calculate the difference in Spearman coefficients pearson_diff <- function(data, indices) { # Sample the data d <- data[indices, ] # Calculate the Spearman correlation coefficients for every sample cor1 <- cor(x1, y1, method="spearman") cor2 <- cor(x2, y2, method="spearman") # Return the difference return(cor1 - cor2) } # Create a data.frame with the data data <- data.frame(x1, y1, x2, y2) # Use the boot function to apply the bootstrap set.seed(123) # For reproducibility bootstrap_results <- boot(data = data, statistic = pearson_diff, R = 1000) # Calculate all the 95% confidence interval boot.ci(bootstrap_results, type = "all") ### __ R-help@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.
Re: [ESS] ess, noweb and polymode
Hi Laurent, I haven't used `ess-goto-chunk` before, but it sounds quite useful. I think you could get something similar with the `swiper` package. You can install `swiper` via `package-list-packages. It requires the `ivy` package, which should get installed automatically when you install `swiper`. Then you can define your own custom 'swipe'. For Rmd chunks, something like this: ``` (defun my-list-chunks () (interactive) (swiper "```{")) (define-key polymode-map "g" #'my-list-chunks) ``` By default, `polymode-map` is bound to `M-n`, so this will call `my-list-chunks` when you hit `M-n g`. This displays all the matches in the minibuffer, and you can scroll through them with `C-n` and `C-p`, and hitting `enter` will take you to that chunk header. In my tests, there's something wrong with the text colours, but I don't have time to debug just now. Best, Tyler -- plantarum.ca On Wed, Nov 15, 2023, at 2:42 PM, LaurentEss via ESS-help wrote: > Dear ESS-list, > > Installing emacs to do literate programming, I have just > discovered that noweb-mode doesn't exist anymore. It has been replaced > by polymode if I well understood. So, I install from MELPA : ess, > polymode, poly-R, poly-markdown, poly-noweb and I placed in my .emacs.el > the following lines: > > --- > > (require 'poly-R) > (require 'poly-markdown) > (require 'poly-noweb) > > > (add-to-list 'auto-mode-alist '("\\.[rR]nw" . poly-noweb+r-mode)) > (add-to-list 'auto-mode-alist '("\\.[rR]md" . poly-markdown+r-mode)) > (add-to-list 'auto-mode-alist '("\\.md$" . poly-markdown-mode)) > > ;; Load ESS > (load "ess-autoloads") > - > > It seems to work but I don't find anymore some usefull ess-noweb > shortcuts. For example, I liked M-n g (binded to ess-noweb-goto-chunk) > which showed me all the chunks names in a ring buffer at the bottom of > the frame (very convenient to move in large file). Also, with the old > ess versions it was possible to put all the line of the begining of > every chunk (<< >>=) in yellow (for example) and all the line of the end > of the chunk (@) in blue thanks to the ess-noweb-font-lock-mode.el file > which was very convenient. > > Here are my questions: > > 1. Could you tell me if I didn't forget to install some emacs packages > to use polymode with noweb mode ? > > 2. If the two features described above really disappeared with yhe new > new version of ess with polymode, could you please give me some pointers > to try to get these two features in emacs ? > > Thank you for your advice > > Best regards > > Laurent > > __ > ESS-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [R] anyone having trouble accesing CRAN?
Ah, thanks all. Guess I missed the message before they started the maintenance. --Chris Ivan Krylov wrote: > On Wed, 15 Nov 2023 14:13:00 -0500 > "Christopher W. Ryan via R-help" wrote: > >> Anyone seeing similar? > > Same for me. > > While it worked, CRAN website had the following message: > >>> The CRAN Admin Team will perform system upgrades during the period >>> Wednesday November 15 until Thursday November 16, 2023. There will >>> be intermittent outages in service during this time. > > Use chooseCRANmirror(local.only = TRUE) (or subset() the return value > of getCRANmirrors(local.only = TRUE)) to access a mirror that works. > __ R-help@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.
Re: [ESS] How can one tell rlang not to mess up R session in ESS ?
For completeness, and without any time yet to dig into Lionel's nord modification, and as a friend who saw thread asked: what I ended up doing was following the hint about cli and NO_COLOR and now (conditionally) set ## No color from cli inside emacs ## https://cli.r-lib.org/reference/faq.html#how-do-i-turn-off-ansi-colors-and-styles- if (Sys.getenv("INSIDE_EMACS") != "") Sys.setenv(NO_COLOR="TRUE") That preserves cli behavior on the command-line etc but now prevents it from turning my R buffer under ESS in Emacs unreadable should I encounter an error. And that is good enough for now. Thanks again, Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
[ESS] ess, noweb and polymode
Dear ESS-list, Installing emacs to do literate programming, I have just discovered that noweb-mode doesn't exist anymore. It has been replaced by polymode if I well understood. So, I install from MELPA : ess, polymode, poly-R, poly-markdown, poly-noweb and I placed in my .emacs.el the following lines: --- (require 'poly-R) (require 'poly-markdown) (require 'poly-noweb) (add-to-list 'auto-mode-alist '("\\.[rR]nw" . poly-noweb+r-mode)) (add-to-list 'auto-mode-alist '("\\.[rR]md" . poly-markdown+r-mode)) (add-to-list 'auto-mode-alist '("\\.md$" . poly-markdown-mode)) ;; Load ESS (load "ess-autoloads") - It seems to work but I don't find anymore some usefull ess-noweb shortcuts. For example, I liked M-n g (binded to ess-noweb-goto-chunk) which showed me all the chunks names in a ring buffer at the bottom of the frame (very convenient to move in large file). Also, with the old ess versions it was possible to put all the line of the begining of every chunk (<< >>=) in yellow (for example) and all the line of the end of the chunk (@) in blue thanks to the ess-noweb-font-lock-mode.el file which was very convenient. Here are my questions: 1. Could you tell me if I didn't forget to install some emacs packages to use polymode with noweb mode ? 2. If the two features described above really disappeared with yhe new new version of ess with polymode, could you please give me some pointers to try to get these two features in emacs ? Thank you for your advice Best regards Laurent __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [R] anyone having trouble accesing CRAN?
Às 19:13 de 15/11/2023, Christopher W. Ryan via R-help escreveu: at https://cran.r-project.org/ I get this error message: = Secure Connection Failed An error occurred during a connection to cran.r-project.org. PR_END_OF_FILE_ERROR Error code: PR_END_OF_FILE_ERROR The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. === Three different browsers, two different devices, two different networks. (The text of the error messages varies.) Anyone seeing similar? Thanks. --Chris Ryan __ R-help@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. Hello, Yes, CRAN is down. I know last week there was an anouncement about a maintenance scheduled but I cannot place that e-mail right now and don't remember the date exactly so I cannot say for sure this is what is happening. But it is probably a scheduled maintenance. Rui Barradas -- Este e-mail foi analisado pelo software antivírus AVG para verificar a presença de vírus. www.avg.com __ R-help@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.
Re: [R] anyone having trouble accesing CRAN?
On Wed, 15 Nov 2023 14:13:00 -0500 "Christopher W. Ryan via R-help" wrote: > Anyone seeing similar? Same for me. While it worked, CRAN website had the following message: >> The CRAN Admin Team will perform system upgrades during the period >> Wednesday November 15 until Thursday November 16, 2023. There will >> be intermittent outages in service during this time. Use chooseCRANmirror(local.only = TRUE) (or subset() the return value of getCRANmirrors(local.only = TRUE)) to access a mirror that works. -- Best regards, Ivan __ R-help@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.
Re: [R] anyone having trouble accesing CRAN?
Yes, they posted a message about this recently. There's some maintenance happening and CRAN will be unavailable for a while. I can't find that message, but I think it was 2 or 3 days of downtime. Duncan Murdoch On 15/11/2023 2:13 p.m., Christopher W. Ryan via R-help wrote: at https://cran.r-project.org/ I get this error message: = Secure Connection Failed An error occurred during a connection to cran.r-project.org. PR_END_OF_FILE_ERROR Error code: PR_END_OF_FILE_ERROR The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. === Three different browsers, two different devices, two different networks. (The text of the error messages varies.) Anyone seeing similar? Thanks. --Chris Ryan __ R-help@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. __ R-help@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.
[R] anyone having trouble accesing CRAN?
at https://cran.r-project.org/ I get this error message: = Secure Connection Failed An error occurred during a connection to cran.r-project.org. PR_END_OF_FILE_ERROR Error code: PR_END_OF_FILE_ERROR The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. === Three different browsers, two different devices, two different networks. (The text of the error messages varies.) Anyone seeing similar? Thanks. --Chris Ryan __ R-help@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.
Re: [R] kindly unsubscribe
Please see the bottom of this and every message for the link to unsubscribe. -- Bert On Wed, Nov 15, 2023 at 10:25 AM Saikat Dutta Chowdhury < saikatduttachowdh...@gmail.com> wrote: > -- > Saikat Dutta Chowdhury > Mobile: 8017650842 > > [[alternative HTML version deleted]] > > __ > R-help@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. > [[alternative HTML version deleted]] __ R-help@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.
[R] kindly unsubscribe
-- Saikat Dutta Chowdhury Mobile: 8017650842 [[alternative HTML version deleted]] __ R-help@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.
Re: [R] Can someone please have a look at this query on stackoverflow?
... and note also that there may be clipping options you can change/set to approximate your desiderata. -- Bert On Wed, Nov 15, 2023 at 9:02 AM Bert Gunter wrote: > Well, as no one else has offered an answer ... > > I haven't looked at this closely, but could it not simply be the case that > the aspect ratio set by "Landscape Mode" just differs from that of your > display device? -- i.e., it is impossible to have the figure displayed in > landscape ratio *and* simultaneously fill your display device? > > If this is obviously wrong, feel free to ignore without replying. > > Cheers, > Bert > > On Tue, Nov 14, 2023 at 8:48 PM Ashim Kapoor > wrote: > >> Dear John, >> >> Many thanks for your reply. >> >> I wish 2 things : >> 1. Landscape mode >> 2. No wasted space on the sides when I maximise the pdf. >> >> When I download an open and maximise the pdf it wastes space. Please >> see the attached screenshot. >> >> Query: When you maximise the PDF does it occupy the full screen ? >> >> Best, >> Ashim >> >> On Tue, Nov 14, 2023 at 5:14 PM John Kane wrote: >> > >> > I ran the code from the answer and it seems to work well. It, >> definitely, is giving a landscape output. >> > >> > --- >> > title: "Testing landscape and aspect ratio" >> > output: >> > pdf_document: >> > number_sections: true >> > classoption: >> > - landscape >> > - "aspectratio=169" >> > header-includes: >> >- \usepackage{dcolumn} >> > documentclass: article >> > geometry: margin=1.5cm >> > --- >> > >> > ```{r, out.extra='keepaspectratio=true', out.height='100%', >> out.width="100%"} >> > plot(rnorm(100)) >> > ``` >> > >> > >> > >> > >> > On Mon, 13 Nov 2023 at 23:33, Ashim Kapoor >> wrote: >> >> >> >> Dear all, >> >> >> >> I have posted a query which has received a response but that is not >> >> working on my computer. >> >> >> >> Here is the query: >> >> >> >> >> https://stackoverflow.com/questions/77387434/pdf-from-rmarkdown-landscape-and-aspectratio-169 >> >> >> >> Can someone please help me ? >> >> >> >> Best Regards, >> >> Ashim >> >> >> >> __ >> >> R-help@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. >> > >> > >> > >> > -- >> > John Kane >> > Kingston ON Canada >> __ >> R-help@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. >> > [[alternative HTML version deleted]] __ R-help@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.
Re: [R] Can someone please have a look at this query on stackoverflow?
Well, as no one else has offered an answer ... I haven't looked at this closely, but could it not simply be the case that the aspect ratio set by "Landscape Mode" just differs from that of your display device? -- i.e., it is impossible to have the figure displayed in landscape ratio *and* simultaneously fill your display device? If this is obviously wrong, feel free to ignore without replying. Cheers, Bert On Tue, Nov 14, 2023 at 8:48 PM Ashim Kapoor wrote: > Dear John, > > Many thanks for your reply. > > I wish 2 things : > 1. Landscape mode > 2. No wasted space on the sides when I maximise the pdf. > > When I download an open and maximise the pdf it wastes space. Please > see the attached screenshot. > > Query: When you maximise the PDF does it occupy the full screen ? > > Best, > Ashim > > On Tue, Nov 14, 2023 at 5:14 PM John Kane wrote: > > > > I ran the code from the answer and it seems to work well. It, > definitely, is giving a landscape output. > > > > --- > > title: "Testing landscape and aspect ratio" > > output: > > pdf_document: > > number_sections: true > > classoption: > > - landscape > > - "aspectratio=169" > > header-includes: > >- \usepackage{dcolumn} > > documentclass: article > > geometry: margin=1.5cm > > --- > > > > ```{r, out.extra='keepaspectratio=true', out.height='100%', > out.width="100%"} > > plot(rnorm(100)) > > ``` > > > > > > > > > > On Mon, 13 Nov 2023 at 23:33, Ashim Kapoor > wrote: > >> > >> Dear all, > >> > >> I have posted a query which has received a response but that is not > >> working on my computer. > >> > >> Here is the query: > >> > >> > https://stackoverflow.com/questions/77387434/pdf-from-rmarkdown-landscape-and-aspectratio-169 > >> > >> Can someone please help me ? > >> > >> Best Regards, > >> Ashim > >> > >> __ > >> R-help@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. > > > > > > > > -- > > John Kane > > Kingston ON Canada > __ > R-help@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. > [[alternative HTML version deleted]] __ R-help@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.