lf Of Sorkin, John
Sent: Tuesday, July 4, 2023 12:17 AM
To: Rolf Turner ; Bert Gunter
Cc: r-help@r-project.org (r-help@r-project.org) ;
Achim Zeileis
Subject: Re: [R] Create a variable lenght string that can be used in a
dimnames statement
My life is complete.
I have inspired a fortune!
John
(Sorry for the double post.)
On Tue, 4 Jul 2023 10:14:43 +0300
Ivan Krylov wrote:
> Try replacing the _second_ paste() in the example above with a c().
What I had forgotten to mention is that you also need to replace the
initial assignment
> string=""
with the following:
string = charact
On Mon, 3 Jul 2023 20:08:06 +
"Sorkin, John" wrote:
> # create variable names xxx1 and xxx2.
> string=""
> for (j in 1:2){
> name <- paste("xxx",j,sep="")
> string <- paste(string,name)
> print(string)
> }
> # Creation of xxx1 and xxx2 works
> string
You need to distinguish between a s
My life is complete.
I have inspired a fortune!
John
From: Rolf Turner
Sent: Monday, July 3, 2023 6:34 PM
To: Bert Gunter
Cc: Sorkin, John; r-help@r-project.org (r-help@r-project.org); Achim Zeileis
Subject: Re: [R] Create a variable lenght string that
At least on my system string has a single value of " xxx1 xxx2" not "xxx1" and
"xxx2".
The variable zzz has two values: "J K xxx1" and "J K xxx2"
What you want is "J", "K", "xxx1", "xxx2"
If I cheat everything works. So then the goal is to rewrite the program so
cheating is not needed.
# cr
On Mon, 3 Jul 2023 13:40:41 -0700
Bert Gunter wrote:
> I am not going to try to sort out your confusion, as others have
> already tried and failed.
Fortune nomination!!!
cheers,
Rolf Turner
--
Honorary Research Fellow
Department of Statistics
University of Auckland
Stats. Dep't. (secreta
I am not going to try to sort out your confusion, as others have already
tried and failed. But I will point out that "string" of variables is pretty
much nonsense in R. A "character vector"/"vector of strings" is probably
what you mean and want to provide column names // names for the second
compon
7 matches
Mail list logo