Re: [R] Issue regarding specifying pdBlocked matrix for random effects vcov in nlme package

2021-08-08 Thread David Winsemius
Dear Dr. David;

Re; List rejection

I'm unable to explain why this posting was refused. It does have 4 image 
files attached. That is more than I typically see on Rhelp. I'm only a 
volunteer moderator, and not one of the owners of the list. I speculate 
that if you were to repost to rhelp (and NOT to R-Core where this 
message does not belong) and you were to substitute copied text from 
your console for all except the first image, it might go through (at 
least to the moderation queue where it could be reviewed by human eyes 
and wetware. (I suspect the number of images and links caused an 
automatic spam rejection.)

I also wonder if your modified re-submission should instead be directed 
to the R-SIG-mixed-models list since that appears to be the question 
topic. Some of the experts there are not regular contributor of viewers 
of Rhelp which is focused on the maechanics of the R language itself.

-- 

David Winsemius

Volunteer moderator.

On 8/2/21 1:43 PM, Benjamin Davis wrote:
>
> Hello,
>
> ��� I have come across an issue regarding specifying the 
> vcov of the random effects while using the /medrc/ package, which I 
> believe is very likely to originate from the /nlme/ package. I have 
> posted the question to StackOverflow if it is easier to read there:
>
> https://stackoverflow.com/questions/68626894/specifying-the-variance-covariance-matrix-for-random-effects-for-medrc-or-nlme
>  
> .
>
> I am using a 3-parameter log-logistic non-linear function
>
> and am including a species indicator variable based on whether my data 
> originates from humans (H) or rats (R). I am looking to specify a 
> blocked variance-covariance matrix for the random effects where 
> covariances are estimated for the off-diagonals of function parameters 
> within the same species, but not between species.
>
> I have attempted to estimate this vcov using the �medrm� function from 
> the /medrc/ package. While the notation is slightly different from the 
> �nlme� function, the estimation is performed in the same manner. I 
> have attempted to specify the random effect vcov using the 
> �'pdBlocked' function.
>
> M3b <- medrm(inhibition ~ concentration, curveid=b + d + e ~ species,� 
> data=OP,
>
> �random= 
> list(subject=pdBlocked(list(b~species, d~species, e~species))),
>
> �fct=LL.3(), control=c(drmc(method="CG"), 
> nlmeControl(msMaxIter = 150)))
>
> However, this results in almost the opposite of what I intended, 
> providing covariances within parameter type but across species (which 
> is non-sensical given that no subject can be both a human and a rat).
>
> Do you have any recommendations on how to fix this, ideally using one 
> of the existing pd-matrix functions?
>
> Thanks in advance for your reply.
>
> *Benjamin Davis, Ph.D.*
> Senior Scientist
> *Exponent*
> Direct +1-202-772-4942
> Email dav...@exponent.com 
>
> *Benjamin Davis, Ph.D.*
> Senior Scientist
> *Exponent*
> Direct +1-202-772-4942
> Email dav...@exponent.com 
>

[[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] Calculation of Age heaping

2021-08-08 Thread Avi Gross via R-help
It is not too clear to me what you want to do and why that package is the way 
to do it. Is the package a required part of your assignment? If so, maybe 
someone else can help you find how to properly install it on your machine, 
assuming you have permissions to replace the other package it seems to require. 
You may need to create your own environment. If you are open to other ways, see 
below.

Are you trying to do something as simple as counting how many people in your 
data are in various buckets such as each age truncated or rounded to an integer 
from 0 to 99? If so, you might miss some of my cousins alive at 100 or that 
died at 103 and 105 recently 

Or do you want ages in groups of 10 or so meaning the first of two digits is 0 
through 9?

Many such things can be done quite easily without the package if you wish.

As far as I can tell, your code reads in a data.frame from your local file with 
any number of columns that you do not specify. If it is one, the solution 
becomes much easier. You then for some reason feel the need to convert it to a 
matrix. You then do whatever your Whipple does several ways.

Here is an outline of ways you can do this yourself.

First, combine all your data into one or more vectors. You already have that in 
your data.frame but if all columns are numeric, you can of course do something 
with a matrix.

Then make sure you remove anything objectionable, such as negative numbers or 
numbers too large or NA or whatever your logic requires.

If you have a variable ready with N entries to hold the buckets, such as 
length(0:100) or for even buckets of 5, perhaps length(0:99)/5 you initialize 
that to all zeroes.

Now take your data, and perhaps transform it into a copy where every age is 
truncated to an integer or divided by 5 first or whatever you need so it 
contains a pure integer like 6 or 12. What I mean is if your buckets are 5 
wide, and you want 5:9 to map into one bucket, your transform might be 
as.integer(original/5.0) or one of many variants like that.

You can now simply use one of many methods in R to loop through your values 
that result and assuming you have a zeroed vector called counter and the 
current value being looked at is N, you simply increment counter[N] or of N-1 
or whatever your logic requires.

Alternately R has many built-in methods (or in other packages) like cut() that 
might do something similar without as much work.

And just for the heck of it, I tried your download instructions. Unlike your 
three choices, I was offered 13 choices and as I had no clue what YOU were 
supposed to download, I aborted.

 1: All   
2: CRAN packages only
3: None  
4: colorspace (2.0-1 -> 2.0-2) [CRAN]
5: isoband(0.2.4 -> 0.2.5) [CRAN]
6: utf8   (1.2.1 -> 1.2.2) [CRAN]
7: cli(3.0.0 -> 3.0.1) [CRAN]
8: ggplot2(3.3.3 -> 3.3.5) [CRAN]
9: pillar (1.6.1 -> 1.6.2) [CRAN]
10: tibble (3.1.2 -> 3.1.3) [CRAN]
11: dplyr  (1.0.6 -> 1.0.7) [CRAN]
12: Rcpp   (1.0.6 -> 1.0.7) [CRAN]
13: curl   (4.3.1 -> 4.3.2) [CRAN]
14: cpp11  (0.2.7 -> 0.3.1) [CRAN]

In your case, if you selected All, what exactly did you expect?


-Original Message-
From: R-help  On Behalf Of Md. Moyazzem Hossain
Sent: Sunday, August 8, 2021 5:25 PM
To: r-help@r-project.org
Subject: [R] Calculation of Age heaping

Dear R-expert,

I hope that you are doing well.

I am interested to calculate the age heaping for each digit (0,1,...,9) based 
on my data set. However, when I run the R code, I got the following errors. 
Please help me in this regard.

##
library(remotes)
install_github("timriffe/DemoTools")

###
Downloading GitHub repo timriffe/DemoTools@HEAD These packages have more recent 
versions available.
It is recommended to update all of them.
Which would you like to update?

 1: All
 2: CRAN packages only
 3: None

Enter one or more numbers, or an empty line to skip updates: 1

*After installing some packages, I got the following error message*

package ‘backports’ successfully unpacked and MD5 sums checked
Error: Failed to install 'DemoTools' from GitHub:
  (converted from warning) cannot remove prior installation of package 
‘backports’

I am attaching the R-code and data file along with this email.

Please help me in this regard.

Thanks in advance.
--
Best Regards,
Md. Moyazzem Hossain
Associate Professor
Department of Statistics
Jahangirnagar University
Savar, Dhaka-1342
Bangladesh
Website: http://www.juniv.edu/teachers/hossainmm
Research: *Google Scholar
*;
*ResearchGate
*; *ORCID iD
*

__
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 

[R] Calculation of Age heaping

2021-08-08 Thread Md. Moyazzem Hossain
Dear R-expert,

I hope that you are doing well.

I am interested to calculate the age heaping for each digit (0,1,...,9)
based on my data set. However, when I run the R code, I got the following
errors. Please help me in this regard.

##
library(remotes)
install_github("timriffe/DemoTools")

###
Downloading GitHub repo timriffe/DemoTools@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

 1: All
 2: CRAN packages only
 3: None

Enter one or more numbers, or an empty line to skip updates: 1

*After installing some packages, I got the following error message*

package ‘backports’ successfully unpacked and MD5 sums checked
Error: Failed to install 'DemoTools' from GitHub:
  (converted from warning) cannot remove prior installation of package
‘backports’

I am attaching the R-code and data file along with this email.

Please help me in this regard.

Thanks in advance.
-- 
Best Regards,
Md. Moyazzem Hossain
Associate Professor
Department of Statistics
Jahangirnagar University
Savar, Dhaka-1342
Bangladesh
Website: http://www.juniv.edu/teachers/hossainmm
Research: *Google Scholar
*;
*ResearchGate
*; *ORCID iD
*

###
library(remotes)
install_github("timriffe/DemoTools")

library(DemoTools)

###
Age <- 0:99
length(Age)

data=read.csv("D:/age.csv", header=FALSE)
pop1m_pasex=as.matrix(data)
length(pop1m_pasex)

w05 <- check_heaping_whipple(pop1m_pasex, Age, 25, 60, digit = c(0,5))

w0 <- check_heaping_whipple(pop1m_pasex, Age, 25, 60, digit = 0)
w5 <- check_heaping_whipple(pop1m_pasex, Age, 25, 60, digit = 5)

# Whipple types
w3=check_heaping_whipple(pop1m_pasex, Age, 25, 60, digit = 3)


__
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] No "doc" directory in my installation of R.

2021-08-08 Thread Duncan Murdoch



If you start R just using the regular command line version (not 
RStudio), does


  Sys.getenv("R_DOC_DIR")

point to /usr/share/R/doc ?  The standard R startup script should do 
that, but if it doesn't maybe you've got an override?


Or maybe you have R_DOC_DIR defined yourself?

Duncan Murdoch


On 07/08/2021 10:45 p.m., Rolf Turner wrote:


Should/shouldn't there be one?

My R seems to be installed in /usr/lib/R.  If do an "ls" of this
directory, I get:


bin/  COPYING@  etc/  lib/  library/  modules/
site-library/  SVN-REVISION


Definitely no "doc".

The (only) reason that I am concerned about this, is that I have decided
to experiment a bit with Rstudio, and it apparently wants a "doc"
directory.  When I try to start Rstudio I get a pop-up window with the
error message


R doc dir (/usr/local/lib64/R/doc) not found.


Note that /usr/local/lib64/R is a symbolic link to /usr/lib/R.
The latter is where my installation put R; the former seems to be where
Rstudio wants it to.  So I created the symbolic link.

The discrepancy between locations is another puzzle/worry.

My installation comes from a pre-built binary ("sudo apt install
r-base").  I apparently have the latest version.  I remark that I am
running Ubuntu 20.04 with a Mate 1.20.4 desktop.

How can I get a "doc" directory into my R directory and make Rstudio
happy?

cheers,

Rolf Turner

P.S. I have also tried to ask about this on the  Rstudio community
forum, but it seems to me to more of an R question than an Rstudio one.

R. T.

--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

__
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] No "doc" directory in my installation of R.

2021-08-08 Thread John Dougherty via R-help
On Sat, 7 Aug 2021 20:26:13 -0700 (PDT)
Jeff Newmiller  wrote:

Documentation on most Linux systems, regardless of release, is commonly
located under the /usr/share directory.  For R that is
/usr/share/doc/R.  There is also a "man" entry for R.  The rstudio help
list might be able to help more than this list.  

> R documentation on my Ubuntu 20.20 is in /usr/share/R/doc.
> 
> I see no doc directories in the locations you mention using
> 
>locate /doc/
> 
> Maybe you should be asking on R-sig-debian, perhaps with less noise
> about RStudio?
> 
> On Sun, 8 Aug 2021, Rolf Turner wrote:
> 
> >
> > Should/shouldn't there be one?
> >
> > My R seems to be installed in /usr/lib/R.  If do an "ls" of this
> > directory, I get:
> >  
> >> bin/  COPYING@ etc/  lib/  library/  modules/
> >> site-library/  SVN-REVISION  
> >
> > Definitely no "doc".
> >
> > The (only) reason that I am concerned about this, is that I have
> > decided to experiment a bit with Rstudio, and it apparently wants a
> > "doc" directory.  When I try to start Rstudio I get a pop-up window
> > with the error message
> >  
> >> R doc dir (/usr/local/lib64/R/doc) not found.  
> >
> > Note that /usr/local/lib64/R is a symbolic link to /usr/lib/R.
> > The latter is where my installation put R; the former seems to be
> > where Rstudio wants it to.  So I created the symbolic link.
> >
> > The discrepancy between locations is another puzzle/worry.
> >
> > My installation comes from a pre-built binary ("sudo apt install
> > r-base").  I apparently have the latest version.  I remark that I am
> > running Ubuntu 20.04 with a Mate 1.20.4 desktop.
> >
> > How can I get a "doc" directory into my R directory and make Rstudio
> > happy?
> >
> > cheers,
> >
> > Rolf Turner
> >
> > P.S. I have also tried to ask about this on the  Rstudio community
> > forum, but it seems to me to more of an R question than an Rstudio
> > one.
> >
> > R. T.
> >
> > --
> > Honorary Research Fellow
> > Department of Statistics
> > University of Auckland
> > Phone: +64-9-373-7599 ext. 88276
> >
> > __
> > 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. 
> 
> ---
> Jeff NewmillerThe .   .  Go
> Live... DCN:Basics: ##.#.
> ##.#.  Live Go... Live:   OO#.. Dead: OO#..  Playing
> Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
> /Software/Embedded Controllers)   .OO#.   .OO#.
> rocks...1k
> 
> __
> 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] HOW TO SOLVE THIS PROBLEM (RVALS)

