Displaying 20 results from an estimated 300 matches similar to: "odd behavior of names"
2018 Jul 29
2
odd behavior of names
Bugzilla issue 16101 describes another first-list-name-printed-differently
oddity
with the Windows GUI version of R:
> a <- "One is \u043E\u0434\u0438\u043D\nTwo is \u0434\u0432\u0430\n"
> Encoding(a) # expect "UTF-8"
[1] "UTF-8"
> sapply(strsplit(a, "\n")[[1]], charToRaw)[c(1,1,2)]
$`One is ????`
[1] 4f 6e 65 20 69 73 20 d0 be d0 b4 d0
[13] b8
2018 Jul 30
0
odd behavior of names
>>>>> William Dunlap via R-devel
>>>>> on Sun, 29 Jul 2018 10:06:40 -0700 writes:
> Bugzilla issue 16101 describes another
> first-list-name-printed-differently oddity with
> the Windows GUI version of R:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Indeed:
1) "first-list-name-printed" [i.e "names" only in that
2008 May 30
1
Unicode characters (R 2.7.0 on Windows XP SP3 and Hardy Heron)
Hi all
Four questions regarding Unicode.
Three Windows questions. I am using
- a PC with Windows XP (Build 20600.xpsp080413-2111 (Service Pack 3);
- the following R version:
> R.version
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 7.0
year 2008
month 04
day 22
svn
2017 May 09
2
source(), parse(), and foreign UTF-8 characters
Hi
I'm having trouble sourcing or parsing a UTF-8 file that contains
characters that are not representable in the current locale ("foreign
characters") on Windows. The source() function stops with an error, the
parse() function reencodes all foreign characters using the <U+xxxx>
notation. I have added a reproducible example below the message.
This seems well within the
2023 Nov 14
1
data.frame weirdness
Also why should that difference result in different behavior?
On Tue, Nov 14, 2023 at 9:38?AM Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
>
> In that case identical should be FALSE but it is TRUE
>
> identical(a1, a2)
> ## [1] TRUE
>
>
> On Tue, Nov 14, 2023 at 8:58?AM Deepayan Sarkar
> <deepayan.sarkar at gmail.com> wrote:
> >
> >
2023 Nov 14
1
data.frame weirdness
On Tue, 14 Nov 2023 at 09:41, Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
>
> Also why should that difference result in different behavior?
That's justifiable, I think; consider:
> d1 = data.frame(a = 1:4)
> d2 = d3 = data.frame(b = 1:2)
> row.names(d3) = c("a", "b")
> data.frame(d1, d2)
a b
1 1 1
2 2 2
3 3 1
4 4 2
> data.frame(d1,
2023 Nov 14
1
data.frame weirdness
In that case identical should be FALSE but it is TRUE
identical(a1, a2)
## [1] TRUE
On Tue, Nov 14, 2023 at 8:58?AM Deepayan Sarkar
<deepayan.sarkar at gmail.com> wrote:
>
> They differ in whether the row names are "automatic":
>
> > .row_names_info(a1)
> [1] -3
> > .row_names_info(a2)
> [1] 3
>
> Best,
> -Deepayan
>
> On Tue, 14 Nov
2016 Jun 27
1
stack problem
One would normally want the original order that so that one can stack
a list, operate on the result and then unstack it back with the
unstacked result having the same ordering as the original.
LL <- list(z = 1:3, a = list())
# since we can't do s <- stack(LL,. drop = FALSE) do this instead:
s <- transform(stack(LL), ind = factor(as.character(ind), levels = names(LL)))
unstack(s)
2019 Oct 11
1
New matrix function
Also note that the functionality discussed could be regarded as a generalization
of matrix multiplication where * and + are general functions and in this case
we have * replaced by == and + replaced by &.
On Fri, Oct 11, 2019 at 10:46 AM Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
>
> Using the example in the link here are two one-liners:
>
> A <-
2018 Jul 24
0
oddity in transform
I don't think it has much to do with transform in particular:
> BOD <- data.frame(Time = 1:6, demand = runif(6))
> BOD[["X"]] <- BOD[1:2] * seq(6); BOD
Time demand X.Time X.demand
1 1 0.8649628 1 0.8649628
2 2 0.5895380 4 1.1790761
3 3 0.6854635 9 2.0563906
4 4 0.4255801 16 1.7023206
5 5 0.5738793 25 2.8693967
6 6 0.9996713
2024 Sep 08
1
Inconsistency between row and nrow
The fact that it is consistent with the documentation is not the
point. The point is that the design itself is inconsistent.
On Sun, Sep 8, 2024 at 8:27?AM Marc Schwartz <marc_schwartz at me.com> wrote:
>
> Hi Gabor,
>
> In strictly reading the help files for both nrow() and row(), the 'x' argument in the former case is "a vector, array, data frame, or
2018 Jan 26
0
Portable R in zip file for Windows
Can you clarify what the nature of the security restriction is?
If you can't run the R installer then how it is that you could run R?
That would still involve running an external exe even if it came
in a zip file.
Could it be that the restriction is not on running exe files but on
downloading them?
If that is it then there are obvious workarounds (rename it not
to have an exe externsion or
2024 Jul 21
1
Extract
Fixing col.names=paste0("S", 1:5) assumes that there will be 5 columns and
we may not want to do that. If there are only 3 fields in string, at the most,
we may wish to generate only 3 columns.
On Sun, Jul 21, 2024 at 2:20?PM Bert Gunter <bgunter.4567 at gmail.com> wrote:
>
> Nice! -- Let read.table do the work of handling the NA's.
> However, even simpler is to use
2024 Jul 22
1
Extract
Thanks.
I found this to be quite informative and a nice example of how useful
R-Help can be as a resource for R users.
Best,
Bert
On Mon, Jul 22, 2024 at 4:50?AM Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
>
> Base R. Regarding code improvements:
>
> 1. Personally I find (\(...) ...)() notation hard to read (although by
> placing (\(x), the body and )() on 3
2024 Jul 21
1
Using the pipe, |>, syntax with "names<-"
If you object to names(x)[2]<- ... then use replace:
z |> list(x = _) |> within(replace(names(x), 2, "foo")) |> _$x
On Sun, Jul 21, 2024 at 11:10?AM Bert Gunter <bgunter.4567 at gmail.com> wrote:
>
> hmmm...
> But note that you still used the nested assignment, names()[2] <-
> "foo", to circumvent R's pipe limitations, which is exactly
2024 Jul 21
1
Extract
As always, good point.
Here's a piped version of your code for those who are pipe
afficianados. As I'm not very skilled with pipes, it might certainly
be improved.
dat <-
dat$string |>
read.table( text = _, fill = TRUE, header = FALSE, na.strings = "") |>
(\(x)'names<-'(x,paste0("s", seq_along(x))))() |>
2012 Dec 18
0
Rtools216.exe on Windows
1. If your PATH is very long then on the Select Additional Tasks
screen in the Rtools installer the two check box titles (Edit the
system PATH and Save version number) will be obscured (i.e. you won't
be able to see them at all) making the screen very confusing. One just
sees two boxes on the left and a long path on the right and has no
idea what it all means.
Also even with a short path the
2011 Apr 29
1
error while checking package size during Rcmd check
I am receiving this message during
Rcmd check proto-3.9.2.tar.gz
using "R version 2.13.0 Patched (2011-04-25 r55638)"
* checking installed package size ...Error in if (total > 1024 * 5) { : missing
value where TRUE/FALSE needed
Execution halted
I don't get this under R.2.12.x. The size of the tar.gz file is under
600K. What causes this or if its too hard to tell from the
2011 Jul 17
1
NAMESPACE
> Packages without explicit ?NAMESPACE? files will have a default one created at build or INSTALL time,
> so all packages will have namespaces. A consequence of this is that ?.First.lib? functions need to be
> renamed, usually as ?.onLoad? but sometimes as ?.onAttach?.
Couldn't R simply regard .First.lib as the appropriate function to
save many packages from
being needlessly changed?
2011 Dec 01
1
Standardizing included packages
It seems that R is mostly distributed with the tcltk package but not always.
Is there some reason for this inconsistency?
It would be nice if one could count on those packages that are
distributed on the Windows version of R being distributed on all other
platforms too.
--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com