Can anyone explain me the following behavior:
1:2/1
[1] 1 2
-- makes sense
1:2/matrix(1,1,1)
[1] 1 2
-- makes sense
1:2/data.frame(a=1)
a
1 1
-- why is this different?
Best,
Ott
--
Ott Toomet
Visiting Researcher
School of Information
Mary Gates Hall, Suite 095
University
er current or future
> devices? Probably to late now tho.
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
Ott Toomet
Visiting Researcher
School of Information
Mary Gates Hall, Suite 310
'rowsum()' seems to add row names to the resulting matrix, corresponding to
the respective 'group' values. This is very handy, but it is not
documented. Should the documentation mention it so it could be relied upon
as part of API?
Cheers,
Ott
--
Ott Toomet
Visiting Researcher
School
I am referring to base::rowsum(), not rowSums(). For some reason I cannot
access it's help on my computer but the online documentation (R-devel
version) states:
Value
A matrix or data frame containing the sums. There will be one row per
unique value of group
Period. Above, the argument
methods...
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 3.1
year 2016
month 06
day21
svn rev 70800
language R
version.string R version 3.3.1 (2016-
Thanks, Hadley for bringing this up:-)
I am teaching R and I can suggest 5 different definitions of 'vector':
a) vector as a collection of homogeneous objects, indexed by [ ] (more
precisely atomic vector). Sometimes you hear that in R, "everything is a
vector", but this is only true for atomic
Gabe,
I agree that
If by standard you mean commonly used/understood, though, I doubt
> most R users would understand a list to be a vector. I think most people
> think of atomic vectors exclusively when they hear "vector" unless they've
> very specifically been trained not to do so.
However, a
rward (might even be a copy'n'paste).
> >>>>
> >>>> Finally, I saw you put your credentials in the URL when you cloned. I
> >>>> don't think that's safe, your GitHub credentials will be stored in the
> >>>> ./.git/config file. Instead, just cl
Apparently your username/password are wrong. Can you clone/push from other
repos?
You do not need authorization when cloning a public repo, so even incorrect
credentials may work (haven't tested this though). But for push you have
to have that in order.
I suggest you create ssh keys, upload
Sorry if this topic has been discussed earlier.
Currently, hist(..., log="y") fails with
> hist(rexp(1000, 1), log="y")
Warning messages:
1: In plot.window(xlim, ylim, "", ...) :
nonfinite axis=2 limits [GScale(-inf,2.59218,..); log=TRUE] -- corrected
now
2: In title(main = main, sub = sub,
I have done this using attributes:
fr <- function(x) { ## Rosenbrock Banana function
x1 <- x[1]
x2 <- x[2]
ans <- 100 * (x2 - x1 * x1)^2 + (1 - x1)^2
attr(ans, "extra1") <- 1:10
attr(ans, "extra2") <- letters
ans
}
Not sure if this works in your case though.
Cheers,
Ott
On
useNULL = TRUE)
>
> doesn't stop rgl from running, it just stops it from trying to display
> anything. So you could put code like
>
> if (!interactive())
> options(rgl.useNULL = TRUE)
>
> into your .onLoad function for your package, and it wouldn't try to open
> a displa
x86_64 x86_64 GNU/Linux w/gcc 5.4.0, libgomp1.0.0
> [2]
>
> https://builder.r-hub.io/status/gower_0.0.1.tar.gz-8c487e92f4af364ee73f85ca8f59775c
> [3] https://travis-ci.org/markvanderloo/gower#L619
>
> [[alternative HTML version deleted]]
>
> _______
I think part of the problem is that the corresponding section in "Writing R
extensions" is not very clear for newcomers. I admit I have read it
several times as I have been confused about the difference between suggest,
imports and depends, and so combed section 1.1.3 repeatedly. But from this
As I read the docs (a few months ago though), you are supposed to include
the pdf and encouraged to include sources, but the process to get pdf from
source may depend on your private libraries/data/software, and is not
replicated on CRAN checks. This seemed to work for me as my vignette
includes
Hi packagers,
what is the best way to skip certain tests on CRAN? So far I have included
certain test files in .Rbuildignore and run the tests on the package
directory. But now when moving to Authors@R format, I get errors about
missing maintainer etc.
I know there are options in testthat,
upport")
> q("no")
> }
>
> Don't run such code in an interactive session if you don't want to quit
> R. ;)
>
> An alternative is the R CMD check --test-dir=inst/slowTests approach
> mentioned in the WRE manual at
>
> https://CRAN.R-project.org/doc/manu
17 matches
Mail list logo