2021-08-08 Thread Rui Barradas

Hello,

nobs is missing in your example.

Assuming that envelope is the function in package base boot, I cannot 
reproduce the error.



set.seed(2021)
nc <- 1
nobs <- 100
M1 <- matrix(evd::rfrechet(nc*nobs),nrow=nobs,ncol=nc)
M <- t(apply(M1,2,sort))
E <- boot::envelope(mat=M) #compute 95% confidance bands

str(E)
#List of 7
# $ point  : num [1:2, 1:100] 0.302 0.12 0.341 0.167 0.373 ...
# $ overall: num [1:2, 1:100] 0.3698 0.0832 0.4163 0.1287 0.4499 ...
# $ k.pt   : num [1:2] 250 9751
# $ err.pt : num [1:2] 0.05 0.562
# $ k.ov   : num [1:2] 11 9990
# $ err.ov : num [1:2] 0.0022 0.0496
# $ err.nom: num [1:2] 0.05 0.05


Hope this helps,

Rui Barradas


Às 08:53 de 07/08/21, SITI AISYAH ZAKARIA escreveu:

Hi,

Can anyone help me how to solve this problem?

  #calculation of confidence intervals
1. > nc <- 1
2. > M1 <- matrix(rfrechet(nc*nobs),nrow=nobs,ncol=nc)
3. > M <- t(apply(M1,2,sort))
4. > E <- envelope(mat=M) #compute 95% confidance bands
*Error in envelope.matrix(mat = M) : rvals must be supplied*

