[R] understanding the no-label concept

2014-10-11 Thread moonkid
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

Re: [R] understanding the no-label concept

2014-10-16 Thread moonkid
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

Re: [R] understanding the no-label concept

2014-10-16 Thread moonkid
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

Re: [R] understanding the no-label concept

2014-10-16 Thread moonkid
> 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

[R] [Sweave] doesn't accept unicode?

2014-10-21 Thread moonkid
Of course I manage and write my tex-files in unicode (utf-8) (running XeTeX). That is why my R-output need to be in unicode, too. But Sweave doesn't accept unicode files. [R] Sweave("analy.Snw") Fehler: ‘analy.Snw’ is not ASCII and does not declare an encoding [/R] [analy.Snw] <<>>= x <- ü

Re: [R] [Sweave] doesn't accept unicode?

2014-10-22 Thread moonkid
Maybe your answers are solutions, but not in my case. As I indicated with my code-sample I don't have a complete tex-file (with usepackage, document-env, etc). I only generate a piece of a tex file to \input it later in my puplication tex-file. So there is no way to specifiy an encoding with a