[ESS] ESS, devtools, and documentation

Timothy W. Hilton thilton at ucmerced.edu
Fri Oct 17 20:51:14 CEST 2014


Hi Vitalie,

print(help("Park_Falls")) successfully displays the help text in the R
session window.  This helps a lot; thanks for the suggestion.  Now I can
access my docs to refresh my memory how I meant for things to work when
I was last working on the package.

As for a reproducible example, I'm happy to send you my package if you
like.  I did an experiment this morning, though, and the same thing
happens if I download the source for ggplot2
(http://cran.cnr.berkeley.edu/src/contrib/ggplot2_1.0.0.tar.gz), extract
the tarball, load it using devtools, and try to access its documentation
within ESS.

in a new R session:
library(devtools)
load_all('/Users/tim/Software/ggplot2')

Now choosing at random the 'coord_trans' function, all three of

?coord_trans
help(coord_trans)
C-c C-v coord_trans

produce "No documentation for ‘coord_trans’ in specified packages and
libraries:" in the minibuffer.

print(help(coord_trans)) 

displays the help in the R command window buffer, as expected.

Thanks for looking into this, and as always, thanks for your work on
ESS!

best,
Tim

On Thu, Oct 2014, 16 at 06:38:07PM -0700, Vitalie Spinu wrote:
> 
> Strange. Would be nice to have a reproducible example.
> 
> From ESS, what do you see when you do
> 
>   print(help("Park_Falls"))
> 
>  Vitalie
> 
>  >>> "Timothy W. Hilton" on Thu, 16 Oct 2014 09:50:44 -0700 wrote:
> 
>  > Hi Vitalie,
>  > Thanks for your quick response!  I meant that it works when I start R
>  > within my terminal (iTerm2 on my mac), but I just checked and it also
>  > does work when I start R within emacs shell prompt (aka M-x shell)
>  > (transcript below).
> 
>  > Thanks,
>  > Tim
> 
>  > ==================================================
>  > tim at ucmerced007-206 ~/work/Code/VPRM
>  >   % R
>  > R
>  > ]2;R]1;R
>  > R version 3.1.1 (2014-07-10) -- "Sock it to Me"
>  > Copyright (C) 2014 The R Foundation for Statistical Computing
>  > Platform: x86_64-apple-darwin13.1.0 (64-bit)
> 
>  > R is free software and comes with ABSOLUTELY NO WARRANTY.
>  > You are welcome to redistribute it under certain conditions.
>  > Type 'license()' or 'licence()' for distribution details.
> 
>  >   Natural language support but running in an English locale
> 
>  > R is a collaborative project with many contributors.
>  > Type 'contributors()' for more information and
>  > 'citation()' on how to cite R or R packages in publications.
> 
>  > Type 'demo()' for some demos, 'help()' for on-line help, or
>  > 'help.start()' for an HTML browser interface to help.
>  > Type 'q()' to quit R.
> 
>  >> library(devtools)
>  > library(devtools)
>  >> load_all('VPRM_Rpkg')
>  > load_all('VPRM_Rpkg')
>  > Loading VPRMLandSfcModel
>  >> ?Park_Falls
>  > ?Park_Falls
>  > WARNING: terminal is not fully functional
>  > -  (press RETURN)
>  > Park_Falls              package:VPRM_Rpkg              R Documentation
> 
>  > Park Falls, Wisconsin, USA eddy covariance data and MODIS data
> 
>  > Description:
> 
>  >      The dataset Park_Falls contains MODIS observations as well as
>  >      ground-based eddy covariance flux tower data for the Ameriflux
>  >      tall tower located in Park Falls, Wisconsin, USA.  The data span
>  >      the period 1 May 2005 through 31 July 2005.
> 
>  > etc., etc.
>  > ==================================================
> 
>  > On Thu, Oct 2014, 16 at 09:46:29AM -0700, Vitalie Spinu wrote:
>  >> 
>  >> There should be no difference.
>  >> 
>  >> Do you mean that it works in emacs shell prompt (aka M-x shell)?
>  >> 
>  >> Vitalie
>  >> 
>  >> >>> "Timothy W. Hilton" on Thu, 16 Oct 2014 09:25:41 -0700 wrote:
>  >> 
>  >> > Hi,
>  >> > I'm unable to access documentation for an R package I'm developing while
>  >> > using devtools within ESS.  Starting R within ESS and attempting to
>  >> > access some docs that I wrote:
>  >> 
>  >> > M-x R
>  >> >> library(devtools)
>  >> >> load_all('VPRM_Rpckg')
>  >> >> ?Park_Falls
>  >> 
>  >> > A message then appears in the minibuffer:
>  >> > No documentation for ‘Park_Falls’ in specified packages and libraries:
>  >> 
>  >> > If I start R from the shell prompt the above sequence displays the
>  >> > documentation for Park_Falls, as expected.
>  >> 
>  >> > ess-version: 14.09 [svn: 6041 (2014-09-13)] (loaded from /Users/tim/.emacs.d/ess-14.09/)
>  >> > GNU Emacs 24.3.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of
>  >> > 2014-10-08 on Timothys-MacBook-Air.local
>  >> 
>  >> > Any advice much appreciated!  I really love coding in ESS but accessing
>  >> > my own documentation is pretty important to me as I try to finalize this
>  >> > package I'm working on.
>  >> 
>  >> > As always, thanks for making the excellent ESS available to the
>  >> > community!
>  >> 
>  >> > best,
>  >> > Tim
>  >> 
>  >> > --
>  >> 
>  >> > Timothy W. Hilton
>  >> > Assistant Project Scientist
>  >> > School of Engineering
>  >> > University of California, Merced
>  >> > thilton at ucmerced.edu
>  >> 
>  >> > ______________________________________________
>  >> > ESS-help at r-project.org mailing list
>  >> > https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list