Re: [R] installing an R package

2022-04-28 Thread Bogdan Tanasa
Thank you all for your time and suggestions.

The issue is that install.package() does not work, because of large file
size,

but at the end I have solved it by using /; options(timeout=1


On Thu, Apr 28, 2022 at 4:01 PM Uwe Ligges 
wrote:

>
>
> On 28.04.2022 23:55, David Winsemius wrote:
> > Pretty sure the right way to install that package is with the Bioc
> installer.
>
> or simply install.packages() after setting the repository.
>
>
> Best,
> Uwe Ligges
>
> >
> > Sent from my iPhone
> >
> >> On Apr 28, 2022, at 3:35 PM, Bogdan Tanasa  wrote:
> >>
> >> HI everyone,
> >>
> >> I must transfer a package from one platform (AWS) where I was able to
> >> install the package
> >>
> >> to another platform (local PC), where I am not able to install the
> package.
> >>
> >> The package is called : BSgenome.Hsapiens.UCSC.hg38
> >>
> >> Is there a way to transfer the files from BSgenome.Hsapiens.UCSC.hg38
> >> folder (below) from AWS to local PC and get it to run ? Thanks !
> >>
> >> 4.0KDESCRIPTION
> >> 4.0KINDEX
> >> 28K Meta
> >> 4.0KNAMESPACE
> >> 20K R
> >> 784Mextdata
> >> 24K help
> >> 12K html
> >>
> >> [[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.
>

[[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] installing an R package

2022-04-28 Thread Uwe Ligges




On 28.04.2022 23:55, David Winsemius wrote:

Pretty sure the right way to install that package is with the Bioc installer.


or simply install.packages() after setting the repository.


Best,
Uwe Ligges



Sent from my iPhone


On Apr 28, 2022, at 3:35 PM, Bogdan Tanasa  wrote:

HI everyone,

I must transfer a package from one platform (AWS) where I was able to
install the package

to another platform (local PC), where I am not able to install the package.

The package is called : BSgenome.Hsapiens.UCSC.hg38

Is there a way to transfer the files from BSgenome.Hsapiens.UCSC.hg38
folder (below) from AWS to local PC and get it to run ? Thanks !

4.0KDESCRIPTION
4.0KINDEX
28K Meta
4.0KNAMESPACE
20K R
784Mextdata
24K help
12K html

[[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-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] installing an R package

2022-04-28 Thread David Winsemius
Pretty sure the right way to install that package is with the Bioc installer. 

Sent from my iPhone

> On Apr 28, 2022, at 3:35 PM, Bogdan Tanasa  wrote:
> 
> HI everyone,
> 
> I must transfer a package from one platform (AWS) where I was able to
> install the package
> 
> to another platform (local PC), where I am not able to install the package.
> 
> The package is called : BSgenome.Hsapiens.UCSC.hg38
> 
> Is there a way to transfer the files from BSgenome.Hsapiens.UCSC.hg38
> folder (below) from AWS to local PC and get it to run ? Thanks !
> 
> 4.0KDESCRIPTION
> 4.0KINDEX
> 28K Meta
> 4.0KNAMESPACE
> 20K R
> 784Mextdata
> 24K help
> 12K html
> 
>[[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] installing an R package

2022-04-28 Thread Bogdan Tanasa
HI everyone,

I must transfer a package from one platform (AWS) where I was able to
install the package

to another platform (local PC), where I am not able to install the package.

The package is called : BSgenome.Hsapiens.UCSC.hg38

Is there a way to transfer the files from BSgenome.Hsapiens.UCSC.hg38
folder (below) from AWS to local PC and get it to run ? Thanks !

4.0KDESCRIPTION
4.0KINDEX
28K Meta
4.0KNAMESPACE
20K R
784Mextdata
24K help
12K html

[[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] R 4.2.0: write.table() "clipboard-1024" copies only columns name

2022-04-28 Thread Tomas Kalibera

On 4/28/22 16:02, Jinsong Zhao wrote:

Hi Sergiy,

I can confirm this. I don't find any bug report related with 
"clipboard" on bugzilla. I will open a bug report.


I confirm this is a bug in the connections code implementation of 
"clipboard". R 4.2 has a new version which uses Unicode and 
unfortunately with this bug which has not been discovered before 
release. Now fixed in R-devel and R-patched, so will be fixed in R 4.2.1.


The bug only affects Windows, only writing to clipboard in subsequent 
operations, and only the connections code.


There is also clipboard support in base R in the utils package, e.g. 
writeClipboard(), which is not affected.


However, I don't see how it would easily solve the problem at hand. One 
could write to a file, then read it, and then pass it to writeClipboard, 
but once we have the file, we can also read it directly.


Sorry for the inconvenience,
Tomas



Best,
Jinsong

On 2022/4/28 21:32, Sergei Ko wrote:

Hi Erich,
Thanks for the suggestion. The "write_clip" solution works as intended.
I wanted to raise a question regarding the "write.table"
function behaviour in R 4.2.0 because I used this solution 
extensively in
my hybrid Excel/R tools to return results. I expected stable 
behaviour from

a function from "utils".
While on the topic - can someone please confirm this bug?
Regards,
Sergiy


On Thu, Apr 28, 2022 at 9:54 AM Erich Subscriptions <
erich.s...@neuwirth.priv.at> wrote:


Die you try clipr::write_clip as an alternative?



On 28.04.2022, at 10:38, Sergei Ko  wrote:

I used write.table(mat, "clipboard-1024", sep="\t", 
row.names=FALSE) to

copy from R to Excel in previous versions. After updating to 4.2.0 it
copies column names only to clipboard. Win 10 64 bit. Any ideas on 
how to

fix it? Try this:

mat = matrix(0, 2, 3)
write.table(mat, "clipboard-1024", sep="\t", row.names=FALSE)

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


Re: [R] glm with family binomial and link identity

2022-04-28 Thread Martin Maechler
TLDR:  No, there was no such change in R 4.2.0

> Ralf Goertz 
> on Wed, 27 Apr 2022 10:27:33 +0200 writes:

> Hi,
> I just noticed that (with my version 4.2.0) it is no longer possible to
> use glm with family=binomial(link=identity). Why is that? It was
> possible with 4.0.x as a colleague of mine just confirmed. 

That's not correct I think:

I've now tried your example in R versions 3.5.x, 4.0.5, 4.1.3, and 4.2.0
and it gave the same error everywhere:

d <- data.frame(y  = c( 0, 1,  0, 1),
trt= c( 0, 0,  1, 1),
w  = c(97, 3, 90, 10))
r0 <- try(
glm(y ~ trt, weights = w, data=d, family = binomial(link = identity)) 
)
## Error in binomial(link = identity) : 
##   link "identity" not available for binomial family; available links are 
‘logit’, ‘probit’, ‘cloglog’, ‘cauchit’, ‘log’

And indeed, binomial() has started with

> head(binomial)
  
1 function (link = "logit")   
2 {   
3 linktemp <- substitute(link)
4 if (!is.character(linktemp))
5 linktemp <- deparse(linktemp)   
6 okLinks <- c("logit", "probit", "cloglog", "cauchit", "log")
> 

*forever*.

It is slightly interesting (to me at least) that if you use a string,
you can use all valid arguments for make.link() and not just
those that are declared "ok" by the code.

HOWEVER, this all has been documented for a long time,
in  ?family == ?binomial

  Note:

 The ‘link’ and ‘variance’ arguments have rather awkward semantics
 for back-compatibility.  The recommended way is to supply them as
 quoted character strings, but they can also be supplied unquoted
 (as names or expressions).  Additionally, they can be supplied as
 a length-one character vector giving the name of one of the
 options, or as a list (for ‘link’, of class ‘"link-glm"’).  The
 restrictions apply only to links given as names: when given as a
 character string all the links known to make.link are accepted.



 



> After all it is useful to compute risk differences with factors.

at least it was neand

> __
> 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] R 4.2.0: write.table() "clipboard-1024" copies only columns name

2022-04-28 Thread Erich Subscriptions
Die you try clipr::write_clip as an alternative?


> On 28.04.2022, at 10:38, Sergei Ko  wrote:
> 
> I used write.table(mat, "clipboard-1024", sep="\t", row.names=FALSE) to
> copy from R to Excel in previous versions. After updating to 4.2.0 it
> copies column names only to clipboard. Win 10 64 bit. Any ideas on how to
> fix it? Try this:
> 
> mat = matrix(0, 2, 3)
> write.table(mat, "clipboard-1024", sep="\t", row.names=FALSE)
> 
>   [[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.


Re: [R] glm with family binomial and link identity

2022-04-28 Thread Ralf Goertz
> Am Wed, 27 Apr 2022 10:27:33 +0200 schrieb Ralf Goertz
> 
> > Hi,
> >
> > I just noticed that (with my version 4.2.0) it is no longer possible
> > to use glm with family=binomial(link=identity). Why is that? It was
> > possible with 4.0.x as a colleague of mine just confirmed. After all
> > it is useful to compute risk differences with factors.  
> 
> Sorry about the noise. It still works with "identity" but it has to be
> quoted (whereas "log" and "logit" also work unquoted).

On the other hand why do I get this following error at all?

Error in binomial(link = identity) : 
  link "identity" not available for binomial family; available links are 
‘logit’, ‘probit’, ‘cloglog’, ‘cauchit’, ‘log’

This is a bit misleading since identity is a legitimate link function
and works perfectly when quoted. The results of that call are in
agreement with what you get with the risk difference approach (for
convenience computed using the meta package)

> d=data.frame(y=c(0, 1, 0, 1), trt=c(0, 0, 1, 1), w=c(97, 3, 90, 10))
> d
  y trt  w
1 0   0 97
2 1   0  3
3 0   1 90
4 1   1 10

> res=glm(y~trt,data=d,weights=w,family=binomial(link="identity"))
> summary(res)

Call: glm(formula = y ~ trt, family = binomial(link = "identity"), data
= dd, weights = w)

Deviance Residuals: 
 1   2   3   4  
-2.431   4.587  -4.355   6.786  

Coefficients:
Estimate Std. Error z value Pr(>|z|)  
(Intercept)  0.030000.01706   1.759   0.0786 .
trt  0.070000.03451   2.028   0.0425 *
…

> confint.default(res)[2,]
  2.5 %  97.5 % 
0.002359942 0.137640058 

This is exactly the same as 

> meta::metabin(10,100,3,100,sm="RD")
Number of observations: o = 200
Number of events: e = 13

 RD   95%-CIz p-value
 0.0700 [0.0024; 0.1376] 2.03  0.0425

So why the error?

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