My problem is after I run my coding in line 4 the error is highlighted red
is come out. I don't know how to solve it. Please help me.

Thank you



__
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] HOW TO SOLVE THIS PROBLEM (RVALS)

2021-08-08 Thread SITI AISYAH ZAKARIA
Hi,

Can anyone help me how to solve this problem?

 #calculation of confidence intervals
1. > nc <- 1
2. > M1 <- matrix(rfrechet(nc*nobs),nrow=nobs,ncol=nc)
3. > M <- t(apply(M1,2,sort))
4. > E <- envelope(mat=M) #compute 95% confidance bands
*Error in envelope.matrix(mat = M) : rvals must be supplied*

My problem is after I run my coding in line 4 the error is highlighted red
is come out. I don't know how to solve it. Please help me.

Thank you

-- 





"..Millions of trees are used to make papers, only to be thrown away 
after a couple of minutes reading from them. Our planet is at stake. Please 
be considerate. THINK TWICE BEFORE PRINTING THIS.."

DISCLAIMER: This email \ and any files transmitte...{{dropped:24}}

__
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] Markov modeling using msm

2021-08-08 Thread H
On 08/08/2021 03:43 AM, Rui Barradas wrote:
> Hello,
>
> There are CRAN packages, for instance, packages DTMCPack and markovchain, 
> that require transition probabilities as input. See this R-bloggers post [1].
>
>
> [1] https://www.r-bloggers.com/2016/01/getting-started-with-markov-chains/
>
>
> Hope this helps,
>
> Rui Barradas
>
> Às 02:21 de 08/08/21, H escreveu:
>> I would like to use R and msm to replicate the results from a published 
>> study where the authors used Tree Age Pro 2011 for their Markov modeling. I 
>> am new to Markov modeling and while I have tried to read up, my 
>> understanding is still quite limited...
>>
>> The papers contains the the state transition probabilities but it seems to 
>> me that msm requires transition intensities rather than transition 
>> probabilities. Is this correct?
>>
>> If so, the msm documentation suggests that msm can output transition 
>> probabilities but is there any way I can do the reverse, ie input transition 
>> probabilities into my msm model?
>>
>> Appreciate any pointers.
>>
>> __
>> 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.
>>
Thank you, will check those out!

