[R-pkg-devel] Compiling with more than one compiler in package development
Hello! I'm not sure if this appeared, so I thought I would try again. I am building a package on a RedHat supercomputer, using the gcc/gfortran and the accompanying mpi (MPICH) compilers. Here is the Makefile: PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) all: rmpigFortr.so tria.so rmpigFortr.so: mpifort -fPIC -c rmpigFortr.f90 -ormpigFortr.o mpifort -shared rmpigFortr.o -o rmpigFortr.so tria.so: gfortran -m64 -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexcep\ tions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches \ -m64 -mtune=generic -c tria.f90 -o tria.o gfortran -m64 -shared -L/usr/lib64/R/lib -Wl,-z,relro -o tria.so tria.o\ -L/usr/lib64/R/lib -lR Here is the NAMESPACE: # Generated by roxygen2: fake comment so roxygen2 overwrites silently. exportPattern("^[^\\.]") useDynLib(rmpigFortr) useDynLib(tria) When I build, check, and install the package, it seems to be fine. However, I have an R function that calls that "tria" Fortran subroutine. Here are the results: > library(rmpigFortr) > za <- tri(n=1000) Error in .Fortran("tria", as.single(y), as.integer(n)) : "tria" not resolved from current namespace (rmpigFortr) > But if I type in the call to .Fortran myself, it works. Any idea what I might be doing wrong, please? Thanks in advance, Sincerely, Erin -- Erin Hodgess Associate Professor Department of Mathematical and Statistics University of Houston - Downtown mailto: erinm.hodg...@gmail.com [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] Producing ß in help files.
In a help file that I am writing I wish to cite an item by a bloke whose surname is Weiß. In LaTeX I would use the macro \ss, but Rd files don't accept that. Is there any way that I can create the ß symbol in a help file? I've done a bit of web-searching and found nothing helpful. Of course I could just write "Weiss", but that's *so* non-U! :-) Thanks for any ideas. cheers, Rolf Turner -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Producing ß in help files.
On 2018-01-05 20:52, Rolf Turner wrote: In a help file that I am writing I wish to cite an item by a bloke whose surname is Weiß. Write it "Weiss". See "https://en.wikipedia.org/wiki/%C3%9F";. That name is written "Weiss" in Switzerland and Liechtenstein but "Weiß" in Germany and Austria. German is the official language of Liechtenstein and the primary of four official languages of Switzerland. Standard high German has several characters that are not used in English but have standard transliterations using the English latin alphabet. These include "ß" = "ss", "ä" = "ae", "ö" = "oe" and "ü" = "ue". Spencer Graves In LaTeX I would use the macro \ss, but Rd files don't accept that. Is there any way that I can create the ß symbol in a help file? I've done a bit of web-searching and found nothing helpful. Of course I could just write "Weiss", but that's *so* non-U! :-) Thanks for any ideas. cheers, Rolf Turner __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Producing ß in help files.
On 06/01/18 16:19, Spencer Graves wrote: On 2018-01-05 20:52, Rolf Turner wrote: In a help file that I am writing I wish to cite an item by a bloke whose surname is Weiß. Write it "Weiss". See "https://en.wikipedia.org/wiki/%C3%9F";. That name is written "Weiss" in Switzerland and Liechtenstein but "Weiß" in Germany and Austria. German is the official language of Liechtenstein and the primary of four official languages of Switzerland. Standard high German has several characters that are not used in English but have standard transliterations using the English latin alphabet. These include "ß" = "ss", "ä" = "ae", "ö" = "oe" and "ü" = "ue". I'm sure that you're correct, but I find it frustrating not to be able to produce a symbol (which is readily available elsewhere --- e.g. in LaTeX or from the keyboard using the "compose key") under the ".Rd" system. I'd like to be *able to produce it*, even if I shouldn't! :-) cheers, Rolf P. S. It also seems to me to be polite --- if that's the way the bloke writes his name, then that's the way that I ought to write it when referring to him. R. -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Producing ß in help files.
On 2018-01-05 21:41, Rolf Turner wrote: On 06/01/18 16:19, Spencer Graves wrote: On 2018-01-05 20:52, Rolf Turner wrote: In a help file that I am writing I wish to cite an item by a bloke whose surname is Weiß. Write it "Weiss". See "https://en.wikipedia.org/wiki/%C3%9F";. That name is written "Weiss" in Switzerland and Liechtenstein but "Weiß" in Germany and Austria. German is the official language of Liechtenstein and the primary of four official languages of Switzerland. Standard high German has several characters that are not used in English but have standard transliterations using the English latin alphabet. These include "ß" = "ss", "ä" = "ae", "ö" = "oe" and "ü" = "ue". I'm sure that you're correct, but I find it frustrating not to be able to produce a symbol (which is readily available elsewhere --- e.g. in LaTeX or from the keyboard using the "compose key") under the ".Rd" system. I'd like to be *able to produce it*, even if I shouldn't! :-) cheers, Rolf P. S. It also seems to me to be polite --- if that's the way the bloke writes his name, then that's the way that I ought to write it when referring to him. Agreed -- except that people who have not studied German would not recognize "ß" as sounding like "ss": They might want to pronounce it "Weib" -- old German for "woman", though transliterated as "wife" -- very different from "Weiß" = "White". "Solzhenitsyn" is the English and Spanish transliteration of a name that appears in German as "Solschenizyn", French as "Soljenitsyne", and Russian as "Солженицын", according to Wikipedia (https://en.wikipedia.org/wiki/Aleksandr_Solzhenitsyn). Hope this helps. spencer R. __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Producing ß in help files.
On Sat, Jan 6, 2018 at 11:41 AM, Rolf Turner wrote: > On 06/01/18 16:19, Spencer Graves wrote: >> >> >> >> On 2018-01-05 20:52, Rolf Turner wrote: >>> >>> >>> In a help file that I am writing I wish to cite an item by a bloke whose >>> surname is Weiß. >> >> >> >>Write it "Weiss". >> >> >>See "https://en.wikipedia.org/wiki/%C3%9F";. >> >> >>That name is written "Weiss" in Switzerland and Liechtenstein but >> "Weiß" in Germany and Austria. German is the official language of >> Liechtenstein and the primary of four official languages of Switzerland. >> >> >>Standard high German has several characters that are not used in >> English but have standard transliterations using the English latin alphabet. >> These include "ß" = "ss", "ä" = "ae", "ö" = "oe" and "ü" = "ue". > > > > > I'm sure that you're correct, but I find it frustrating not to be able to > produce a symbol (which is readily available elsewhere --- e.g. in LaTeX or > from the keyboard using the "compose key") under the ".Rd" system. I'd like > to be *able to produce it*, even if I shouldn't! :-) > > cheers, > > Rolf > > P. S. It also seems to me to be polite --- if that's the way the bloke > writes his name, then that's the way that I ought to write it when > referring to him. > > R. > > -- > Technical Editor ANZJS > Department of Statistics > University of Auckland > Phone: +64-9-373-7599 ext. 88276 > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel You could define a new macro in the Rd file (untested): \newcommand{\ss}{\ifelse{latex}{\ss}{\ifelse{html}{\out{ß}}{ss}}} That would use "\ss" in LaTeX, "ß" in HTML, and "ss" in plain text rendering. Or, add \encoding{UTF-8} to the Rd file and ß is available in plain text: \newcommand{\ss}{\ifelse{latex}{\ss}{\ifelse{html}{\out{ß}}{ß}}} __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Producing ß in help files.
And just writing it with a declared encoding in the Rd file des not work? Section 2.14 in WRE tells us that \encoding{} can declare anm encoding and "For convenience, encoding names ‘latin1’ and ‘latin2’ are always recognized: these and ‘UTF-8’ are likely to work fairly widely. However, this does not mean that all characters in UTF-8 will be recognized, and the coverage of non-Latin characters10 is fairly low. Using LATEX inputenx (see ?Rd2pdf in R) will give greater coverage of UTF-8. The \enc command (see Section 2.8 [Insertions], page 75) can be used to provide transliterations which will be used in conversions that do not support the declared encoding." And Secion 2.8 tells us Text which might need to be represented differently in different encodings should be marked by \enc, e.g. \enc{Jöreskog}{Joreskog} (with no whitespace between the braces) where the first argument will be used where encodings are allowed and the second should be ASCII (and is used for e.g. the text conversion in locales that cannot represent the encoded form). (This is intended to be used for individual words, not whole sentences or paragraphs.) Hence a preamble with, e.g. \encoding{latin1} or \encoding{UTF-8} and later writing \enc{Weiß}{Weiss} seems most appropriate here. Best, Uwe Ligges On 06.01.2018 04:41, Rolf Turner wrote: On 06/01/18 16:19, Spencer Graves wrote: On 2018-01-05 20:52, Rolf Turner wrote: In a help file that I am writing I wish to cite an item by a bloke whose surname is Weiß. Write it "Weiss". See "https://en.wikipedia.org/wiki/%C3%9F";. That name is written "Weiss" in Switzerland and Liechtenstein but "Weiß" in Germany and Austria. German is the official language of Liechtenstein and the primary of four official languages of Switzerland. Standard high German has several characters that are not used in English but have standard transliterations using the English latin alphabet. These include "ß" = "ss", "ä" = "ae", "ö" = "oe" and "ü" = "ue". I'm sure that you're correct, but I find it frustrating not to be able to produce a symbol (which is readily available elsewhere --- e.g. in LaTeX or from the keyboard using the "compose key") under the ".Rd" system. I'd like to be *able to produce it*, even if I shouldn't! :-) cheers, Rolf P. S. It also seems to me to be polite --- if that's the way the bloke writes his name, then that's the way that I ought to write it when referring to him. R. __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel