Re: [R] [External] Error: unexpected symbol in "read.csv(12agosto.csv after installing Monterey

2021-11-08 Thread Richard M. Heiberger
yes, follow David Winsemius' advice.

In this example, it looks not to be a mac issue, but a new R user issue.
The partial message in the subject says

read.csv(12agosto.csv

The correct syntax is to quote the name of a file, so it should be

read.csv("12agosto.csv")

> On Nov 08, 2021, at 23:14, David Winsemius  wrote:
> 
> There is a dedicated mailing list for Mac specific questions. You should 
> subscribe before posting further but your first posting will still get 
> moderated so don't send second postings because you think it's taking too 
> long:
> 
> r-sig-...@r-project.org
> 
> And I'm a Mac user but do not understand what code was used. And I don't 
> think the complete error message was included on the subject line. You should 
> paste the complete code that was used and indicate whether it occurs with 
> every file or only one particular file or file name. And do include the 
> complete error message in the body of the email.
> 
> (I'm wondering if there could be an issue with encoding of a file name since 
> you are using a US locale but the MacOS may be set for a Mexican locale.)
> 
> -- 
> 
> David
> 
> On 11/8/21 5:59 PM, cue...@cicese.mx wrote:
>> \n<>\n\n \n<> code to illustrate>> \n<>\n\n\n\n
>> --please do not edit the information below--
>> 
>> R Version:
>> platform = aarch64-apple-darwin20
>> arch = aarch64
>> os = darwin20
>> system = aarch64, darwin20
>> status =
>> major = 4
>> minor = 1.2
>> year = 2021
>> month = 11
>> day = 01
>> svn rev = 81115
>> language = R
>> version.string = R version 4.1.2 (2021-11-01)
>> nickname = Bird Hippie
>> 
>> GUI:
>> R-GUI 1.77 (8007)
>> 
>> Locale:
>> en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>> 
>> Search Path:
>> .GlobalEnv, tools:RGUI, package:stats, package:graphics, package:grDevices, 
>> package:utils, package:datasets, package:methods,
>> Autoloads, package:base
>> 
>> 
>> --
>> Horacio, de la Cueva, PhD
>> CICESE
>> Biología Experimental y Aplicada
>> Carretera Ensenada Tijiuana No. 3918
>> Zona Playitas,
>> Ensenada BC
>> 22760
>> México
>> 
>> US Mailing Address:
>> P.O. Box, 430222
>> San Ysidro, CA 92143
>> 
>> cue...@cicese.mx
>> cohevolut...@gmail.com
>> cohevolut...@icloud.com
>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhoraciodelacueva.blogspot.mx%2Fdata=04%7C01%7Crmh%40temple.edu%7C21378c448b8c4ac5fe5108d9a3377ecc%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637720281054221658%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=H0J9lu2L13rA1OMGHVntWo4bRBl6Ckoyr1OlpvrMkqI%3Dreserved=0
>> cel +52 646 171 5485
>> 
>> ORCID
>> -0002-5280-6458
>> 
>> Web of Science ResearcherID
>> ABA-4045-2020.
>> 
>> 
>>  [[alternative HTML version deleted]]
>> 
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-helpdata=04%7C01%7Crmh%40temple.edu%7C21378c448b8c4ac5fe5108d9a3377ecc%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637720281054221658%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=pHYoYETeVrMbKKNk7MKQ3EHD9tGrj8vLtns4xRbTzLs%3Dreserved=0
>> PLEASE do read the posting guide 
>> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.r-project.org%2Fposting-guide.htmldata=04%7C01%7Crmh%40temple.edu%7C21378c448b8c4ac5fe5108d9a3377ecc%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637720281054221658%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=lu3zLdD%2FXtpYwZtOJM00DDZni6e1GBdSpRS4k2D7IjQ%3Dreserved=0
>> and provide commented, minimal, self-contained, reproducible code.
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-helpdata=04%7C01%7Crmh%40temple.edu%7C21378c448b8c4ac5fe5108d9a3377ecc%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637720281054221658%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=pHYoYETeVrMbKKNk7MKQ3EHD9tGrj8vLtns4xRbTzLs%3Dreserved=0
> PLEASE do read the posting guide 
> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.r-project.org%2Fposting-guide.htmldata=04%7C01%7Crmh%40temple.edu%7C21378c448b8c4ac5fe5108d9a3377ecc%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637720281054221658%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=lu3zLdD%2FXtpYwZtOJM00DDZni6e1GBdSpRS4k2D7IjQ%3Dreserved=0
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] Error: unexpected symbol in "read.csv(12agosto.csv after installing Monterey

