Displaying 20 results from an estimated 10000 matches similar to: "Removing cran mirrors"
2012 Sep 28
1
French Toulouse CRAN mirror always down
Hi!
One of the three French CRAN mirrors, cran.cict.fr (Toulouse) seems to
be down most of the time, and at least really not reliable. It has
currently been down for 28 days (!) [1], and I know that over two years
I've rarely been able to use it (no response, slow, hangs...).
I'm sure the maintainers of this mirror mean well, but the result is
really negative for French R users. This
2018 Feb 01
1
Best practices in developing package: From a single file
On Thu, Feb 1, 2018 at 1:29 PM, Duncan Murdoch <murdoch.duncan at gmail.com>
wrote:
> On 31/01/2018 6:59 AM, Duncan Murdoch wrote:
>
>> On 30/01/2018 11:39 PM, Hadley Wickham wrote:
>>
> [ lots deleted ]
>
>> Personally, I don't find writing in comments any harder than writing
>>> in .Rd files, especially now that you can write in markdown and
2018 Jan 31
3
Best practices in developing package: From a single file
On 30/01/2018 11:39 PM, Hadley Wickham wrote:
> On Tue, Jan 30, 2018 at 4:55 PM, Duncan Murdoch
> <murdoch.duncan at gmail.com> wrote:
>> On 30/01/2018 4:30 PM, Kenny Bell wrote:
>>>
>>> In response to Duncan regarding the use of roxygen2 from the point of view
>>> of a current user, I believe the issue he brings up is one of correlation
>>>
2010 Aug 24
2
Comparing/diffing strings
Hi all,
all.equal is generally very useful when you want to find the
differences between two objects. It breaks down however, when you
have two long strings to compare:
> all.equal(a, b)
[1] "1 string mismatch"
Does any one know of any good text diffing tools implemented in R?
Thanks,
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice
2007 Feb 25
8
Double-banger function names: preferences and suggestions
What do you prefer/recommend for double-banger function names:
1 scale.colour
2 scale_colour
3 scaleColour
1 is more R-like, but conflicts with S3. 2 is a modern version of
number 1, but not many packages use it. Number 3 is more java-like.
(I like number 2 best)
Any suggestions?
Thanks,
Hadley
2018 Aug 25
4
Where does L come from?
Hi all,
Would someone mind pointing to me to the inspiration for the use of
the L suffix to mean "integer"? This is obviously hard to google for,
and the R language definition
(https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Constants)
is silent.
Hadley
--
http://hadley.nz
2011 Oct 18
9
readRDS and saveRDS
Hi all,
Is there any chance that readRDS and saveRDS might one day become
read.rds and write.rds? That would make them more consistent with the
other reading and writing functions.
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
2018 Jun 08
6
Subsetting the "ROW"s of an object
Hi all,
Is there a better to way to subset the ROWs (in the sense of NROW) of
an vector, matrix, data frame or array than this?
subset_ROW <- function(x, i) {
nd <- length(dim(x))
if (nd <= 1L) {
x[i]
} else {
dims <- rep(list(quote(expr = )), nd - 1L)
do.call(`[`, c(list(quote(x), quote(i)), dims, list(drop = FALSE)))
}
}
subset_ROW(1:10, 4:6)
#> [1] 4 5 6
2010 Feb 08
5
Fast way to determine number of lines in a file
Hi all,
Is there a fast way to determine the number of lines in a file? I'm
looking for something like count.lines analogous to count.fields.
Hadley
--
http://had.co.nz/
2010 Mar 10
2
ggplot2: "varwidth"-equivalent for geom_boxplot?
Hi,
Is there such a thing? If no: is it easily simulated?
thanks, Joh
2018 Jul 07
6
Testing for vectors
On Sat, Jul 7, 2018 at 1:50 PM, Gabe Becker <becker.gabe at gene.com> wrote:
> Hadley,
>
>>
>> I was thinking primarily of completing the set of is.matrix() and
>> is.array(), or generally, how do you say: is `x` a 1d dimensional
>> thing?
>
>
> Can you clarify what you mean by dimensionality sense and specifically 1d
> here?
What do we call a
2016 Aug 05
2
What happened to Ross Ihaka's proposal for a Common Lisp based R successor?
Is it conceivable that Julia could be ported to use R syntax in a way that
would allow the vastly larger numbers of R programmers to seamlessly
switch? Or equivalently, could an iteration of R itself do this?
On Fri, Aug 5, 2016, 9:00 AM Hadley Wickham <h.wickham at gmail.com> wrote:
> When it was being actively worked on, it had the advantage of existing.
>
> Hadley
>
> On
2004 Oct 07
5
Subset doesn't drop unused factor levels
a <- data.frame(b = rep(1:5, each=2), c=factor(rep("a",10), levels=c("a","b")))
levels(subset(a, b=1, drop=T)$c)
# [1] "a" "b"
Is this a bug?
Thanks,,
Hadley
2015 Mar 30
3
Segfault with match()
This is admittedly a contrived example, but...
data(housing, package ="MASS")
x <- housing$Type + housing$Sat
match(x, unique(x))
Hadley
--
http://had.co.nz/
2018 Jun 08
3
Subsetting the "ROW"s of an object
> On Jun 8, 2018, at 1:49 PM, Hadley Wickham <h.wickham at gmail.com> wrote:
>
> Hmmm, yes, there must be some special case in the C code to avoid
> recycling a length-1 logical vector:
Here is a version that (I think) handles Herve's issue of arrays having one or more 0 dimensions.
subset_ROW <-
function(x,i)
{
dims <- dim(x)
index_list <-
2018 Jun 08
4
Subsetting the "ROW"s of an object
> On Jun 8, 2018, at 11:52 AM, Hadley Wickham <h.wickham at gmail.com> wrote:
>
> On Fri, Jun 8, 2018 at 11:38 AM, Berry, Charles <ccberry at ucsd.edu> wrote:
>>
>>
>>> On Jun 8, 2018, at 10:37 AM, Herv? Pag?s <hpages at fredhutch.org> wrote:
>>>
>>> Also the TRUEs cause problems if some dimensions are 0:
>>>
2016 Mar 01
2
Data frame printing buglet when multiple empty column names
This is admittedly minor, and you shouldn't have repeated names in a
data frame anyway, but:
df <- data.frame(1:3, 1:3, 1:3)
# Ok
setNames(df, c("x", "y", ""))
# Not ok
setNames(df, c("x", "", ""))
Hadley
--
http://hadley.nz
2008 Aug 29
3
Density estimates in modelling framework
Hi all,
Do any packages implement density estimation in a modelling framework?
I want to be able to do something like:
dmodel <- density(~ a + b, data = mydata)
predict(dmodel, newdata)
This isn't how sm or KernSmooth or base density estimation works. Are
there other packages that do density estimation? Or is there some
reason that this is a bad idea.
Hadley
--
http://had.co.nz/
2011 May 04
4
Recursive objects
Hi all,
Does anyone have a comprehensive list of recursive-type objects in R?
is.recursive defines them as by exclusion: "most types of objects are
regarded as recursive, except for vector types, ?NULL? and symbols
(as given by ?as.name?)." I think this that means recursive objects
are:
* lists
* pairlists
* calls
* expressions
Did I miss anything?
Hadley
--
Assistant
2006 Mar 07
3
Making an S3 object act like a data.frame
"[.ggobiDataset" <- function(x, ..., drop=FALSE) {
x <- as.data.frame(x)
NextMethod("[", x)
}
"[[.ggobiDataset" <- function(x, ..., drop=FALSE) {
x <- as.data.frame(x)
NextMethod("[[", x)
}
"$.ggobiDataset" <- function(x, ..., drop=FALSE) {
x <- as.data.frame(x)
NextMethod("$", x)
}
> class(x)
[1]