similar to: Sexpr problem

Displaying 20 results from an estimated 10000 matches similar to: "Sexpr problem"

2023 Feb 05
1
R2HTML doesn't split paragraphs originating from \Sexpr[results=rd]
Hello, Here's an example that renders correctly using Rd2txt / Rd2latex / R CMD Rd2pdf, but has problems under Rd2HTML: \name{foo} \title{foo} \section{foo}{ This should be on a separate paragraph This should be on a separate paragraph This should be on a separate paragraph \Sexpr[stage=render,results=rd]{ paste( rep('Sexpr: This should be on a separate
2011 Oct 17
1
What does \Sexpr[results=rd]{} exactly mean in Rd?
Hi, I have spent a few hours on the R-exts manual and the documentation of parse_Rd() (as well as the PDF document in the references), but I still have not figured out what results=rd means. I thought I could use an R code fragment to create an Rd fragment dynamically. Here is an example, in which I was expected the output to be a describe list <DL> in HTML, but it turns out not to be true.
2009 Jun 19
2
Changes to Rd handling in R-devel
I've just committed some fairly big changes to R-devel. - There's a new tag \Sexpr which allows R code to be embedded within the Rd file, similar to Sweave, \RdOpts corresponds to \SweaveOpts. - The parser now mainly issues warnings, rather than errors, in case of syntax errors. It throws away a few tokens and tries to restart. This should let you see most of your errors in
2013 Jan 22
1
file.system() in packages
Hello. R-devel, r61697. I am having difficulty interpreting section 1.4 "Writing package vignettes" of the R-exts manual. Specifically, I want to use system.file() in some of my packages to locate a bib file, uncertainty.bib, which is part of the emulator package. I only want to maintain a single .bib file. R-exts says: "All other files needed to re-make the vignette PDFs (such
2010 Nov 10
1
S4 package warning
Hello everyone. R-2.12.0, suse linux 11.3. I am debugging a package that uses S4 methods and R CMD check gives the following warning: > Warning in methods::findMethods(g, env) : > non-generic function 'mdm' given to findMethods() > See the information on DESCRIPTION files in the chapter 'Creating R > packages' of the 'Writing R Extensions' manual. I
2009 Jul 15
1
Dynamic help pages
I've just committed code that allows R to be built with support for dynamic help pages using \Sexpr in Rd files. Define USE_NEW_HELP and the R function tools:::.convertRdfiles will be used instead of the Perl RdConv script, supporting \Sexpr and using the new R converters. Currently only text help has the macros evaluated when the user asks for help; the others are rendered at install
2012 May 25
1
columnames changes behaviour of formula
Hello. precompiled R-2.15.0, svn58871, macosx 10.7.4. I have discovered that defining column names of a dataframe can alter the behaviour of lm(): d <- c(4,7,6,4) x <- data.frame(cbind(0:3,5:2)) coef(lm(d~ -1 + (.)^2,data=x)) X1 X2 X1:X2 -1.77 0.83 1.25 R> R> OK, so far so good. But change the column names of 'x' and the behaviour changes: colnames(x) <-
2006 May 22
1
R CMD check problem
Hi I have a package that I'm testing. It seems to install fine and it works, as far as I can tell. For example, I can install the package, and use it, and source the test suite with no errors. My problem is with R CMD check. It passes on R-2.2-0: Robin-Hankins-Computer:~/scratch% R CMD check ./partitions_1.1-0.tar.gz * checking for working latex ... OK [snip] make[1]: Leaving directory
2011 Sep 27
1
array extraction
hello everyone. Look at the following R idiom: a <- array(1:30,c(3,5,2)) M <- (matrix(1:15,c(3,5)) %% 4) < 2 a[M,] <- 0 Now, I think that "a[M,]" has an unambiguous meaning (to a human). However, the last line doesn't work as desired, but I expected it to...and it recently took me an indecent amount of time to debug an analogous case. Just to be explicit, I would
2006 Apr 06
1
R CMD check for packages in a bundle
Hi [MacOsX 10.4.6; R-2.2.1] I have a bundle that comprises three packages. I want to run R CMD check on each one individually, as it takes a long time to run on all three. I am having problems. The bundle as a whole passes R CMD check, but fails when I cd to the bundle directory and run R CMD check on a package directory. The whole bundle passes: octopus:~/scratch% R CMD check
2011 Sep 06
1
repeatable segfault
Hi. macosx 10.6.8 With R-2.13.1 and also revision 56948 I get the following repeatable segfault: wt118:~% R --vanilla --quiet > R.Version() $platform [1] "x86_64-apple-darwin9.8.0" $arch [1] "x86_64" $os [1] "darwin9.8.0" $system [1] "x86_64, darwin9.8.0" $status [1] "" $major [1] "2" $minor [1] "13.1" $year [1]
2005 Jan 07
1
Visualizing complex analytic functions using domain coloring
Hi has anyone coded up domain colouring for visualizing complex analytic functions (such as elliptic functions)? [ the idea is to depict a complex function f(z) using a filled.contour() variant in which the hue is given by Arg(f(z)), and the saturation by Mod(f(z)). ] -- Robin Hankin Uncertainty Analyst Southampton Oceanography Centre European Way, Southampton SO14 3ZH, UK tel
2006 May 23
1
package installation problem
(this after asking the package author) Hi I cannot install the rmvnorm package under R-2.3.0, or R-2.3.1 beta. It installs fine under R-2.2.1. transcript for installation under R-2.3.0 follows. Robin-Hankins-Computer:~/scratch% R --version R version 2.3.0 (2006-04-24) Copyright (C) 2006 R Development Core Team R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to
2011 Aug 03
1
NAMESPACE problems
Hi. I am having difficulty following section 1.6.6 of the R-extensions manual. I am trying to update the Brobdingnag package to include a NAMESPACE file (the untb package requires the Brobdingnag package). Without the NAMESPACE file, the package passes R CMD check cleanly. However, if I include a NAMESPACE file, even an empty one, R CMD check gives the following error in 00install.out:
2005 Apr 13
2
Inf +1i vs 1+Inf*1i
Hi If I have a <- Inf + 1i then Re(a) is Inf, and Im(a) is 1, as expected. But if b <- 1 + Inf * 1i, then Im(b) = Inf , as expected, but Re(b) = NaN, which I didn't expect. Why this asymmetry? How to define an object with Re(b)=1, Im(b)=Inf? -- Robin Hankin Uncertainty Analyst Southampton Oceanography Centre European Way, Southampton SO14 3ZH, UK tel 023-8059-7743
2007 Mar 02
1
S3 best practice
Hello everyone Suppose I have an S3 class "dog" and a function plot.dog() which looks like this: plot.dog <- function(x,show.uncertainty, ...){ <do a simple plot> if (show.uncertainty){ <perform complicated combinatorial stuff that takes 20 minutes and superimpose the results on the simple plot> } } I think that it would be better to somehow
2005 Jul 11
1
Sweave and complex numbers
Hi When using Sweave, most of my functions get called with complex arguments. They get typeset in with additions that I don't want; "1+1i" appears as "1 + (0 + 1i)" and I would rather have plain old "1+1i". Example follows: \documentclass[a4paper]{article} \title{A Test File} \author{Robin Hankin} \usepackage{a4wide} \begin{document} \maketitle A
2006 Jul 26
2
largest acceptable lookup table in a package
Hi One of my packages needs a look-up table of pre-calculated numbers in the data directory. I would like to have the matrix as large as possible. What is the largest size matrix that would be an acceptable datafile in an R package? [ The table is a square, upper triangular matrix consisting of logs of Stirling numbers calculated by Maple. As discussed on the List a few days ago (thanks
2006 Feb 28
2
lines() and recycled colours
Hi ?lines says For 'type = "h"', 'col' can be a vector and will be recycled as needed. Why doesn't lines() recycle colours for other types? If I type > plot(0:1,0:1,type="n") > lines(runif(11),runif(11),col=c("red","green")) > then all ten lines are red, with no warning given. Is there a reason why
2005 Sep 21
3
size of subplots with par() / layout()
Hi If I do this: par(mfrow=c(2,2)) persp(matrix(1:4,6,6),box=F,phi=33,theta=33) persp(matrix(1:4,6,6),box=F,phi=33,theta=33) persp(matrix(1:4,6,6),box=F,phi=33,theta=33) persp(matrix(1:4,6,6),box=F,phi=33,theta=33) ( or indeed layout(matrix(1:4,2,2)) persp . . . . ) then the mesh plots look too small to me. How do I make them larger? -- Robin Hankin Uncertainty Analyst National