Does Geshi support the R programming language?
This table (Geshi for MediaWiki) does not list R, so I guess the answer is no, but I just wanted to check. Is there any programming language with a similar sintax that could help highlight, at least partially, the syntax of an R script/function?
Thanks
Edit
rsplus was removed from the table linked to by the OP on 14 April with the commit note: Not supported by this installation.
Not sure what that means, but Geshi has supported R in the past, though I note it is not listed on the Geshi website front page. It was added to Geshi in version 1.0.8.5 (as indicated from the CHANGES file (snippet thereof):
Version 1.0.8.5
- Added language files
* AutoHotkey (Naveen Garg)
* Awk (George Pollard)
* GADV 4CS (Jason Curl)
* jQuery (Rob Loach)
* PowerBuilder (Doug Porter)
* PureBasic (Gustavo Julio Fiorenza)
* R / S+ (Ron Fredericks, Benilton Carvalho)
....
And there is no indication it was removed at a later date.
So it appears Geshi itself supports R, but perhaps the Mediawiki plugin doesn't yet?
Original
You did read the list fully, didn't you? ;-)
It is listed in the second column under the moniker rsplus.
Related
I am sending a test case where the second
"\f$" item is replaced with the previous "\f["
(using 1.8.13)
(It could be some temporary filename issue:
the replacement can also be some fragment that already gone)
/*!
* \f[
* \frac{dV_m}{dt} = \sum_{i=0}^{n} g{sin,i}(t)\frac{E_{sin,i}-V_{m}}{C} + \frac{V_{rest}-V_{m}}{RC}
* \f]
* The routine replaces \f$ dt \f$ with \f$ \Delta t \f$
*/
Doxygen 1.8.13 is from December 2016, the current version is 1.8.20.
The question lacks very important information: what is the problem, which output format is used, which other doxygen settings are used.
Seen this it is hard to tell what goes wrong but some ideas.
Version 1.8.13 might have problems with newer versions of LaTeX (like giving: Error: /undefinedfilename in (_form0.ps)).
Solutions for this:
use MathJax for rendering formulas (in HTML), by setting USE_MATHJAX=YES
upgrade to a newer version of doxygen
downgrade the LaTeX version
I'm writing an R package making use of Rcpp to call functions written in C++ into the R code. Some of these functions and templates are written in files with a .hpp extension following the convention used by boost (and also discussed here).
This does not result in an error when building (R CMD build .) and checking (R CMD check --as-cran package.tar.gz) the package, but it returns the next warning:
Subdirectory ‘src’ contains:
file.hpp example.hpp
These are unlikely file names for src files
Ok, this is not a big issue, but my concern is, why the warning? is naming *hpp files considered a bad practice in the R community? Are there objective or community reasons why I should use *cpp/*h files instead of *hpp for the templates?
I originally left this information as a comment, but realized it actually answers your question I think, so here goes:
As Dirk Eddelbuettel points out in the comments, when you have a question about an R Core Team policy on R extension packages, your best bet is to look through their excellent Writing R Extensions manual. This manual tells you almost anything you could ever need to know.
In your case specifically, you needed to look at Section 1.1.5, which explains that "[the R Core Team] recommend[s] using .h for headers" because (as they explain in footnote 18) "Using .hpp is not guaranteed to be portable."
I have a package on CRAN that I would like to add a ChangeLog for, but I cannot find information anywhere on how to do this.
I looked on the "Writing R Extensions" document that CRAN provides, but it only mentions ChangeLogs and gives no direction (I could find) about how to create one.
I noticed from downloading tarballs from other packages on CRAN (e.g. seacarb) that their ChangeLogs are Unix Executable Files (I'm on a Mac) so that's not too helpful.
I imagine this is a common problem, but Googling "changelog R package" just brings up ChangeLogs for really popular packages...
You can either provide a NEWS file or a ChangeLog file, or both, to describe changes in your package. You have to add these files in the top level folder of your project, i.e. in the same folder as your DESCRIPTION and NAMESPACE.
This is documented in the R package manual in paragraph 1.1 Package structure. In particular, this paragraph points to the GNU standard:
For the conventions for files NEWS and ChangeLog in the GNU project see http://www.gnu.org/prep/standards/standards.html#Documentation.
Hadley points out that "Generally you should use a NEWS file, and not ChangeLog. I think the purpose of ChangeLog (to list every change), has been subsumed by source code control".
To create a NEWS file, simply create a text file called NEWS in the top level folder of your package. You maintain this file by hand.
Here is an extract from the NEWS file from my package miniCRAN (CRAN link):
miniCRAN v0.0-21 (Release date: 2014-08-18)
==============
Changes:
* Changes to defaults in plot.pkgDepGraph() to move legend to left of plot area.
miniCRAN v0.0-20 (Release date: 2014-08-18)
==============
Changes:
* Modified examples to reduce running time, mostly using \dontrun{} sections
NEWS.md files are now also supported by CRAN (Which renders them as html) and more recently by the news() function.
https://cran.r-project.org/doc/manuals/r-devel/NEWS.html
If you are following this and opting for NEWS.md then make sure news() reads the same correctly (at the same time it looks great on GitHub).
You can do the same in your local builds of the packages.
It seems like it has a specific format you have to adhere with.
I tried like this (and it works) (check here)
# *News*
# tidycells 0.1.9 (2019-07-31)
## Initial Submission
* **CRAN** Initial Submission
# tidycells 0.1.5 (2019-07-30)
## Final Codebase Release in GitHub
* Final Release in GitHub for **CRAN** Submission
* Only Minor Documentation Change after this and before next **CRAN** Submission
# tidycells 0.1.0 (2019-07-25)
## Initial Release to GitHub
* Initial Release to GitHub
* Prior to this it was private package
I'm looking for some LaTeX template for creating quality output. On R-bloggers I've bumped on Frank Harrel's Rreport package. Due to my quite modest LaTeX abilities, only a user-friendly (and noob-friendly) interface should suffice. Here's a link to an official website. I'm following the instructions, but I cannot manage to install an app. I use Ubuntu 9.10, R version is 2.10.1 (updated regularly from UCLA's CRAN server), and of course, cvs is installed on my system.
Now, I'd like to know if there is some user-friendly LaTeX template package (Sweave is still to advanced/spartan for me). I'm aware that my question is quite confounding, but a brief glance on examples on Rreport page should give you a hint. I'm aware that LaTeX skills are a must, but just for now I need something that will suit my needs (as a psychological researcher).
Is there any package similar with Rreport?
lyx? http://www.lyx.org/
On Ubuntu:
sudo apt-get install lyx
From the lyx page:
LyX combines the power and flexibility
of TeX/LaTeX with the ease of use of a
graphical interface. This results in
world-class support for creation of
mathematical content (via a fully
integrated equation editor) and
structured documents like academic
articles, theses, and books.
If you want to produce Latex with a simpler markup you could use the ASCII package that has a Sweave driver that can be used with reSTructured text, which can then be converted to Latex. Although I would only use it if you want to be able to convert the same doc also to html or odf. In any case it is a good idea to learn the basic Latex.
The online text processor zoho allows export to latex. Maybe this can be helpful to learn latex, but I do not know how to integrate Sweave/R in this. (I did not work with zoho, by the way).
I'd like to create a zip archive from within R, and need maximal cross-platform compatibility, so I would prefer not to use a system("zip") command.
Within utils there's zip.file.extract (aka unzip), which uses [a lot of] c code, derived from zlib 1.1.3 within a file called dounzip.c I couldn't find any similar capabilities for creating zip files.
It's also tricky to construct a specific google query for "cran create zip" or equivalent!
Also, a tar will not suffice, I need to creating zip's to use as input for another set of non-R tools.
I'd appreciate any pointers?
cheers,
mark
As usual the amazing Omega Project for Statistical Computing is a valuable resource! Take a look at the Rcompression package and try, for example, something like:
?gzip
txt <- paste(rep("This is a string", 40), collapse = "\n")
v <- gzip(txt))
writeBin(v, "test.txt.zip")
HTH
I think the command gzfile() may also do what you're looking for. Also note that in the upcoming version 2.10.0 there are some enhancements to compression functions that may be relevant. (see https://svn.r-project.org/R/trunk/NEWS -- the svn server may ask you to accept a certificate)