similar to: R-devel's ...names() questions

Displaying 20 results from an estimated 1000 matches similar to: "R-devel's ...names() questions"

2018 May 03
4
length of `...`
On 03/05/2018 11:01 AM, William Dunlap via R-devel wrote: > In R-3.5.0 you can use ...length(): > > f <- function(..., n) ...length() > > f(stop("one"), stop("two"), stop("three"), n=7) > [1] 3 > > Prior to that substitute() is the way to go > > g <- function(..., n) length(substitute(...())) > >
2008 May 21
2
rsync into an archive
Hello all, can rsync sync some directory directlly into a compressed file format.. that way I wouldn't have to compress it myself.... when syncing again it would decompress the file, sync and re-compress :) well, maybe this is a crazy idea... !?!? cheers joao
2011 Dec 11
2
as.factor does not work inside function
Hi, I am trying to write a function do cast columns of data frame as factor in a loop, the source is : as.factor.loop <- function(df, cols){ if (!is.null(df) && !is.null(cols) && length(cols) > 0) { for(col in cols) { df[[col]] <- as.factor(df[[col]]) } } } source('D:/ambertuil.r') x <- 1:5 y <- 2:6 df <- data.frame(x=x, y=y)
2018 May 03
3
length of `...`
Hi, It would be great if one of the experts could comment on the difference between Hadley's dotlength and ...length? The fact that someone bothered to implement a new primitive for that when there seems to be a very simple and straightforward R-only solution suggests that there might be some gotchas/pitfalls with the R-only solution. Thanks, H. On 05/03/2018 08:34 AM, Hadley Wickham
2006 Nov 16
1
Confusion about Dll Overriding
the winecfg confused me about DLL overriding. In the 'libraries' tab, if i specified a Dll file name and click 'Add', how does Wine know where to load the native file when need? does it mean i also have to copy the native file into the "c:\windows\system[32]" directory? if so, why i have to bother with the winecfg, why not directlly copy files into the
2018 May 03
7
length of `...`
Hi, In some cases the number of arguments passed as ... must be determined inside a function, without evaluating the arguments themselves. I use the following construct: dotlength <- function(...) length(substitute(expression(...))) - 1L # Usage (returns 3): dotlength(1, 4, something = undefined) How can I define a method for length() which could be called directly on `...`? Or is it an
2008 May 25
1
n Realizations of a Stochastic Process assigned to dynamically generated variable names?
I am interested in creating multiple (say 1000) time series, from a given stochastic process, of length 250. I want to refer to each realization with its own variable name, of the format say, tsn, where n is the n'th simulation. i.e. ts1, ts2, ts3, ts4, .... , ts1000 The way I am thinking of doing this is placing the following code within another loop, and the 'tsn' assignment should
2007 Jan 23
1
--link-dest copying modified files
Hi! It's me again with another --link-dest issue: I am using dirvish (www.dirvish.org) to create daily backup on disk images. dirvish is using rsync with --link-dest pointing to the last good image. This creates images with hardlinks to unmodified files. So far so good. Now I want to create a "current" filetree with hardlinks pointing to the last image. rsync -vaH --delete
2010 Apr 12
1
N'th of month working day problem
Dear Gabor, Thanks for your reply. however: > tail(DJd) ^DJI.Close 2010-04-01 10927.07 2010-04-05 10973.55 2010-04-06 10969.99 2010-04-07 10897.52 2010-04-08 10927.07 *2010-04-09 10997.35* > tail(ag) 2009-11-30 10344.84 2009-12-31 10428.05 2010-01-31 10067.33 2010-02-28 10325.26 2010-03-31 10856.63 *2010-04-30 10997.35 * It seems the script "makes up"
2012 May 22
1
RNORM matrix based on CSV file values for MEAN and SD
This should (hopefully) be a pretty simple task. What I'd like to do is read in a csv file containing means and standard deviations for a large number of 'n' parameters (up to 2000). The list would be in the following format (see attached read.csv): Paramter(1), mean, standard dev., Paramter(2), mean, standard dev., Paramter(3), mean, standard dev., ... Paramter(n), mean, standard
2017 Jan 17
2
UNSOLVED: Difficulties with Windows XP: failed to find cifs/fileserver.y.z@Y.Z in keytab (arcfour-hmac-md5)
On Tue, 17 Jan 2017 04:30:31 -0800 (PST) rawi via samba <samba at lists.samba.org> wrote: > Samba - General mailing list wrote > > And there is your problem, AD lives (or dies) on DNS, unlike NT. You > > have this line 'dns-nameservers 127.0.0.1' in your smb.conf. It is > > useless, it is pointing to itself and you are not running a dns > > server, even if
2017 Jan 17
2
SOLVED(aproximative?): Difficulties with Windows XP: failed to find cifs/fileserver.y.z@Y.Z in keytab (arcfour-hmac-md5)
Samba - General mailing list wrote > And there is your problem, AD lives (or dies) on DNS, unlike NT. You > have this line 'dns-nameservers 127.0.0.1' in your smb.conf. It is > useless, it is pointing to itself and you are not running a dns > server, even if you were running a dns server, it shouldn't point to > itself. > > There are those that say you can run a
2005 Oct 25
1
selecting every nth item in the data
I want to make a glm and then use predict. I have a fairly small sample (4000 cases) and I want to train on 90% and test on 10% but I want to do it in slices so I test on every 10th case and train on the others. Is there some simple way to get these elements? Stephen -- 21/10/2005 [[alternative HTML version deleted]]
2018 May 03
0
length of `...`
In R-3.5.0 you can use ...length(): > f <- function(..., n) ...length() > f(stop("one"), stop("two"), stop("three"), n=7) [1] 3 Prior to that substitute() is the way to go > g <- function(..., n) length(substitute(...())) > g(stop("one"), stop("two"), stop("three"), n=7) [1] 3 R-3.5.0 also has the ...elt(n)
2018 May 03
0
length of `...`
On Thu, May 3, 2018 at 8:18 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 03/05/2018 11:01 AM, William Dunlap via R-devel wrote: >> >> In R-3.5.0 you can use ...length(): >> > f <- function(..., n) ...length() >> > f(stop("one"), stop("two"), stop("three"), n=7) >> [1] 3 >> >> Prior to
2018 May 03
0
length of `...`
On 03/05/2018 11:18 AM, Duncan Murdoch wrote: > On 03/05/2018 11:01 AM, William Dunlap via R-devel wrote: >> In R-3.5.0 you can use ...length(): >> > f <- function(..., n) ...length() >> > f(stop("one"), stop("two"), stop("three"), n=7) >> [1] 3 >> >> Prior to that substitute() is the way to go >>
2018 May 04
0
length of `...`
>>>>> Herv? Pag?s <hpages at fredhutch.org> >>>>> on Thu, 3 May 2018 08:55:20 -0700 writes: > Hi, > It would be great if one of the experts could comment on the > difference between Hadley's dotlength and ...length? The fact > that someone bothered to implement a new primitive for that > when there seems to be a very
2019 Apr 22
2
[RFC] lld: mostly-concurrent symbol resolution
Hi all, This is a design change proposal to make lld's symbol resolution phase mostly-concurrent without changing the existing semantics. The aim of this change is to speed up the linker on multi-core machines. *Background:* Even though many parts of lld are multi-threaded, the symbol resolution phase is single-threaded. In the symbol resolution phase, the linker does the following: - Read
2018 May 03
2
length of `...`
On Thu, May 3, 2018 at 9:50 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 03/05/2018 11:18 AM, Duncan Murdoch wrote: >> >> On 03/05/2018 11:01 AM, William Dunlap via R-devel wrote: >>> >>> In R-3.5.0 you can use ...length(): >>> > f <- function(..., n) ...length() >>> > f(stop("one"),
2018 May 04
1
length of `...`
The one difference I see, is the necessity to pass the dots to the function dotlength : dotlength <- function(...) nargs() myfun <- function(..., someArg = 1){ n1 <- ...length() n2 <- dotlength() n3 <- dotlength(...) return(c(n1, n2, n3)) } myfun(stop("A"), stop("B"), someArg = stop("c")) I don't really see immediately how one can