Displaying 6 results from an estimated 6 matches for "usesourc".
Did you mean:
usesource
2006 Nov 25
2
Source references from the parser
...eans bytes, but I haven't tested
with MBCSs) in a source file. It is implemented as a vector of 4
integers (first line, first column, last line, last column), with the
srcfile as an attribute.
The parser attaches a srcref attribute to each complete statement as it
gets parsed, if option("useSource") is TRUE. (I've left the old source
attribute in place as well for functions; I think it won't be needed in
the long run, but it is needed now.)
When printing an object with a srcref attribute, print.default tries to
read the srcfile to obtain the text. If it fails, it falls back...
2009 Oct 29
0
In the result of applying 'bquote' to function definition with 2 or more arguments, first function argument disappears (PR#14031)
...how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> h1 <- bquote(function(x, y) {
+ })
> h1
function(, y) {
}
> print(h1, useSource=FALSE)
function(, y) {
}
> eval(h1)
Error in eval(expr, envir, enclos) :
invalid formal argument list for "function"
> h2 <- bquote(function(x, y) {})
> h2
function(x, y) {}
> print(h2, useSource=FALSE)
function(, y) {
}
> eval(h2)
Error in eval(expr, envir, enclos)...
2007 Jul 13
1
parse(text=...) and the srcfile attribute
...2**2
a + b
")
I now wish to recover the sources for the parsed expressions. I can
get them one at a time:
> foo[[2]]
b <- 2^2
> as.character(attr(foo, "srcref")[[2]])
[1] "b <- 2**2"
Is there a better way? Perhaps like the print method
> as.character(foo, useSource = TRUE)
could give all the sources at once?
-Deepayan
2007 Jan 03
2
Hershey fonts for musical notation?
...Tenkanen
University of Turku, Finland
___________________________________________________________________
P.S.
By the way, right now the demo(Hershey) seems not to work in OSX version R 2.4.1. ...
I get a message
> i <- i + 1
Error in deparse(ei, control = c("showAttributes", "useSource")) :
invalid multibyte string
2011 Apr 13
0
R 2.13.0 is released
...ion --no-lock instead.
? The entry point pythag in Rmath.h is deprecated in favour of the
C99 function hypot. A wrapper for hypot is provided for R 2.13.x
only.
? Direct access to the "source" attribute of functions is
deprecated; use deparse(fn, control="useSource") to access it,
and removeSource(fn) to remove it.
? R CMD build --binary is now formally deprecated: R CMD INSTALL
--build has long been the preferred alternative.
? Single-character package names are deprecated (and R is already
disallowed to avoid confusion in D...
2011 Apr 13
0
R 2.13.0 is released
...ion --no-lock instead.
? The entry point pythag in Rmath.h is deprecated in favour of the
C99 function hypot. A wrapper for hypot is provided for R 2.13.x
only.
? Direct access to the "source" attribute of functions is
deprecated; use deparse(fn, control="useSource") to access it,
and removeSource(fn) to remove it.
? R CMD build --binary is now formally deprecated: R CMD INSTALL
--build has long been the preferred alternative.
? Single-character package names are deprecated (and R is already
disallowed to avoid confusion in D...