[R-pkg-devel] Interplay between knitr() and View()

Roy Mendelssohn - NOAA Federal roy.mendelssohn at noaa.gov
Thu Apr 20 16:41:21 CEST 2017


Thanks all for the suggestions.

If I have screenshots in the Vignette, where should I put the picture files - in the vignette folder (this is so it will work when submitted to CRAN)?

As for why display the result,  just a design decision. Sometimes it makes sense to display right away the results of a query, particularly if a lot of the users are not that familiar with R.  I will look into DT::datatable,  but that means one more package I have to suggest and make certain that I stay current with.

What I liked about View() is often the table is quite big, and View() provides scroll bars and nice headers that make it easy to look over the results.

-Roy

> On Apr 20, 2017, at 12:45 AM, David Hugh-Jones <davidhughjones at gmail.com> wrote:
> 
> 
> Two questions:
> 
> 1. If your package definitely needs to call View(), and you want to explain how that will look, then why not show one or more screenshots in your documentation?
> 
> 2. Why does your package need to call View? Why can't it return the metadata as a data frame, and let the user do what he wants with it himself - using View(), head(), or any other tool?
> 
> Cheers
> D
> 
> 
> 
> 
> 
> > Hi All:
> >
> > My package allows the user to search for information about the data
> > available, and the information is returned in a dataframe. I had long been
> > looking for a nice way to display the results  (the datasets' metadata),
> > and wasn't too happy with anything until I tried the View() command,  which
> > does exactly what I want.
> >
> > The problem is I can't seem to find a way to make View() and knitr() work
> > nice together in creating the vignette. Given the way View() works I doubt
> > there is a way,  but any suggestions of how I can show what the user will
> > see when the given the command in the package from within my vignette?
> >
> > Thanks,
> >
> > -Roy
> >
> >
> >
> > **********************
> > "The contents of this message do not reflect any position of the U.S.
> > Government or NOAA."
> > **********************
> > Roy Mendelssohn
> > Supervisory Operations Research Analyst
> > NOAA/NMFS
> > Environmental Research Division
> > Southwest Fisheries Science Center
> > ***Note new street address***
> > 110 McAllister Way
> > Santa Cruz, CA 95060
> > Phone: (831)-420-3666
> > Fax: (831) 420-3980
> > e-mail: Roy.Mendelssohn at noaa.gov www: http://www.pfeg.noaa.gov/
> >
> > "Old age and treachery will overcome youth and skill."
> > "From those who have been given much, much will be expected"
> > "the arc of the moral universe is long, but it bends toward justice" -MLK
> > Jr.
> >
> > ______________________________________________
> > R-package-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >
> 
>         [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> -- 
> Sent from Gmail Mobile

**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
***Note new street address***
110 McAllister Way
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: Roy.Mendelssohn at noaa.gov www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.



More information about the R-package-devel mailing list