search for: collapse

Displaying 20 results from an estimated 2464 matches for "collapse".

2020 May 01
4
paste(character(0), collapse="", recycle0=FALSE) should be ""
Without 'collapse', 'paste' pastes (concatenates) its arguments elementwise (separated by 'sep', " " by default). New in R devel and R patched, specifying recycle0 = FALSE makes mixing zero-length and nonzero-length arguments results in length zero. The result of paste(n, "th"...
2020 May 15
3
paste(character(0), collapse="", recycle0=FALSE) should be ""
There is still the situation where **both** 'sep' and 'collapse' are specified: > paste(integer(0), "nth", sep="", collapse=",") [1] "nth" In that case 'recycle0' should **not** be ignored i.e. paste(integer(0), "nth", sep="", collapse=",", recycle0=TRUE) should r...
2020 May 22
2
paste(character(0), collapse="", recycle0=FALSE) should be ""
...t al, On Thu, May 21, 2020 at 9:42 AM Martin Maechler <maechler at stat.math.ethz.ch> wrote: > >>>>> Herv? Pag?s > >>>>> on Fri, 15 May 2020 13:44:28 -0700 writes: > > > There is still the situation where **both** 'sep' and 'collapse' are > > specified: > > >> paste(integer(0), "nth", sep="", collapse=",") > > [1] "nth" > > > In that case 'recycle0' should **not** be ignored i.e. > > > paste(integer(0), "nth&qu...
2005 Jun 23
1
the dimname of a table
i have a data frame(dat) which has many variables.and i use the following script to get the crosstable. >danx2<-c("x1.1","x1.2","x1.3","x1.4","x1.5","x2","x4","x5","x6","x7","x8.1","x8.2","x8.3","x8.4","x11",
2020 May 22
2
paste(character(0), collapse="", recycle0=FALSE) should be ""
I agree with Herve, processing collapse happens last so collapse=non-NULL always leads to a single character string being returned, the same as paste(collapse=""). See the altPaste function I posted yesterday. Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, May 22, 2020 at 9:12 AM Herv? Pag?s <hpages at fredhutch.or...
2020 May 15
2
paste(character(0), collapse="", recycle0=FALSE) should be ""
Totally agree with that. H. On 5/15/20 10:34, William Dunlap via R-devel wrote: > I agree: paste(collapse="something", ...) should always return a single > character string, regardless of the value of recycle0. This would be > similar to when there are no non-NULL arguments to paste; collapse="." > gives a single empty string and collapse=NULL gives a zero long character &...
2020 May 22
5
paste(character(0), collapse="", recycle0=FALSE) should be ""
Gabe, It's the current behavior of paste() that is a major source of bugs: ## Add "rs" prefix to SNP ids and collapse them in a ## comma-separated string. collapse_snp_ids <- function(snp_ids) paste("rs", snp_ids, sep="", collapse=",") snp_groups <- list( group1=c(55, 22, 200), group2=integer(0), group3=c(99, 550) ) vapply(snp_groups, colla...
2020 May 22
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
I think that paste(c("a", "b"), NULL, c("c", "d"), sep = " ", collapse = ",", recycle0=TRUE) should just return an empty string and don't see why it needs to emit a warning or raise an error. To me it does exactly what the user is asking for, which is to change how the 3 arguments are recycled **before** the 'sep' operation. The 'recycl...
2020 May 24
2
paste(character(0), collapse="", recycle0=FALSE) should be ""
On 5/23/20 17:45, Gabriel Becker wrote: > Maybe my intuition is just > different?but when I collapse multiple character vectors together, I > expect?all the characters from each of those vectors to be in the > resulting collapsed one. Yes I'd expect that too. But the **collapse** operation in paste() has never been about collapsing **multiple** character vectors together. What it do...
2020 May 22
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
...f a magnitude that 'we' are trying to avoid/smooth over at this point in user-facing R space. For the record I'm not suggesting it should return something other than "", and in particular I'm not arguing that any call to paste *that does not return an error* with non-NULL collapse should return a character vector of length one. Rather I'm pointing out that it could (perhaps should, imo) simply be an error, which is also consistent, in the strict sense, with previous behavior in that it is the developer simply declining to extend the recycle0 argument to the full paramet...
2011 Mar 15
2
Feature request: txtProgressBar with ability to write to arbitrary stream
...o incorparate this idea, I attached the patch file for the necessary changes below. Best regards, Andreas 3c3 < width = NA, title, label, style = 1) --- > width = NA, title, label, style = 1, file=stderr()) 23c23 < cat(paste(rep.int(char, nb-.nb), collapse="")) --- > cat(paste(rep.int(char, nb-.nb), collapse=""), file = file) 27c27 < "\r", paste(rep.int(char, nb), collapse=""), sep = "") --- > "\r", paste(rep.int(char, nb), collapse=&quo...
2020 May 02
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
>>>>> suharto anggono--- via R-devel >>>>> on Fri, 1 May 2020 03:05:37 +0000 (UTC) writes: > Without 'collapse', 'paste' pastes (concatenates) its arguments elementwise (separated by 'sep', " " by default). New in R devel and R patched, specifying recycle0 = FALSE makes mixing zero-length and nonzero-length arguments results in length zero. That's not intended. (It's...
2020 May 24
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
Herve (et al.), On Fri, May 22, 2020 at 3:16 PM Herv? Pag?s <hpages at fredhutch.org> wrote: > Gabe, > > It's the current behavior of paste() that is a major source of bugs: > > ## Add "rs" prefix to SNP ids and collapse them in a > ## comma-separated string. > collapse_snp_ids <- function(snp_ids) > paste("rs", snp_ids, sep="", collapse=",") > > snp_groups <- list( > group1=c(55, 22, 200), > group2=integer(0), > group3=c(99,...
2020 Nov 25
2
Stream over SSL and chrome
My site : https://radiobiscottes.studioo.fr/ -------- Norbert Deleutre  <http://www.lmgc.univ-montp2.fr/perso/norbert-deleutre/> P 0467149655 UMR CNRS 5508  <http://www.lmgc.univ-montp2.fr/> A Campus Saint-Priest/Montpellier > Le 25 nov. 2020 à 13:04, Damien GENESTE <d.geneste at illud.fr> a écrit : > > Hello Norbert, > > I don't know how i can help
2009 Feb 15
2
Collapsible Fieldset
Hey there, (First steps in Ruby and Rails...) I''m trying to make a fieldset collapsible, like they are, for example, on many Drupal pages. What I''ve figuared out is the following: <fieldset id="addressdata" class="collapsible collapsed"> <legend> <%= link_to_function("Show/Hide Addressdata") { |page| page[: addressdata].toggleClassName(''collapsed'') } %> </legend> ... some forms etc. here ... </fieldset> In CSS, I do a display:none for the class ''.col...
2012 Oct 21
1
Changing a for loop to a function using sapply
...uot;) a <-sample(DNAnucleotides,3, replace = TRUE) return(a) } # The following paste output uses random.string to indicate the number of times the function # randomizeString selects a triplet from the list DNAnucleotides to create a text string # of a sequence of nucleotides. # collapse = "" removes the quotes from the triplets to produce one long string when the string # is printed by paste. paste(c(sapply(random.string, randomizeString, simplify = TRUE), ""), collapse = "") # The for loop uses the paste output to create multiple random length n...
2020 May 21
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
>>>>> Herv? Pag?s >>>>> on Fri, 15 May 2020 13:44:28 -0700 writes: > There is still the situation where **both** 'sep' and 'collapse' are > specified: >> paste(integer(0), "nth", sep="", collapse=",") > [1] "nth" > In that case 'recycle0' should **not** be ignored i.e. > paste(integer(0), "nth", sep="", collapse=&quo...
2020 May 15
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
Hi all, This makes sense to me, but I would think that recycle0 and collapse should actually be incompatible and paste should throw an error if recycle0 were TRUE and collapse were declared in the same call. I don't think the value of recycle0 should be silently ignored if it is actively specified. ~G On Fri, May 15, 2020 at 11:05 AM Herv? Pag?s <hpages at fredhutc...
2020 May 24
2
paste(character(0), collapse="", recycle0=FALSE) should be ""
...Gabriel Becker wrote: > > > On Sat, May 23, 2020 at 9:59 PM Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > On 5/23/20 17:45, Gabriel Becker wrote: > > Maybe my intuition is just > > different?but when I collapse multiple character vectors together, I > > expect?all the characters from each of those vectors to be in the > > resulting collapsed one. > > Yes I'd expect that too. But the **collapse** operation in paste() has > never been about collapsing **multiple**...
2020 May 15
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
I agree: paste(collapse="something", ...) should always return a single character string, regardless of the value of recycle0. This would be similar to when there are no non-NULL arguments to paste; collapse="." gives a single empty string and collapse=NULL gives a zero long character vector. > pas...