2021-11-08 Thread David Winsemius
There is a dedicated mailing list for Mac specific questions. You should 
subscribe before posting further but your first posting will still get 
moderated so don't send second postings because you think it's taking 
too long:


r-sig-...@r-project.org

And I'm a Mac user but do not understand what code was used. And I don't 
think the complete error message was included on the subject line. You 
should paste the complete code that was used and indicate whether it 
occurs with every file or only one particular file or file name. And do 
include the complete error message in the body of the email.


(I'm wondering if there could be an issue with encoding of a file name 
since you are using a US locale but the MacOS may be set for a Mexican 
locale.)


--

David

On 11/8/21 5:59 PM, cue...@cicese.mx wrote:

\n<>\n\n \n<> \n<>\n\n\n\n
--please do not edit the information below--

R Version:
platform = aarch64-apple-darwin20
arch = aarch64
os = darwin20
system = aarch64, darwin20
status =
major = 4
minor = 1.2
year = 2021
month = 11
day = 01
svn rev = 81115
language = R
version.string = R version 4.1.2 (2021-11-01)
nickname = Bird Hippie

GUI:
R-GUI 1.77 (8007)

Locale:
en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

Search Path:
.GlobalEnv, tools:RGUI, package:stats, package:graphics, package:grDevices, 
package:utils, package:datasets, package:methods,
Autoloads, package:base


--
Horacio, de la Cueva, PhD
CICESE
Biología Experimental y Aplicada
Carretera Ensenada Tijiuana No. 3918
Zona Playitas,
Ensenada BC
22760
México

US Mailing Address:
P.O. Box, 430222
San Ysidro, CA 92143

cue...@cicese.mx
cohevolut...@gmail.com
cohevolut...@icloud.com
https://horaciodelacueva.blogspot.mx/
cel +52 646 171 5485

ORCID
-0002-5280-6458

Web of Science ResearcherID
ABA-4045-2020.


[[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-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] Error: unexpected symbol in "read.csv(12agosto.csv after installing Monterey

2021-11-08 Thread cuevas
\n<>\n\n \n<> \n<>\n\n\n\n
--please do not edit the information below--

R Version:
platform = aarch64-apple-darwin20
arch = aarch64
os = darwin20
system = aarch64, darwin20
status = 
major = 4
minor = 1.2
year = 2021
month = 11
day = 01
svn rev = 81115
language = R
version.string = R version 4.1.2 (2021-11-01)
nickname = Bird Hippie

GUI:
R-GUI 1.77 (8007)

Locale:
en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

Search Path:
.GlobalEnv, tools:RGUI, package:stats, package:graphics, package:grDevices, 
package:utils, package:datasets, package:methods,
Autoloads, package:base


--
Horacio, de la Cueva, PhD
CICESE
Biología Experimental y Aplicada
Carretera Ensenada Tijiuana No. 3918
Zona Playitas,
Ensenada BC
22760
México

US Mailing Address:
P.O. Box, 430222
San Ysidro, CA 92143

cue...@cicese.mx
cohevolut...@gmail.com
cohevolut...@icloud.com
https://horaciodelacueva.blogspot.mx/
cel +52 646 171 5485

ORCID
-0002-5280-6458

Web of Science ResearcherID  
ABA-4045-2020.


[[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] TRCUKING 4

2021-11-08 Thread Mohammad Shoushary
Hi Guys,
I wonder how to opt trucking 4 once loading "TRUCKING" file.
I loaded: load("TRUCKING.Rdata")
but I need the file that has 4 carriers, any clue please? I appreciate it


Mohammad

[[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] Problem Compiling v-4.x.x

2021-11-08 Thread Stephen P. Molnar




On 11/08/2021 03:15 PM, Duncan Murdoch wrote:

On 08/11/2021 2:57 p.m., Stephen P. Molnar wrote:

I have uptodate Debian Buster on my Linux platform and have been
compiling R distros for quite some time, usually with success.

This time I have encountered the same error in my attempts to compile
v-4..1.2 and then, when that failed, I had the same error with v-4.1.0.

The error in both cases was:

/home/comp/Downloads/R Packages/R-4.1.0/R-4.1.0/etc/Makeconf:10:
Packages/R-4.1.0/R-4.1.0/share/make/vars.mk: No such file or directory.

I don't have the faintest idea as to what is going on, and, even worse,
I don't know how to fix it.

Help will be greatly appreciated.



I think you'll need to describe what you did that led to this error.

Duncan Murdoch


True, very true. Sorroy for the omission.

./configure
/make

--
Stephen P. Molnar, Ph.D.
www.molecular-modeling.net
614.312.7528 (c)
Skype:  smolnar1

__
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] Problem Compiling v-4.x.x

2021-11-08 Thread Duncan Murdoch

On 08/11/2021 2:57 p.m., Stephen P. Molnar wrote:

I have uptodate Debian Buster on my Linux platform and have been
compiling R distros for quite some time, usually with success.

This time I have encountered the same error in my attempts to compile
v-4..1.2 and then, when that failed, I had the same error with v-4.1.0.

The error in both cases was:

/home/comp/Downloads/R Packages/R-4.1.0/R-4.1.0/etc/Makeconf:10:
Packages/R-4.1.0/R-4.1.0/share/make/vars.mk: No such file or directory.

I don't have the faintest idea as to what is going on, and, even worse,
I don't know how to fix it.

Help will be greatly appreciated.



I think you'll need to describe what you did that led to this error.

Duncan Murdoch

__
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] Problem Compiling v-4.x.x

2021-11-08 Thread Ivan Krylov
On Mon, 8 Nov 2021 14:57:24 -0500
"Stephen P. Molnar"  wrote:

> /home/comp/Downloads/R Packages/R-4.1.0/R-4.1.0/etc/Makeconf:10:
> Packages/R-4.1.0/R-4.1.0/share/make/vars.mk: No such file or directory

This is the case of Make breaking things by splitting the file path by
whitespace. Line 9 of Makeconf even contains a comment regarding this:

>> ## This fails if it contains spaces, or if it is quoted

Rename "R Packages" to R_Packages (or anything else without spaces in
it) to work around the error.

-- 
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] Plotly