__
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] No "doc" directory in my installation of R.

2021-08-08 Thread Rui Barradas

Hello,

R 4.1.0 on Ubuntu 20.04.
My ls command on /usr/lib/R on my home computer gives what Rolf posted, 
so I agree with every body that this is not an R issue and would insist 
with RStudio and ask for their help again. They are generally helpful, btw.


I follow installation instructions to the letter and have never had any 
problems like this one. If the installation of R seems OK, have you 
tried to uninstall and reinstall RStudio?



rui@rui:~$ ls /usr/lib/R
bin  COPYING  etc  lib  library  modules  site-library  SVN-REVISION
rui@rui:~$ ls /usr/share/R
debian  doc  include  share


Hope this helps,

Rui Barradas


Às 14:15 de 08/08/21, Duncan Murdoch escreveu:
Jeff pointed out where the doc directory is installed in Ubuntu: 
/usr/share/R/doc.  So this is definitely an RStudio issue:  perhaps it 
got "tweaked", or perhaps Rolf installed a version meant for some other 
distribution.  In either case, off-topic in R-help, I think.


Duncan Murdoch

On 08/08/2021 8:51 a.m., John Kane wrote:

R version 4.1.0 (2021-05-18)
RStudio 1.4.1714
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS

I do not see a doc folder at R level but a lot of newer packages,
probably tidyverse derived seem to have a doc sub-folder containing
documentation files

