search for: 317c317

Displaying 3 results from an estimated 3 matches for "317c317".

2004 Mar 12
1
plot.dendrogram and expressions
...ced to character before they are added to a plot with `text'. Is there a specific reason to do so (expect for the determination of the size of the character string to be plotted)? Otherwise one could plot the attributes directly via diff dendrogram.R /usr/src/R/src/library/stats/R/dendrogram.R 317c317 < text(xBot, yBot + vln, attr(child,"label")) --- > text(xBot, yBot + vln, nodeText) 337c337 < text(mx, my, attr(child, "edgetext")) --- > text(mx, my, edgeText) 344c344 < text(xBot, my, a...
2024 Mar 22
1
`as.data.frame.matrix()` can produce a data frame without a `names` attribute
...r(0) > #> > #> $class #> [1] "data.frame" ``` > In my experience, 0 column data frames should probably > still have a `names` attribute, and it should be set to > `character()`. I agree. A (very nice IMO) patch I'm currently testing is 317c317 < names(value) <- collabs --- > names(value) <- collabs %||% character() Martin > Some evidence to support my theory is that > OOB subsetting doesn't give the intended error with this > weird data frame: > ``` # Good OOB error df <- data.frame() d...
2024 Mar 21
1
`as.data.frame.matrix()` can produce a data frame without a `names` attribute
Hi all, I recently learned that it is possible for `as.data.frame.matrix()` to produce a data frame with 0 columns that is also entirely missing a `names` attribute, and I think this is a bug: ``` # No `names`, weird! attributes(as.data.frame(matrix(nrow = 0, ncol = 0))) #> $class #> [1] "data.frame" #> #> $row.names #> integer(0) # This is what I expected