2021-11-08 Thread Jeff Reichman
Bert

Ok I'll give that a shot too.

Jeff

-Original Message-
From: Bert Gunter  
Sent: Monday, November 8, 2021 1:16 PM
To: reichm...@sbcglobal.net
Cc: R-help 
Subject: Re: [R] Plotly

As Plotly for R is a product of private company, your query is off topic here 
(though you may get a response if you are lucky). They have their own Help 
forum to which you should post instead:

https://community.plotly.com/c/graphing-libraries/r/9


Bert Gunter

"The trouble with having an open mind is that people keep coming along and 
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

On Mon, Nov 8, 2021 at 10:25 AM Jeff Reichman  wrote:
>
> R Help Forum
>
>
>
> Anyone know if there are Plotly issues ones need to be aware of. For 
> example I quite often receive the following error "Error in 
> dirname(to) : path too long." I find there is no one fix. Is there 
> some sort of Windows /Plotly naming restrictions???
>
>
>
> # create a line chart displaying launches by agency type, with 
> highlighting
>
> shared_launches %>%
>
>   plot_ly(x = ~launch_year, y = ~n, color = ~agency_type) %>%
>
>   add_lines() %>%
>
>   highlight()
>
>
>
> Jeff
>
>
> [[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-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] Problem Compiling v-4.x.x

2021-11-08 Thread Stephen P. Molnar
I have uptodate Debian Buster on my Linux platform and have been 
compiling R distros for quite some time, usually with success.


This time I have encountered the same error in my attempts to compile 
v-4..1.2 and then, when that failed, I had the same error with v-4.1.0.


The error in both cases was:

/home/comp/Downloads/R Packages/R-4.1.0/R-4.1.0/etc/Makeconf:10: 
Packages/R-4.1.0/R-4.1.0/share/make/vars.mk: No such file or directory.


I don't have the faintest idea as to what is going on, and, even worse, 
I don't know how to fix it.


Help will be greatly appreciated.

Thanks in advance.

--
Stephen P. Molnar, Ph.D.
www.molecular-modeling.net
614.312.7528 (c)
Skype:  smolnar1

__
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] Plotly

2021-11-08 Thread Jeff Newmiller
I don't know any details of Plotly, but Windows does have a directory depth 
limit that can be very frustrating. I think there is a registry setting that 
can help alleviate, but it breaks some things so it is highly dependent on how 
you use your computer as to whether you can take advantage of that setting.

