On Thu, Oct 16, 2014 at 3:19 PM, wrote:
>> aa <- 1:5
>> names(aa) <- c("Eins", "Zwei", "Drei", "Vier", "Fünf")
>> aa
> Eins Zwei Drei Vier Fünf
>12345
>> table(aa)
> 1 2 3 4 5
> 1 1 1 1 1
>
> You see? It didn't work.
perhaps you want
table(names(aa))
Or maybe just
aa <- -
> aa <- 1:5
> names(aa) <- c("Eins", "Zwei", "Drei", "Vier", "Fünf")
> aa
Eins Zwei Drei Vier Fünf
12345
> table(aa)
1 2 3 4 5
1 1 1 1 1
You see? It didn't work.
> aa <- c(aa, 1, 2)
> aa
Eins Zwei Drei Vier Fünf
1234512
This is no solution for my cas
On 2014-10-11 15:14 William Dunlap wrote:
> You can use 'factors' to assign labels to small integer values. E.g.,
>> x <- c(1,2,3,4,3)
>> fx <- factor(x, levels=1:5,
>> labels=c("One","Two","Three","Four","Five")) table(fx)
>fx
> One Two Three Four Five
>1 1
On 2014-10-11 14:16 David Winsemius wrote:
> Hmisc...
Tried but has no effect on table() calls.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.ht
On 11/10/2014 22:16, David Winsemius wrote:
On Oct 11, 2014, at 1:04 PM, Richard M. Heiberger wrote:
It looks like a terminology issue. R has names for elements of a
vector and for rows and
columns of a matrix or data.frame, and more generally for all
dimensions of multi-dimensional array.
I
You can use 'factors' to assign labels to small integer values. E.g.,
> x <- c(1,2,3,4,3)
> fx <- factor(x, levels=1:5, labels=c("One","Two","Three","Four","Five"))
> table(fx)
fx
One Two Three Four Five
1 1 2 1 0
Bill Dunlap
TIBCO Software
wdunlap tibc
On Oct 11, 2014, at 1:04 PM, Richard M. Heiberger wrote:
> It looks like a terminology issue. R has names for elements of a
> vector and for rows and
> columns of a matrix or data.frame, and more generally for all
> dimensions of multi-dimensional array.
>
> I think your next step is to read th
No, you are wrong. Read the docs! -- start with "An Introduction to R"
which ships with R.
Please do not post further until after you have done your homework.
x <- c(a=1,b=2,c=3)
See also ?names.
Cheers,
Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not informat
It looks like a terminology issue. R has names for elements of a
vector and for rows and
columns of a matrix or data.frame, and more generally for all
dimensions of multi-dimensional array.
I think your next step is to read the introductory document.
Start with either of these (they are the same
I am new to R but a bit familiar with Stata and SPSS and a software dev.
As I understand it right, there is no possibility to give variables or
values a lable. Is that right?
Just for example. "x" need a name. And the four values (1, 2, 3, 4)
need it to.
[code]
> table(x)
1 2 3 4
17 6 6 2
10 matches
Mail list logo