For example corrplot has a doc subfolder containing
corrplot-intro.html
corrplot-intro.R
corrplot-intro.Rmd
index.html

Jim Lemon's suggestion seems worth trying but I really think this is
some RStudio weirdity. I have been using RStudio for 3-4 years and a
several complete installations on new machines and tave never seen
anything like "R doc dir (/usr/local/lib64/R/doc) not found".

RStudio keeps getting tweaked.



On Sun, 8 Aug 2021 at 00:30, Jim Lemon  wrote:


Hi Rolf,
What about:

mkdir /usr/lib/R/doc

Jim

On Sun, Aug 8, 2021 at 12:45 PM Rolf Turner  
wrote:



Should/shouldn't there be one?

My R seems to be installed in /usr/lib/R.  If do an "ls" of this
directory, I get:


bin/  COPYING@    etc/  lib/  library/  modules/
site-library/  SVN-REVISION


Definitely no "doc".

The (only) reason that I am concerned about this, is that I have 
decided

to experiment a bit with Rstudio, and it apparently wants a "doc"
directory.  When I try to start Rstudio I get a pop-up window with the
error message


R doc dir (/usr/local/lib64/R/doc) not found.


Note that /usr/local/lib64/R is a symbolic link to /usr/lib/R.
The latter is where my installation put R; the former seems to be where
Rstudio wants it to.  So I created the symbolic link.

The discrepancy between locations is another puzzle/worry.

My installation comes from a pre-built binary ("sudo apt install
r-base").  I apparently have the latest version.  I remark that I am
running Ubuntu 20.04 with a Mate 1.20.4 desktop.

How can I get a "doc" directory into my R directory and make Rstudio
happy?

cheers,

Rolf Turner

P.S. I have also tried to ask about this on the  Rstudio community
forum, but it seems to me to more of an R question than an Rstudio one.

R. T.

--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

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


__
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] No "doc" directory in my installation of R.

2021-08-08 Thread Duncan Murdoch
Jeff pointed out where the doc directory is installed in Ubuntu: 
/usr/share/R/doc.  So this is definitely an RStudio issue:  perhaps it 
got "tweaked", or perhaps Rolf installed a version meant for some other 
distribution.  In either case, off-topic in R-help, I think.


Duncan Murdoch

On 08/08/2021 8:51 a.m., John Kane wrote:

R version 4.1.0 (2021-05-18)
RStudio 1.4.1714
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS

I do not see a doc folder at R level but a lot of newer packages,
probably tidyverse derived seem to have a doc sub-folder containing
documentation files

For example corrplot has a doc subfolder containing
corrplot-intro.html
corrplot-intro.R
corrplot-intro.Rmd
index.html

Jim Lemon's suggestion seems worth trying but I really think this is
some RStudio weirdity. I have been using RStudio for 3-4 years and a
several complete installations on new machines and tave never seen
anything like "R doc dir (/usr/local/lib64/R/doc) not found".

RStudio keeps getting tweaked.



On Sun, 8 Aug 2021 at 00:30, Jim Lemon  wrote:


Hi Rolf,
What about:

mkdir /usr/lib/R/doc

Jim

On Sun, Aug 8, 2021 at 12:45 PM Rolf Turner  wrote:



Should/shouldn't there be one?

My R seems to be installed in /usr/lib/R.  If do an "ls" of this
directory, I get:


bin/  COPYING@etc/  lib/  library/  modules/
site-library/  SVN-REVISION


Definitely no "doc".