On November 8, 2021 11:15:59 AM PST, Bert Gunter  wrote:
>As Plotly for R is a product of private company, your query is off
>topic here (though you may get a response if you are lucky). They have
>their own Help forum to which you should post instead:
>
>https://community.plotly.com/c/graphing-libraries/r/9
>
>
>Bert Gunter
>
>"The trouble with having an open mind is that people keep coming along
>and sticking things into it."
>-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>On Mon, Nov 8, 2021 at 10:25 AM Jeff Reichman  wrote:
>>
>> R Help Forum
>>
>>
>>
>> Anyone know if there are Plotly issues ones need to be aware of. For example
>> I quite often receive the following error "Error in dirname(to) : path too
>> long." I find there is no one fix. Is there some sort of Windows /Plotly
>> naming restrictions???
>>
>>
>>
>> # create a line chart displaying launches by agency type, with highlighting
>>
>> shared_launches %>%
>>
>>   plot_ly(x = ~launch_year, y = ~n, color = ~agency_type) %>%
>>
>>   add_lines() %>%
>>
>>   highlight()
>>
>>
>>
>> Jeff
>>
>>
>> [[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-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.

-- 
Sent from my phone. Please excuse my brevity.

__
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] Plotly

2021-11-08 Thread Bert Gunter
As Plotly for R is a product of private company, your query is off
topic here (though you may get a response if you are lucky). They have
their own Help forum to which you should post instead:

https://community.plotly.com/c/graphing-libraries/r/9


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

On Mon, Nov 8, 2021 at 10:25 AM Jeff Reichman  wrote:
>
> R Help Forum
>
>
>
> Anyone know if there are Plotly issues ones need to be aware of. For example
> I quite often receive the following error "Error in dirname(to) : path too
> long." I find there is no one fix. Is there some sort of Windows /Plotly
> naming restrictions???
>
>
>
> # create a line chart displaying launches by agency type, with highlighting
>
> shared_launches %>%
>
>   plot_ly(x = ~launch_year, y = ~n, color = ~agency_type) %>%
>
>   add_lines() %>%
>
>   highlight()
>
>
>
> Jeff
>
>
> [[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-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] Plotly

2021-11-08 Thread Jeff Reichman
R Help Forum

 

Anyone know if there are Plotly issues ones need to be aware of. For example
I quite often receive the following error "Error in dirname(to) : path too
long." I find there is no one fix. Is there some sort of Windows /Plotly
naming restrictions???

 

# create a line chart displaying launches by agency type, with highlighting

shared_launches %>%

  plot_ly(x = ~launch_year, y = ~n, color = ~agency_type) %>%

  add_lines() %>%

  highlight()

 

Jeff


[[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] bootstrap confidence intervals

2021-11-08 Thread varin sacha via R-help
Hi, 

Many thanks for your responses.



Le samedi 6 novembre 2021, 08:39:22 UTC+1, Rui Barradas  
a écrit : 





Hello,


Às 01:36 de 06/11/21, David Winsemius escreveu:
> 
> On 11/5/21 1:16 PM, varin sacha via R-help wrote:
>> Dear R-experts,
>>
>> Here is a toy example. How can I get the bootstrap confidence 
>> intervals working ?
>>
>> Many thanks for your help
>>
>> 
>> library(DescTools)
>> library(boot)
>> A=c(488,437,500,449,364)
>> dat<-data.frame(A)
>> med<-function(d,i) {
>> temp<-d[i,]
> # shouldn't this be
> 
> HodgesLehmann(temp)  # ???
> 
> # makes no sense to extract a bootstrap sample and then return a value 
> calculated on the full dataset
> 
>> HodgesLehmann(A)
>> }
>> boot.out<-boot(data=dat,statistic=med,R=100)
> 
> I would have imagined that one could simply extract the quantiles of the 
> HodgesLehmann at the appropriate tail probabilities:
> 
> 
> quantile(boot.out$t, c(0.025, 0.975))
>      2.5%    97.5%
> 400.5000 488.0001
> 
> 
> It doesn't seem reasonable to have bootstrap CI's that are much tighter 
> than the estimates on the original data:
> 
> 
>  > HodgesLehmann(boot.out$t, conf.level=0.95)
>     est lwr.ci upr.ci
> 449.75 444.25 453.25    # seems to be cheating
>  > HodgesLehmann(dat$A, conf.level=0.95)
>     est lwr.ci upr.ci
>     449    364    500    # Much closer to the quantiles above
> 
> 


This cheating comes from wilcox.test, which is called by HodgesLehman to 
do the calculations. Below is a function calling wilcox.test directly, 
and the bootstrapped intervals are always equal, no matter what way they 
are computed.



A <- c(488, 437, 500, 449, 364)
dat <- data.frame(A)

med <- function(d,i) {
  temp <- d[i, ]
  HodgesLehmann(temp)
}
med2 <- function(d, i, conf.level = 0.95){
  temp <- d[i, ]
  wilcox.test(temp,
              conf.int = TRUE,
              conf.level = Coalesce(conf.level, 0.8),
              exact = FALSE)$estimate
}

set.seed(2021)
boot.out <- boot(data = dat, statistic = med, R = 100)
set.seed(2021)
boot.out2 <- boot(data = dat, statistic = med2, R = 100, conf.level = 0.95)

HodgesLehmann(boot.out$t)
#[1] 452.75
HodgesLehmann(boot.out2$t)
#[1] 452.75

HodgesLehmann(boot.out$t, conf.level = 0.95)
#    est  lwr.ci  upr.ci
#452.7500 447.2500 458.7499
HodgesLehmann(boot.out2$t, conf.level = 0.95)
#    est  lwr.ci  upr.ci
#452.7500 447.2500 458.7499

quantile(boot.out$t, c(0.025, 0.975))
# 2.5% 97.5%
#400.5 494.0
quantile(boot.out2$t, c(0.025, 0.975))
# 2.5% 97.5%
#400.5 494.0

boot.ci(boot.out, type = "all")    # CI's are
boot.ci(boot.out2, type = "all")  # the same



But the bootstrap statistic vectors t are different:



identical(boot.out$t, boot.out2$t)
#[1] FALSE
all.equal(boot.out$t, boot.out2$t)
#[1] "Mean relative difference: 8.93281e-08"




I haven't time to check what is going on in wilcox.test, its source is a 
bit involved, with many if/else statements, maybe I'll come back to this 
but no promises made.


Hope this helps,

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.

__
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] bootstrap confidence intervals

2021-11-08 Thread varin sacha via R-help
Hi,

I really thank you a lot for your response.




Le samedi 6 novembre 2021, 02:37:46 UTC+1, David Winsemius 
 a écrit : 






On 11/5/21 1:16 PM, varin sacha via R-help wrote:
> Dear R-experts,
>
> Here is a toy example. How can I get the bootstrap confidence intervals 
> working ?
>
> Many thanks for your help
>
> 
> library(DescTools)
> library(boot)
>  
> A=c(488,437,500,449,364)
> dat<-data.frame(A)
> med<-function(d,i) {
> temp<-d[i,]
# shouldn't this be

HodgesLehmann(temp)  # ???

# makes no sense to extract a bootstrap sample and then return a value 
calculated on the full dataset

> HodgesLehmann(A)
> }
> boot.out<-boot(data=dat,statistic=med,R=100)

I would have imagined that one could simply extract the quantiles of the 
HodgesLehmann at the appropriate tail probabilities:


quantile(boot.out$t, c(0.025, 0.975))
    2.5%    97.5%
400.5000 488.0001


It doesn't seem reasonable to have bootstrap CI's that are much tighter 
than the estimates on the original data:


> HodgesLehmann(boot.out$t, conf.level=0.95)
   est lwr.ci upr.ci
449.75 444.25 453.25    # seems to be cheating
> HodgesLehmann(dat$A, conf.level=0.95)
   est lwr.ci upr.ci
   449    364    500    # Much closer to the quantiles above


-- 

David.


> HodgesLehmann(boot.out$t)
>
> boot.ci(boot.out,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.

__
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.


Re: [R-es] Publicar en Wordpress desde R

2021-11-08 Thread miguel.angel.rodriguez.muinos
Hay una posibilidad de que el error que te da desaparezca si te conectas por 
https. Yo lo intentar�a por ah� (siempre que consigas solucionar ese error de 
certificado que comentas).


Adem�s de que refuerzas la seguridad.

options(WordpressLogin = c(usuario = 'contrase�a'), WordpressURL = 
'https://midominio/xmlrpc.php')



Un saludo.




De: Jorge Pradas 
Enviado: lunes, 8 de noviembre de 2021 14:56
Para: Rodr�guez Mu��os, Miguel �ngel
Cc: r-help-es
Asunto: Re: [R-es] Publicar en Wordpress desde R

No, uso http, porque con https daba un error de certificado caducado aunque el 
certificado de TLS del servidor es vigente...

El error que da es:
output file: test.md
Error in xml.rpc(.server, method, as.character(blogid), names(login),  :
  Problems

El lun, 8 nov 2021 a las 14:34, 
mailto:miguel.angel.rodriguez.mui...@sergas.es>>
 escribi�:

Hola Jorge.


Al pasarle, a "options", el par�metro de "WordpressURL" usas https?


Un saludo,

Miguel.





De: R-help-es 
mailto:r-help-es-boun...@r-project.org>> en 
nombre de Jorge Pradas mailto:jorpr...@gmail.com>>
Enviado: lunes, 8 de noviembre de 2021 14:21
Para: r-help-es
Asunto: [R-es] Publicar en Wordpress desde R

Hola,

Hasta hace poco pod�a publicar en wordpress desde R, con las
librerias RWordpress, knitr, XMLRPC, ...
tal como explica este post por ejemplo,
https://sites.tufts.edu/emotiononthebrain/2017/08/12/blog-posting-from-r-markdown-to-wordpress/

Son librer�as que la verdad es que desde hace mucho tiempo que no se
actualizan,
https://github.com/duncantl/RWordPress


pero la verdad es que iba de maravilla, hasta el viernes...

desde entonces da un error
Error in xml.rpc(.server, method, as.character(blogid), names(login),  :
  Problems

Esto usa una puerta trasera en wordpress 
x.com/xmlrpc.php  con
credenciales, que sigue abierta,  porque desde el navegador responde...

�alguien m�s le est� pasando esto?

�teneis alguna otra alternativa a publicar RMarkdown en wordpress?

Muchas gracias y un saludo!
Jorge

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es



Nota: A informaci�n contida nesta mensaxe e os seus posibles documentos 
adxuntos � privada e confidencial e est� dirixida �nicamente � seu 
destinatario/a. Se vostede non � o/a destinatario/a orixinal desta mensaxe, por 
favor elim�nea. A distribuci�n ou copia desta mensaxe non est� autorizada.

Nota: La informaci�n contenida en este mensaje y sus posibles documentos 
adjuntos es privada y confidencial y est� dirigida �nicamente a su 
destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, 
por favor elim�nelo. La distribuci�n o copia de este mensaje no est� autorizada.

See more languages: http://www.sergas.es/aviso-confidencialidad



Nota: A informaci�n contida nesta mensaxe e os seus posibles documentos 
adxuntos � privada e confidencial e est� dirixida �nicamente � seu 
destinatario/a. Se vostede non � o/a destinatario/a orixinal desta mensaxe, por 
favor elim�nea. A distribuci�n ou copia desta mensaxe non est� autorizada.

Nota: La informaci�n contenida en este mensaje y sus posibles documentos 
adjuntos es privada y confidencial y est� dirigida �nicamente a su 
destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, 
por favor elim�nelo. La distribuci�n o copia de este mensaje no est� autorizada.

See more languages: http://www.sergas.es/aviso-confidencialidad

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R-es] Publicar en Wordpress desde R

2021-11-08 Thread Jorge Pradas
No, uso http, porque con https daba un error de certificado caducado aunque
el certificado de TLS del servidor es vigente...

El error que da es:
output file: test.md
Error in xml.rpc(.server, method, as.character(blogid), names(login),  :
  Problems

El lun, 8 nov 2021 a las 14:34, 
escribió:

> Hola Jorge.
>
>
> Al pasarle, a "options", el parámetro de "WordpressURL" usas https?
>
>
> Un saludo,
>
> Miguel.
>
>
>
>
>
> --
> *De:* R-help-es  en nombre de Jorge
> Pradas 
> *Enviado:* lunes, 8 de noviembre de 2021 14:21
> *Para:* r-help-es
> *Asunto:* [R-es] Publicar en Wordpress desde R
>
> Hola,
>
> Hasta hace poco podía publicar en wordpress desde R, con las
> librerias RWordpress, knitr, XMLRPC, ...
> tal como explica este post por ejemplo,
>
> https://sites.tufts.edu/emotiononthebrain/2017/08/12/blog-posting-from-r-markdown-to-wordpress/
>
> Son librerías que la verdad es que desde hace mucho tiempo que no se
> actualizan,
> https://github.com/duncantl/RWordPress
>
>
> pero la verdad es que iba de maravilla, hasta el viernes...
>
> desde entonces da un error
> Error in xml.rpc(.server, method, as.character(blogid), names(login),  :
>   Problems
>
> Esto usa una puerta trasera en wordpress x.com/xmlrpc.php  con
> credenciales, que sigue abierta,  porque desde el navegador responde...
>
> ¿alguien más le está pasando esto?
>
> ¿teneis alguna otra alternativa a publicar RMarkdown en wordpress?
>
> Muchas gracias y un saludo!
> Jorge
>
> [[alternative HTML version deleted]]
>
> ___
> R-help-es mailing list
> R-help-es@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-help-es
>
> --
>
> Nota: A información contida nesta mensaxe e os seus posibles documentos
> adxuntos é privada e confidencial e está dirixida únicamente ó seu
> destinatario/a. Se vostede non é o/a destinatario/a orixinal desta mensaxe,
> por favor elimínea. A distribución ou copia desta mensaxe non está
> autorizada.
>
> Nota: La información contenida en este mensaje y sus posibles documentos
> adjuntos es privada y confidencial y está dirigida únicamente a su
> destinatario/a. Si usted no es el/la destinatario/a original de este
> mensaje, por favor elimínelo. La distribución o copia de este mensaje no
> está autorizada.
>
> See more languages: http://www.sergas.es/aviso-confidencialidad
>

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R-es] Publicar en Wordpress desde R

2021-11-08 Thread miguel.angel.rodriguez.muinos
Hola Jorge.


Al pasarle, a "options", el par�metro de "WordpressURL" usas https?


Un saludo,

Miguel.





De: R-help-es  en nombre de Jorge Pradas 

Enviado: lunes, 8 de noviembre de 2021 14:21
Para: r-help-es
Asunto: [R-es] Publicar en Wordpress desde R

Hola,

Hasta hace poco pod�a publicar en wordpress desde R, con las
librerias RWordpress, knitr, XMLRPC, ...
tal como explica este post por ejemplo,
https://sites.tufts.edu/emotiononthebrain/2017/08/12/blog-posting-from-r-markdown-to-wordpress/

Son librer�as que la verdad es que desde hace mucho tiempo que no se
actualizan,
https://github.com/duncantl/RWordPress


pero la verdad es que iba de maravilla, hasta el viernes...

desde entonces da un error
Error in xml.rpc(.server, method, as.character(blogid), names(login),  :
  Problems

Esto usa una puerta trasera en wordpress x.com/xmlrpc.php  con
credenciales, que sigue abierta,  porque desde el navegador responde...

�alguien m�s le est� pasando esto?

�teneis alguna otra alternativa a publicar RMarkdown en wordpress?

Muchas gracias y un saludo!
Jorge

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es



Nota: A informaci�n contida nesta mensaxe e os seus posibles documentos 
adxuntos � privada e confidencial e est� dirixida �nicamente � seu 
destinatario/a. Se vostede non � o/a destinatario/a orixinal desta mensaxe, por 
favor elim�nea. A distribuci�n ou copia desta mensaxe non est� autorizada.

Nota: La informaci�n contenida en este mensaje y sus posibles documentos 
adjuntos es privada y confidencial y est� dirigida �nicamente a su 
destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, 
por favor elim�nelo. La distribuci�n o copia de este mensaje no est� autorizada.

See more languages: http://www.sergas.es/aviso-confidencialidad

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


[R-es] Publicar en Wordpress desde R

2021-11-08 Thread Jorge Pradas
Hola,

Hasta hace poco podía publicar en wordpress desde R, con las
librerias RWordpress, knitr, XMLRPC, ...
tal como explica este post por ejemplo,
https://sites.tufts.edu/emotiononthebrain/2017/08/12/blog-posting-from-r-markdown-to-wordpress/

Son librerías que la verdad es que desde hace mucho tiempo que no se
actualizan,
https://github.com/duncantl/RWordPress

pero la verdad es que iba de maravilla, hasta el viernes...

desde entonces da un error
Error in xml.rpc(.server, method, as.character(blogid), names(login),  :
  Problems

Esto usa una puerta trasera en wordpress x.com/xmlrpc.php  con
credenciales, que sigue abierta,  porque desde el navegador responde...

¿alguien más le está pasando esto?

¿teneis alguna otra alternativa a publicar RMarkdown en wordpress?

Muchas gracias y un saludo!
Jorge

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es