similar to: slight anomaly in formals<- ? (PR#9758)

Displaying 20 results from an estimated 2000 matches similar to: "slight anomaly in formals<- ? (PR#9758)"

2004 Aug 02
4
Is k equivalent to k:k ?
Hi, I wonder if the following (apparent) inconsistency is a bug or feature. Since scalars are simply vectors of length one I would think that a and a:a produce the same result. For example, > identical(4.01,4.01:4.01) [1] TRUE However, identical(4,4:4) [1] FALSE and > identical(4.0,4.0:4.0) [1] FALSE A closer look reveals that the colon operator produces objects
2004 Dec 08
4
Is k equivalent to k:k ?
Bringing up an old topic on a small technicality. In the help documentation on seq. Value: The result is of 'mode' '"integer"' if 'from' is (numerically equal to an) integer and 'by' is not specified. The arguement in seq specifying length also creates "double" which is not obvious in the wording, as "by" is not specified
2004 Dec 08
4
Is k equivalent to k:k ?
Bringing up an old topic on a small technicality. In the help documentation on seq. Value: The result is of 'mode' '"integer"' if 'from' is (numerically equal to an) integer and 'by' is not specified. The arguement in seq specifying length also creates "double" which is not obvious in the wording, as "by" is not specified
2018 Jun 01
0
user macros with multi-line arguments in Rd (was Re: Rd parser throws error for user macros invoked with empty argument)
Thanks for the report, I am testing a patch that will allow multi-line arguments to user macros. Best Tomas On 05/25/2018 04:45 PM, Georgi Boshnakov wrote: > While on the topic of Rd macro arguments, it seems that if a multiline argument is supplied, the lines after the first are silently ignored: > > f <- tempfile() > mac6 <- "\\newcommand{\\mac6}{mac6: #1}" >
2019 Jun 28
0
tools::package_native_routine_registration_skeleton?
Thanks, I was just coming to that conclusion and beginning to look for a way to make a list of exportable objects. Roger Koenker r.koenker at ucl.ac.uk<mailto:r.koenker at ucl.ac.uk> Department of Economics, UCL London WC1H 0AX. On Jun 28, 2019, at 11:23 AM, Georgi Boshnakov <georgi.boshnakov at manchester.ac.uk<mailto:georgi.boshnakov at manchester.ac.uk>> wrote: ...
2019 Jun 28
1
tools::package_native_routine_registration_skeleton?
On 28/06/2019 6:27 a.m., Koenker, Roger W wrote: > Thanks, I was just coming to that conclusion and beginning to look for a way to make a list of > exportable objects. After library(quantreg), ls("package:quantreg") will list all the names you currently export. So cat(ls("package:quantreg"), sep = ", ") will print the list in a form suitable for including
2018 May 25
2
Rd parser throws error for user macros invoked with empty argument
While on the topic of Rd macro arguments, it seems that if a multiline argument is supplied, the lines after the first are silently ignored: f <- tempfile() mac6 <- "\\newcommand{\\mac6}{mac6: #1}" cat(mac6, "\\mac6{2*3 2+2 sin(pi) }\n", file = f) rd <- tools::parse_Rd(f) > rd mac6: 2*3 --- Georgi Boshnakov -----Original Message----- From: Tomas Kalibera
2020 Sep 11
0
more Matrix weirdness
Abby, my answer was too concise. The thrust is that even if you define a method for "[<-" with signature x="matrix" and value ="Matrix", for example, it will never be used since "matrix" is S3. If instead x="someS4class" then the S4 method will be invoked. There may be cases when changing the class of the left-hand side make sense (such as
2015 Jul 15
1
add .emacs.desktop and .emacs.desktop.lock to files ignored by R CMD build?
Is it possible to consider adding .emacs.desktop and .emacs.desktop.lock to files ignored by R CMD build? Thanks, Georgi -- Dr Georgi Boshnakov tel: (+44) (0)161 306 3684 School of Mathematics fax: (+44) (0)161 306 3669 Alan Turing Building 1.125 The University of Manchester email: Georgi.Boshnakov at manchester.ac.uk Oxford Road Manchester M13 9PL UK
2010 Jan 20
1
function curve() (PR#14191)
Full_Name: Georgi Boshnakov Version: 2.10.1pat OS: Windows XP Submission from: (NULL) (130.88.123.205) When calling programmatically function curve() from package:graphics I experienced some trouble since it reports stop("'expr' must be a function or an expression containing 'x'") even if expr is "expression". Naturally, the user message uses
2011 Jan 10
0
overfilled signature lines in documentation shell for methods
The documentation shells created by the utility functions for classes and methods contain section "Methods". Due to a slight difference in the layout and the underlying Rd code, function signatures are wrapped on the following line (if necessary) in the "methods" section in a class description (xxx-class.Rd) but not in xxx.-methods.Rd. As a result long signatures may
2012 Nov 15
0
R-devel Digest, Vol 117, Issue 13
Hi, > ... Wrong. It looks like internally a[[1]] is always used instead of a[[i]]. > The real problem it seems is that 'a' is treated as if it was of > ength 1: > > > mapply(function(x, y) {x * y}, a, 1:3) > [1] 101 202 303 > > mapply(function(x, y) {x * y}, a, 5) > [1] 505 > > In other words, internal dispatch works for [[ but not for length().
2010 Feb 18
0
install.packages, normalizePath, file permissions
Dear developers, I have a small but more or less well defined inquiry. Another, more general one for which I was not able to find information is towards the end of this messages. The question seems to be too technical for R-help, that is why I post it here. When installing packages (Windows XP), occasionally the installation does not complete because, it seems, Windows locks some files.
2018 May 25
0
Rd parser throws error for user macros invoked with empty argument
Thanks for the report and the examples - and they do not have to be that verbose, it is enough to just define and use a command, e.g. cat("\\newcommand{\\mac1}{MAC1:#1}\\mac1{}", file=f) rd <- tools::parse_Rd(f) Whenever you get an error message like "Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'NULL'", there is a bug (at least the error message
2018 Jun 20
0
incomplete results from as.character.srcref() in some cases involving quote()
wholeSrcref attribute is documented in ?parse to be the source reference corresponding to the already parsed text. The implementation in the parser matches the documentation - the code stops at the last byte/character of the expression, that is, on the closing brace - which is the "already parsed text". I think this works as documented (also source() uses the current implementation
2019 Sep 06
0
[EXTERNAL] RE: install_github and survival
Yes, that is exactly the problem.? The code found in the "config" script is never run.? But why doesn't it get run? On 9/6/19 5:44 AM, Georgi Boshnakov wrote: > I cloned therneau/survival and the installation failed since there is no definition for exported function survfit(). > A file seems to be missing - there is survfit0() and survfit0.R but, compared to CRAN, no
2017 Jan 30
0
Matrix package breaks as.matrix method
Georgi, Brilliant, thank you very much for the helpful reply and explanation! I added 'importFrom("Matrix","as.matrix")' to my NAMESPACE and all worked fine! As my 'as.matrix' method is used entirely internally to the 'testmat' function (and not "used outside the package"), I don't think I actually need to export it. In my case, testmat is
1999 Mar 29
3
problems with formals and get (PR#151)
With 0.63.3, try test <- function(){ fn <- function(a) print("hello") print(is.function(fn)) print(names(formals("fn")))} test() if fn is not quoted in the last line of test, it works properly. test <- function(){ fn <- function() print("hello") formals(fn) <- alist(a=,b=) return(fn)} formals(test()) now try with line 3 of test changed to
2006 May 10
1
ape comparative analysis query
I've been comparing variables among objects (taxa) related by known trees, using phylogentically independent contrasts in the ape package, and want to move on to more complex models e.g. by using gls with appropriate correlation terms. My trees contain lots of (hard) polytomies and information about ancestors, which I've been including- creating fully dichotomous trees by using zero branch
2018 Jun 18
2
incomplete results from as.character.srcref() in some cases involving quote()
Hi, The result of as,character() on 'srcref' objects doesn't have the closing ')' in some cases involving 'quote': > e4 <- quote({2+2}) > class(attr(e4, "wholeSrcref")) [1] "srcref" > as.character(attr(e4, "wholeSrcref")) [1] "e4 <- quote({2+2}" As a result printing the object also lacks it and gives an