=)
DF[index, cname] - value
See
?[-.data.frame
(And df is the name of an R function, use something else, it can be
confusing.)
Hope this helps,
Rui Barradas
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-create-data-frame-column-name-in-a-function-tp4605358p4605939.html
before zero as last digit of the year, then the 10th is '0'
as (now) expected, then goes to the second digit, etc.
It seems to stop at the first 9, or else we would have some sort of real
problem.
Anyway, this doesn't look right.
Rui Barradas
Em 10-07-2012 22:17, Winston Chang escreveu
=Portuguese_Portugal.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
Rui Barradas
Em 11-07-2012 02:05, Winston Chang escreveu:
It looks different on my system (Mac, R 2.15.1)
seq(as.Date(-01-01), length = 22, by = -1 year)
[1] -01-01 -001-01-01 -002-01
loaded via a namespace (and not attached):
[1] fortunes_1.5-0
Rui Barradas
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
, your tip solved the problem.
Rui Barradas
Em 06-08-2012 13:12, Duncan Murdoch escreveu:
On 12-08-06 6:09 AM, Rui Barradas wrote:
Hello,
I'm having some trouble trying to set the .libPaths() on Windows 7,
R-2.15.0 and R-2.15.1. The environment variables R_LIBS and R_LIBS_USER
are set according
Hello,
A bit more general
nv - c(a=1, d=17, e=101); nv
nv2 - c(a=a, d=d, e=e)
df2 - data.frame(VAR = nv, CHAR = nv2); df2
identical( nv, drop(t( df2[1] )) ) # TRUE
identical( nv, drop(t( df2[[1]] )) ) # FALSE
Rui Barradas
Em 18-08-2012 16:16, Joshua Ulrich escreveu:
I don't know
. Calloc/Realloc - you must call Free() [ uppercase, not free() ] at
the end of the function call.
Hope this helps,
Rui Barradas
Em 07-12-2012 12:40, Vineeth Mohan escreveu:
Hi ,
I am a newbie to R and i am trying to create a R package which is pretty
main memory intensive.
I would like
But there's something going on. The link is not created and the warning
message is wrong.
Bug report? (Why CreateHardLinkW, and not CreateHardLink?)
Rui Barradas
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
attached base packages:
[1] stats graphics grDevices utils datasets methods base
Rui Barradas
Em 08-12-2012 11:38, Rui Barradas escreveu:
Hello,
A post to R-Help by Oliver Soong reports what seems to be a bug
specific to Windows (I'm on Windows 7).
The original post is as follows
of labels to be
used. The default is to label for up to 150 points, and not for more.
but I believe the documentation could be more clear. It could say that
in the case of a y ~ x plot, to supress the plot xy.labels should be set
to FALSE.
Hope this helps,
Rui Barradas
Em 29-12-2012 17:04
it, documented
plot.ts(x=1, y=1, type=n) # does show the plot (labels it), not
properly documented
plot.ts(x=1:151, y=1:151, type=n) # does not show the plot, documented
Rui Barradas
Em 29-12-2012 19:07, Rui Barradas escreveu:
Hello,
You're right, it has to do with the argument xy.labels. The relevant
Hello,
The following seems to work.
library(XML)
url - http://house.gov/representatives/;
dat - readHTMLTable(readLines(url), which=1, header=TRUE)
str(dat)
head(dat)
Hope this helps,
Rui Barradas
Em 25-04-2013 21:00, Spencer Graves escreveu:
Hello:
What tools would you recommend
Hello,
Can't reproduce it, there must be something with your console. I get
cat(abc\b)
ab cat(abc\b\n)
ab
Hope this helps,
Rui Barradas
Em 01-11-2013 11:06, Renaud Gaujoux escreveu:
Hi,
when mixing newline and backspace characters I get the following output
(see below). In the second
LC_NUMERIC=C
[5] LC_TIME=Portuguese_Portugal.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] parallel_3.1.1
Rui Barradas
Best,
Tobias
__
R-devel@r
LC_NUMERIC=C
[5] LC_TIME=Portuguese_Portugal.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
Rui Barradas
Em 21-09-2014 18:06, Kevin Ushey escreveu:
Hi R-devel,
The following code:
all.equal(baseenv(), baseenv())
gives the error when run
oplevels(aq)["Month"] and droplevels(aq)$Month are _not_
the same. The first returns a data.frame (with just one vector), the
latter returns a vector. To return just a vector you could also use
droplevels(aq)[["Month"]]
which is preferable for programming, by the
Hello,
Try ?install.packages from within R.
install.packages("car", dependencies = TRUE)
Hope this helps,
Rui Barradas
Em 11-04-2017 12:01, Ulrich Windl escreveu:
Hi!
If you want to install an extra library like "car", there is a long list of dependencies.
If you just
e_Portugal.1252
LC_CTYPE=Portuguese_Portugal.1252
[3] LC_MONETARY=Portuguese_Portugal.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Portugal.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4
Hello,
Thanks for the answer.
No, in the end there's no problem, just a warning.
Rui Barradas
Em 17-07-2017 09:29, Martin Maechler escreveu:
Rui Barradas <ruipbarra...@sapo.pt>
on Mon, 17 Jul 2017 09:03:33 +0100 writes:
> Hello,
> R 3.4.1 on Windows 7, sessionInf
ckages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] igraph_1.0.1
loaded via a namespace (and not attached):
[1] compiler_3.4.1 magrittr_1.5 tools_3.4.1
Thanks in advance,
Rui Barradas
__
bit64_0.9-7
[52] glue_1.1.1 parallel_3.4.1 colorspace_1.3-2
[55] cluster_2.0.6 memoise_1.1.0 knitr_1.16
[58] bindr_0.1
Hope this helps,
Rui Barradas
Em 29-09-2017 16:00, Hong Ooi via R-devel escreveu:
If no 'type' is specified, download.packages("pkgname") wi
tr_order(as.character(x), numeric = TRUE)
#[1] 1 4 11 8 6 5 3 10 9 7 2
i <- str_order(as.character(x), numeric = TRUE)
as.character(x)[i]
#[1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "1
(0) whould avoid an
if/else or something similar.
Thanks in advance,
Rui Barradas
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Às 15:51 de 04/08/2018, Iñaki Úcar escreveu:
El sáb., 4 ago. 2018 a las 15:32, Rui Barradas
() escribió:
Hello,
Maybe I am not understanding how negative indexing works but
1) This is right.
(1:10)[-1]
#[1] 2 3 4 5 6 7 8 9 10
2) Are these right? They are at least surprising
Thanks,
This is what I needed.
I had read the R Inferno a long time ago and apparently forgot this one.
Rui Barradas
Às 08:46 de 05/08/2018, Patrick Burns escreveu:
This is Circle 8..1.13 of the R Inferno.
On 05/08/2018 06:57, Rui Barradas wrote:
Thanks.
This is exactly the doubt I had
Thanks.
This is exactly the doubt I had.
Rui Barradas
Às 05:26 de 05/08/2018, Kenny Bell escreveu:
This should more clearly illustrate the issue:
c(1, 2, 3, 4)[-seq_len(4)]
#> numeric(0)
c(1, 2, 3, 4)[-seq_len(3)]
#> [1] 4
c(1, 2, 3, 4)[-seq_len(2)]
#> [1] 3 4
c(1, 2, 3, 4)[-seq_len(
Hello,
A workaround could be
y <- addNA(y)
chisq.test(x,y)
But this implies that the user was aware of the reason why the error.
Hope this helps,
Rui Barradas
On 21/08/2018 15:31, Ant F wrote:
Hi,
`stats::chisq.test` checks that x and y each have at least 2 levels AFTER
filter
he
result was of length zero, I was just using seq_len(result) to avoid the
test. And found the error surprising.
Thanks again,
Rui Barradas
The rest of that section is very useful and well written. I used it as
the go-to reference to implement support for all those indexing
alternatives in m
Hello,
Same here. Tested on R 3.1.1 and R 3.5.1 and they look *exactly* the same.
Hope this helps,
Rui Barradas
On 26/08/2018 22:36, Paul Murrell wrote:
Hi
Sorry, but this seems to be working ok for me ...
> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-pc-linux-gnu (64-
ely different,
there's more to 'if' than '||' and '&&'. Any change should be done with
increased care. (Which I'm sure will, as always.)
Rui Barradas
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Thu, Aug 30, 2018 at 7:16 AM, Hadley Wickham wrote:
I think this is an excellent ide
versicolor5.936
#3 virginica6.588
Hope this helps,
Rui Barradas
On 3/23/2018 1:29 PM, Randall Pruim wrote:
In the examples below, the first loses the name attached by foo(), the second
retains names attached by bar(). Is this an intentional difference? I’d
prefer that the names
1] compiler_3.4.4 tools_3.4.4yaml_2.1.19
Or maybe I am missing something.
Thanks in advance,
Rui Barradas
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Hello,
Do you really need a prebuild binary? Wouldn't this do it?
devtools::install_github("nfultz/grpc")
Hope this helps,
Rui Barradas
Às 20:14 de 02/10/2018, Witold E Wolski escreveu:
Hello,
I am looking for a prebuild - binary MS Windows version of the R grpc package
https://
Hello,
I believe that this is maybe not a *feature* but at least expected
behaviour.
The call formals(args(`[`)) breaks down to
> args(`[`)
NULL
> formals(NULL)
NULL
Warning message:
In formals(fun) : argument is not a function
Hope this helps,
Rui Barradas
Às 18:26 de 06/1
Hello,
I forgot to ask you to also try to break the `sum` instruction into its
components:
args(`sum`)
does return a function. Therefore formals(args(`sum`)) returns something
useable and no warning.
Rui Barradas
Às 18:42 de 06/10/2018, Rui Barradas escreveu:
Hello,
I believe
Hello,
I don't see why you say that the documentation seems to be wrong:
class(args(`+`))
#[1] "function"
args() on a primitive does return a closure. At least in this case it does.
Rui Barradas
Às 14:05 de 07/10/2018, Peter Dalgaard escreveu:
There is more "fun" afo
2
(I first tried this last call with the argument between back ticks and
it didn't work, I wonder why.)
Hope this helps,
Rui Barradas
Às 18:52 de 06/10/2018, Laurent Gautier escreveu:
Hi,
Thanks for the note. How would explain the following snippet taken from
`formals` doc page (the code c
Hello,
This is because args(`[`) returns NULL and class(NULL) is NULL.
So the question would be why is the return value of args(`[`) NULL?
Rui Barradas
Às 15:14 de 07/10/2018, Peter Dalgaard escreveu:
On 7 Oct 2018, at 16:04 , Rui Barradas wrote:
Hello,
I don't see why you say
bit.
isTRUE(all.equal(0.3, 0.1*3))
#[1] TRUE
`%~~%` <- function (e1, e2) isTRUE(all.equal(e1, e2))
0.3 %~~% 0.1*3
#[1] 0
0.3 %~~% (0.1*3)
#[1] TRUE
Hope this helps,
Rui Barradas
Às 08:20 de 03/09/2018, Juan Telleria Ruiz de Aguirre escreveu:
Maybe a new Operator could be defined for
Hello,
Use drop = FALSE.
a[1, , drop = FALSE]
# col1
#row11
Hope this helps,
Rui Barradas
Às 16:51 de 21/11/2018, Dmitriy Selivanov escreveu:
Hello here. I'm struggling to understand R's subsetting behavior in couple
of edge cases - subsetting row in a single column matrix
ts the vector of names of classes an object
inherits from.
So far, so good. But now comes the part I don't like.
is.list(df1)
#[1] TRUE
Strictly speaking this is not unexpected behavior (because it's
documented) but isn't it *inconsistent* behavior?
Rui Barradas
Às 16:30 de 26/03/2019, Berr
PT.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
loaded via a namespace (and not attached):
[1] compiler_3.5.2 tools_3.5.2yaml_2.2.0
Hope this helps,
Rui Barradas
Às 12:23 de 28/02/2019, Michel Lang escreveu:
Curr
AME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=pt_PT.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.2
Hope this helps,
Rui Barradas
Às 08:46 de 27/02/2019,
of the difference:", se, "\n\n")
invisible(x)
}
t.test2(1:10, y = c(7:20))
t.test2(extra ~ group, data = sleep) # last example from ?t.test
(The suffix tjl commes from the OP's initials.)
Hope this helps,
Rui Barradas
Às 21:51 de 21/02/2019, Fox, John escreveu:
Dear Thomas,
t, tol=0) # good: 5.53 e-7
#[1] "Mean relative difference: 5.534757e-07"
all.equal(opt$objective, f(xhat), tol=0) # good: 1.8 e-12
#[1] "Mean relative difference: 1.816536e-12"
abs( opt$objective - f(xhat) ) < 1e-4 ## Must be TRUE
#[1] TRUE
Hope this helps,
Rui Barradas
sessio
base1 = integrate(f, -Inf, 0),
base2 = integrate(f, -Inf, 0, numstab = sc),
cuba1 = cubintegrate(f, -Inf, 0, method = "hcubature"),
cuba2 = cubintegrate(f, -Inf, 0, method = "hcubature", numstab = sc)
)
Hope this helps,
Rui Barradas
Às 15:52 de 12/04/19
~ b')
#[1] "a /home/rui b"
Rui Barradas
Às 04:27 de 08/06/19, Richard O'Keefe escreveu:
?path.expand
Expand a path name, for example by replacing a leading tilde by
the user's home directory (if defined on that platform).
*A* path name. The argument is a character vector.
If
=C
[11] LC_MEASUREMENT=pt_PT.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[many packages loaded]
Hope this helps,
Rui Barradas
Às 15:24 de 21/06/19, jing hua zhao escreveu:
Dear R-developers,
I a
Hello,
Sorry, my mistake, I grossly misunderstood the question.
qnorm(1e-300)
#[1] -37.0471
Anyway, you cannot go much smaller.
p <- 10^seq(-300, -400, by = -10)
z <- qnorm(p/2)
exp(z*z/2)
Hope this helps,
Rui Barradas
Às 16:11 de 21/06/19, jing hua zhao escreveu:
Dear Rui,
3.1.1
[100] openxlsx_4.1.0 xfun_0.6survey_3.35-1
[103] survival_2.44-1.1 timeDate_3043.102 tibble_2.1.1
[106] memoise_1.1.0 cluster_2.0.8 toOrdinal_1.1-0.0
[109] fitdistrplus_1.0-14 brew_1.0-6
Hope this helps,
Rui Barradas
Às 13:16 de 15/07/19, Duncan Murdoch escreveu:
Hello,
Inline.
Às 14:26 de 15/07/19, Duncan Murdoch escreveu:
On 15/07/2019 8:57 a.m., Rui Barradas wrote:
Hello,
Clean R 3.6.1 session on Ubuntu 19.04, RStudio 1.1.453. sessionInfo() at
the end.
That's not what I'd call a "clean session" with all those packages loaded:
You
Hello,
A way to see this is with ?class
# OP's code
typeof(c(1,"2")) # "character"
d.f <- data.frame(C=c(1,"2"))
typeof(d.f$C)# "integer"
# And check the objects' classes
class(c(1,"2")) # "character"
class(d.f$C)# &
I forgot there is also ?mode.
mode(c(1,"2")) # "character"
mode(d.f$C)# "numeric" (not "integer")
Rui Barradas
Às 11:54 de 19/07/19, Rui Barradas escreveu:
Hello,
A way to see this is with ?class
# OP's code
typeof(c(1,"2")) # "
Hello,
FAQ 7.31
See also this StackOverflow post:
https://stackoverflow.com/questions/9508518/why-are-these-numbers-not-equal
Hope this helps,
Rui Barradas
Às 00:08 de 29/02/20, robin hankin escreveu:
My interpretation of dput.Rd is that dput() gives an exact ASCII form
of the internal
# "integer"
class(0)# "numeric"
typeof(0L) # "integer"
typeof(0) # "double"
Indices are integers, so I used integers and added 1L every iteration
through the inner loop.
This also means that in point 1. I should have indexed the matrix with p
+ 1
tor("list", 16)
i <- 0L
for(p in 0:3){
for(q in 0:3){
i <- i + 1L
storage1[[i]] <- arima(etc)
}
}
lapply(storage1, '[[', "aic") # get the aic's.
Maybe sapply is better it will return a vector.
Hope this helps,
Rui Barradas
Às 06:23 de 03/02/20, ismael
s is the R-devel mailing list.
Please do *NOT* misuse it for R-help questions in the future:
These should go to the R-help mailing list instead!
Yes, and I had noticed it but then, after writing down the answer,
forgot to mention it.
Thanks for the warning.
Rui Barradas
Best,
Martin Maechler
t test
if (!is.numeric(x) && !is.complex(x))
stop("only defined on a data frame with all numeric variables")
So now the question is even more pertinent (?)(I think):
If sum() is a valid instruction, why only
sum()
sum()
are valid?
Rui Barradas
Às 19:23 d
3 4 5 6 7 8 9 10 11 12 13 14 15 16
#[43] 17 18 19 20 21 22 23 24 25 26
And I agree that order with data.frames should give a warning. The
result is indeed useless:
data.frame(letters, 1:26)[order(data.frame(letters, 1:26)), ]
Hope this helps,
Rui Barradas
Às 00:19 de 18/05/20, Jan
Hello,
I'm glad that it worked.
Two things:
1. Please, click reply all to keep this threaded.
2. The question should have belonged to r-h...@r-project.org, not to
r-devel@r-project.org.
Rui Barradas
Às 07:10 de 17/03/20, Moshe Olshansky escreveu:
It works, thank you!
On Tuesday, 17 March
Hello,
The problem seems to be that A is a matrix. The following solves the error.
# create A and b as in your code then run
A <- as.data.frame(A)
df1 <- cbind(A, b)
reg <- lm(b ~ ., df1)
# etc
Hope this helps,
Rui Barradas
Às 04:36 de 17/03/20, Moshe Olshansky via R-devel escreve
se
other attached packages:
[1] Matrix_1.2-18
loaded via a namespace (and not attached):
[1] compiler_4.0.2 grid_4.0.2 lattice_0.20-41
Error in x[rr, cc] <- m :
number of items to replace is not a multiple of replacement length
Execution halted
Hope this helps,
Rui Barradas
Às 03:04
this helps,
Rui Barradas
Às 11:32 de 23/09/20, Martin Keller-Ressel escreveu:
Dear all,
i have noticed some strange behaviour in the „jitter“ function in R.
On the help page for jitter it is stated that
"The result, say r, is r <- x + runif(n, -a, a) where n <- length(x) and a is
datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.2
Hope this helps,
Rui Barradas
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3
Happy holidays,
Rui Barradas
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Hello,
Thank you both, Duncan and Martin, for the quick and clear answer.
I hadn't considered printing `[.data.frame`, which is in fact very
useful, but I had read the Arguments section. What I didn't realize was
that it was the answer to the question. Sorry for the noise.
Rui Barradas
Às
sugar? Or am I finding the syntax ugly?
Hope this helps,
Rui Barradas
Às 03:22 de 06/12/20, Gregory Warnes escreveu:
If we’re being mathematically pedantic, the “pipe” operator is actually
function composition >
That being said, pipes are a simple and well-known idiom. While being less
Hello,
Or maybe
logical_idx <- max_usage_hours_per_region$Region %in% input$Region
Another option is ?match
Hope this helps,
Rui Barradas
Às 15:41 de 07/11/20, Jeff Newmiller escreveu:
This looks odd...
max_usage_hours_per_region[input$Region,]
This would only work if you
it
to work, only the other way does:
i <- 1L
apply(x, MARGIN = -d, '[', i, drop = FALSE)
x[i, , drop = FALSE]
What am I missing?
[1]
https://stackoverflow.com/questions/66168564/is-there-a-native-r-syntax-to-extract-rows-of-an-array
Thanks in advance
Hello,
Yes, although there is an accepted solution, I believe you should post
this solution there. It's a base R solution, what the question asks for.
And thanks, I would have never reminded myself of slice.index.
Rui Barradas
Às 20:45 de 12/02/21, robin hankin escreveu:
Rui
> x <-
Hello,
Double thanks, for the correction and for the lesson.
In particular, I had never noticed the f2() example's behavior.
It's always good to learn something new.
Rui Barradas
Às 08:57 de 29/07/21, Martin Maechler escreveu:
Rui Barradas
on Thu, 29 Jul 2021 07:52:02 +0100 writes
11] LC_MEASUREMENT=pt_PT.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.1.0
Thanks to all R Core Team members for their great work for all of us.
Hello,
Thanks, you are absolutely right. I had noticed that last night and then
I din't know what happened but it went like that.
Thanks for the correction.
Rui Barradas
Às 07:59 de 29/07/21, Peter Langfelder escreveu:
I'm also not a native speaker but my take is that a "be"
is last line is Portuguese for
Segmentation fault (core dumped)
Hope this helps,
Rui Barradas
Às 06:05 de 11/10/21, Travers Ching escreveu:
Here's a brief example:
# A bunch of words in UTF8; replace *'s
words <- readLines("h://pastebin.c**/raw/MFCQfhpY", encoding = "UTF
626.html
[3] https://stat.ethz.ch/pipermail/r-help/2004-June/052092.html
[4] https://stat.ethz.ch/pipermail/r-help/2004-June/052132.html
[5] https://CRAN.R-project.org/package=simsalapar
Hope this helps,
Rui Barradas
Às 22:37 de 02/12/21, Fox, John escreveu:
Dear Henrik, Simon, and Adrian,
out saying that I do not speak for the R Core team.
[1] https://stat.ethz.ch/pipermail/r-help/2021-December/473163.html
Hope this helps,
Rui Barradas
Às 22:36 de 04/12/21, Grant McDermott escreveu:
Hi all,
I wonder if the R Core team might reconsider an old feature request, as
detai
And there are more cases like these. For what I've seen, the frequent
(unique?) case is malloc/R_Free.
Hope this helps,
Rui Barradas
Às 09:59 de 07/04/2022, Tomas Kalibera escreveu:
On 4/7/22 10:32, Adrian Dușa wrote:
On Thu, 7 Apr 2022 at 10:32, Tomas Kalibera
wrote
NCOL(x)
NROW(x)
Not very convincing? Maybe with time...
Hope this helps,
Rui Barradas
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
keep the dim attribute
b[1, , , drop = FALSE]
#> , , 1
#>
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,]123456
Hope this helps,
Rui Barradas
--
Este e-mail foi analisado pelo software antivírus AVG para verificar a presença
de vírus.
www.avg.com
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
S
#> 1 2 4 4 8 13 14 10 17 9 11 2 1 3 1
subset(tbl, tbl > 10)
#> random
#> H I K M
#> 13 14 17 11
So it is subsetting vector data as wanted.
It is your expectation that a part of the table should be returned that
is not in agreement with the data you have.
Hope thi
ngth 1 vector, nrow returns that
value and ncol's return is the expected behavior of subsetting past the
vector length.
dim(table(letters)) # length 1
# [1] 26
nrow(table(letters)) # works as expected
# [1] 26
ncol(table(letters)) # works as expected
# [1] NA
Hope this helps,
Rui Barradas
Hello,
A bit late but thanks for the extra explanation.
Rui Barradas
Às 16:00 de 16/09/2022, peter dalgaard escreveu:
As a general matter, empty arguments are allowed and are used meaningfully in some
contexts, notably A[i,], which is syntactic sugarcoating of "["(A
swers much better than what I could.
The very small numbers in your question seem to have hit a limit and
this limit is not R related.
[1] https://stat.ethz.ch/pipermail/r-help/2022-February/473840.html
[2] https://stat.ethz.ch/pipermail/r-help/2022-February/473844.html
Hope thi
d behavior.
I was expecting class "integer", not "numeric" but this too is
documented in ?Dates section Details 2nd paragraph.
It is intended that the date should be an integer, but this is not
enforced in the internal representation. Fractional days will be ignored
when printing
n-numeric argument to mathematical function
Sys.Date() |> round.Date("years")
#> Error in NextMethod(): generic function not specified
Sys.Date() |> round.POSIXt("years")
#> [1] "2024-01-01 UTC"
Sys.Date() |> round.POSIXt("months")
#> [1] &qu
://stat.ethz.ch/mailman/listinfo/r-devel
Hello,
Have you checked it is in the PATH system variable?
After installing Rtools you must edit the Windows PATH. It not, the
system will still find the older Rtools version.
Hope this helps,
Rui Barradas
--
Este e-mail foi analisado pelo software
h/mailman/listinfo/r-devel
Hello,
I wrote a file with that content and read it back with
read.csv("filename.csv", as.is = TRUE)
There were no problems, it all worked as expected.
Hope this helps,
Rui Barradas
--
Este e-mail foi analisado pelo software antivírus AVG para verific
87 matches
Mail list logo