similar to: sys.call() inside replacement functions incorrectly returns *tmp*

Displaying 20 results from an estimated 6000 matches similar to: "sys.call() inside replacement functions incorrectly returns *tmp*"

2018 Oct 15
2
sys.call() inside replacement functions incorrectly returns *tmp*
Kia Ora > Although I'm not sure what problem it would solve... Given that you asked, I was interested in writing a multiple assignment function as a replacement function, so something like: massign (x, y, z) = construct.some list () Obviously, that's not possible. Probably the best example I can think of is converting cartesian coordinates to polar coordinates. Then we might have
2018 Oct 15
0
sys.call() inside replacement functions incorrectly returns *tmp*
Hi, Agreed that it would be better if sys.call() were to return "x" instead of "*tmp*", as it behaves as a local variable. Although I'm not sure what problem it would solve, the effect here is comparable to what happens when calling a function indirectly (although then you could use sys.call(2), which here doesn't work). But your other suggestion, accepting
2018 Oct 16
0
sys.call() inside replacement functions incorrectly returns *tmp*
On Tue, Oct 16, 2018 at 12:03 AM Abs Spurdle <spurdle.a at gmail.com> wrote: > Probably the best example I can think of is converting cartesian > coordinates to polar coordinates. > Then we might have something like (note, untested, written in my email): > cart2polar = function (x, y) > list (theta=atan (y / x), r=sqrt (x * x + y * y) ) > > massign (r, theta) =
2018 Jul 23
2
oddity in transform
Note the inconsistency in the names in these two examples. X.Time in the first case and Time.1 in the second case. > transform(BOD, X = BOD[1:2] * seq(6)) Time demand X.Time X.demand 1 1 8.3 1 8.3 2 2 10.3 4 20.6 3 3 19.0 9 57.0 4 4 16.0 16 64.0 5 5 15.6 25 78.0 6 7 19.8 42 118.8 >
2018 Sep 14
3
Bug when calling system/system2 (and request for Bugzilla account)
Hi all, I found some strange behaviour, which I think is a bug. Could someone make an account for me on Bugzilla or pass on my report? The problem: When pressing Ctrl-C when a file is sourced in R, run from Terminal (macOS), sometimes the entire session is ended right away, while I just want to stop the script. This is the case when I press Ctrl-C while some functions are running that don?t
2018 Jul 24
2
oddity in transform
The idea is that one wants to write the line of code below in a general way which works the same whether you specify ix as one column or multiple columns but the naming entirely changes when you do this and BOD[, 1] and transform(BOD, X=..., Y=...) or other hard coding solutions still require writing multiple cases. ix <- 1:2 transform(BOD, X = BOD[ix] * seq(6)) On Tue, Jul 24, 2018 at
2018 Oct 02
1
Relevel confusing with numeric value
Something that bit me: The function relevel takes a factor, and a reference level to be promoted to the first place. If ?ref? is a character this level is promoted, if it?s a numeric the ?ref?-th level is promoted. Which turns out to be very confusing if you have factor with numeric values (e.g. when reading in a csv with some dirty numeric columns and stringsAsFactors TRUE) For example:
2018 Sep 14
2
Bug when calling system/system2 (and request for Bugzilla account)
I hope it's not too specific in my setup... I've tried with system2 added on the first line, so: Example.R: system2('ls', timeout=5) cat('Start non-interruptable functions\n') sample_a <- sample(1:1e7) sample_b <- sample(1:2e7) matching <- match(sample_a, sample_b) cat('Finished\n') Sys.sleep(10) And in terminal/bash: R --vanilla
2018 Aug 29
7
ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1
# Issue 'x || y' performs 'x[1] || y' for length(x) > 1. For instance (here using R 3.5.1), > c(TRUE, TRUE) || FALSE [1] TRUE > c(TRUE, FALSE) || FALSE [1] TRUE > c(TRUE, NA) || FALSE [1] TRUE > c(FALSE, TRUE) || FALSE [1] FALSE This property is symmetric in LHS and RHS (i.e. 'y || x' behaves the same) and it also applies to 'x && y'.
2018 Jun 09
4
Date class shows Inf as NA; this confuses the use of is.na()
And now I've seen I copied the wrong part of ?is.na > The default method for is.na applied to an atomic vector returns a logical vector of the same length as its argument x, containing TRUE for those elements marked NA or, for numeric or complex vectors, NaN, and FALSE otherwise. Key point being "atomic vector" here. On Sat, Jun 9, 2018 at 1:41 PM, Joris Meys <jorismeys at
2018 Aug 15
5
validspamobject?
Greetings, My R package has been showing warnings of the form: `validspamobject()` is deprecated. Use `validate_spam()` directly None of my code uses the function validspamobject, so it must be a problem in another package I'm calling, possibly spam or spdep. Has this problem occurred with other people? It doesn't have any deleterious effect, but it's annoying. In particular,
2018 Jul 30
5
apply with zero-row matrix
Forgive me if this has been asked many times before, but I couldn't find anything on the mailing lists. I'd expect apply(m, 1, foo) not to call `foo` if m is a matrix with zero rows. In fact: m <- matrix(NA, 0, 5) apply(m, 1, function (x) {cat("Called...\n"); print(x)}) ## Called... ## [1] FALSE FALSE FALSE FALSE FALSE Similarly for apply(m, 2,...) if m has no columns. Is
2005 Dec 02
2
Seven month time-series sampled at hourly intervals
I have data from several sensors that recorded data at hourly intervals during seven months. I want to separate daily variation from the trend, and also be able to zoom in on only one month of data. I have not been able what functions to use, I can not figure out from the help for 'ts' how to use hourly data. I guess this is routine-work for a lot of people so I hope someone can
2004 May 18
7
Isotopic notation in plots
I really like to use R for all my graphs, and as I work with stable isotopes I want to have a proper chemical notation in my plots I have looked at ?plotmath, but didn't find the answer and also searched the R website. ------------------------------------------------------------------------ -- plot(1:10,xlab=expression(^{14}*C)) # I want to have a superscript with nothing in front, but it
2005 Jul 21
7
a ne pas voir
hi all i suggest to create a goup in hotmail in order to discuss any problem on line in msn i think it's more practical than e-mail group Protek-on: CaraMail met en oeuvre un nouveau Concept de S?curit? Globale - www.caramail.com
2019 Jun 30
5
Making R CMD nicer
For the record, this is Linux R-devel: root at 4bef68c16864:~# R CMD /opt/R-devel/lib/R/bin/Rcmd: 60: shift: can't shift that many root at 4bef68c16864:~# R CMD -h /opt/R-devel/lib/R/bin/Rcmd: 62: exec: -h: not found root at 4bef68c16864:~# R CMD --help /opt/R-devel/lib/R/bin/Rcmd: 62: exec: --help: not found This is R-release on macOS: ? R CMD
2004 Nov 23
2
Create a vector of combinations based on a table column names
I want to create a character vector based on the table (shortened for display) below: Where there are ones in the matrix I want the column name to appear and where there are zeros nothing, which would make the vector in this shortened case: combinations <- ("A B","A C","A E H","A F G","B C D","E G H",A C D E H","A C D F
2005 Jul 26
5
Plot zooming i.e. changing ylim according to xlim
Dear R-gurus, I would like to zoom in a plot, e.g. I select a region on the x-axis and then I would like the ranges on the y-axis to change accordingly. Is it possible to do this with existing functions, or do I have to invent some data selection before plotting? See below a short example, where I select ylim with trial and error, which I want to avoid. Cheers, Henrik Andersson
2004 Dec 06
4
Modyfing PATH in Windows Installer for R
Just a small suggestion since Windows have a file system not designed for command line use... Would it be possible to add the possibility of automatically adding/modifying the path to the R executables in the windows installer program? --------------------------------------------- Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine and Marine Ecology P.O. Box 140 4400 AC
2019 Feb 02
5
Runnable R packages
I don't think anyone denies that you *could* make an EXE to do all that. The discussion is on *how easy* it should be to create a single file that contains an initial "main" function plus a set of bundled code (potentially as a package) and which when run will install its package code (which is contained in itself, its not in a repo), install dependencies, and run the main()