The (only) reason that I am concerned about this, is that I have decided
to experiment a bit with Rstudio, and it apparently wants a "doc"
directory.  When I try to start Rstudio I get a pop-up window with the
error message


R doc dir (/usr/local/lib64/R/doc) not found.


Note that /usr/local/lib64/R is a symbolic link to /usr/lib/R.
The latter is where my installation put R; the former seems to be where
Rstudio wants it to.  So I created the symbolic link.

The discrepancy between locations is another puzzle/worry.

My installation comes from a pre-built binary ("sudo apt install
r-base").  I apparently have the latest version.  I remark that I am
running Ubuntu 20.04 with a Mate 1.20.4 desktop.

How can I get a "doc" directory into my R directory and make Rstudio
happy?

cheers,

Rolf Turner

P.S. I have also tried to ask about this on the  Rstudio community
forum, but it seems to me to more of an R question than an Rstudio one.

R. T.

--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

__
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] No "doc" directory in my installation of R.

2021-08-08 Thread John Kane
R version 4.1.0 (2021-05-18)
RStudio 1.4.1714
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS

I do not see a doc folder at R level but a lot of newer packages,
probably tidyverse derived seem to have a doc sub-folder containing
documentation files

For example corrplot has a doc subfolder containing
corrplot-intro.html
corrplot-intro.R
corrplot-intro.Rmd
index.html

Jim Lemon's suggestion seems worth trying but I really think this is
some RStudio weirdity. I have been using RStudio for 3-4 years and a
several complete installations on new machines and tave never seen
anything like "R doc dir (/usr/local/lib64/R/doc) not found".

RStudio keeps getting tweaked.



On Sun, 8 Aug 2021 at 00:30, Jim Lemon  wrote:
>
> Hi Rolf,
> What about:
>
> mkdir /usr/lib/R/doc
>
> Jim
>
> On Sun, Aug 8, 2021 at 12:45 PM Rolf Turner  wrote:
> >
> >
> > Should/shouldn't there be one?
> >
> > My R seems to be installed in /usr/lib/R.  If do an "ls" of this
> > directory, I get:
> >
> > > bin/  COPYING@etc/  lib/  library/  modules/
> > > site-library/  SVN-REVISION
> >
> > Definitely no "doc".
> >
> > The (only) reason that I am concerned about this, is that I have decided
> > to experiment a bit with Rstudio, and it apparently wants a "doc"
> > directory.  When I try to start Rstudio I get a pop-up window with the
> > error message
> >
> > > R doc dir (/usr/local/lib64/R/doc) not found.
> >
> > Note that /usr/local/lib64/R is a symbolic link to /usr/lib/R.
> > The latter is where my installation put R; the former seems to be where
> > Rstudio wants it to.  So I created the symbolic link.
> >
> > The discrepancy between locations is another puzzle/worry.
> >
> > My installation comes from a pre-built binary ("sudo apt install
> > r-base").  I apparently have the latest version.  I remark that I am
> > running Ubuntu 20.04 with a Mate 1.20.4 desktop.
> >
> > How can I get a "doc" directory into my R directory and make Rstudio
> > happy?
> >
> > cheers,
> >
> > Rolf Turner
> >
> > P.S. I have also tried to ask about this on the  Rstudio community
> > forum, but it seems to me to more of an R question than an Rstudio one.
> >
> > R. T.
> >
> > --
> > Honorary Research Fellow
> > Department of Statistics
> > University of Auckland
> > Phone: +64-9-373-7599 ext. 88276
> >
> > __
> > 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.



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


Re: [R] Markov modeling using msm

2021-08-08 Thread Rui Barradas

Hello,

There are CRAN packages, for instance, packages DTMCPack and 
markovchain, that require transition probabilities as input. See this 
R-bloggers post [1].



[1] https://www.r-bloggers.com/2016/01/getting-started-with-markov-chains/


Hope this helps,

Rui Barradas

Às 02:21 de 08/08/21, H escreveu:

I would like to use R and msm to replicate the results from a published study 
where the authors used Tree Age Pro 2011 for their Markov modeling. I am new to 
Markov modeling and while I have tried to read up, my understanding is still 
quite limited...

The papers contains the the state transition probabilities but it seems to me 
that msm requires transition intensities rather than transition probabilities. 
Is this correct?

If so, the msm documentation suggests that msm can output transition 
probabilities but is there any way I can do the reverse, ie input transition 
probabilities into my msm model?

Appreciate any pointers.

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