prettyR

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

prettyR

Iasonas Lamprianou
Hi all,
does anyone have any practical examples of how this command can be used in prettyR?
add.value.labels(x,value.labels)

I mean, can we have the SPSS style of using numbers and/or labels if we want to?

Thank you for your time

Jason


Dr. Iasonas Lamprianou


Assistant Professor (Educational Research and Evaluation)
Department of Education Sciences
European University-Cyprus
P.O. Box 22006
1516 Nicosia
Cyprus
Tel.: +357-22-713178
Fax: +357-22-590539


Honorary Research Fellow
Department of Education
The University of Manchester
Oxford Road, Manchester M13 9PL, UK
Tel. 0044  161 275 3485
[hidden email]




______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: prettyR

Arun.stat
Sorry if I could not understand your problem properly. Are you looking for this type of example?

> assign(paste("x", 1, "level", sep=""), 4)
> x1level
[1] 4

Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: prettyR

Joris FA Meys
In reply to this post by Iasonas Lamprianou
Very simple as explained in the help files:

> X <- 1:5
> X
[1] 1 2 3 4 5

> add.value.labels(X,letters[1:5])
[1] 1 2 3 4 5
attr(,"value.labels")
a b c d e
1 2 3 4 5
> X
[1] 1 2 3 4 5

X didn't change.

> X <- add.value.labels(X,letters[1:5])
> X
[1] 1 2 3 4 5
attr(,"value.labels")
a b c d e
1 2 3 4 5
>
X changed. Mind you, those value labels are only read by functions
that use it. functions like names(), colnames(), rownames() and the
likes won't use those labels.

If you really want to use a kind of labels that works in almost every
situation, just use factors.

Cheers
Joris


On Sun, Jun 6, 2010 at 6:49 PM, Iasonas Lamprianou <[hidden email]> wrote:

> Hi all,
> does anyone have any practical examples of how this command can be used in prettyR?
> add.value.labels(x,value.labels)
>
> I mean, can we have the SPSS style of using numbers and/or labels if we want to?
>
> Thank you for your time
>
> Jason
>
>
> Dr. Iasonas Lamprianou
>
>
> Assistant Professor (Educational Research and Evaluation)
> Department of Education Sciences
> European University-Cyprus
> P.O. Box 22006
> 1516 Nicosia
> Cyprus
> Tel.: +357-22-713178
> Fax: +357-22-590539
>
>
> Honorary Research Fellow
> Department of Education
> The University of Manchester
> Oxford Road, Manchester M13 9PL, UK
> Tel. 0044  161 275 3485
> [hidden email]
>
>
>
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



--
Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

tel : +32 9 264 59 87
[hidden email]
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: prettyR

Jim Lemon
In reply to this post by Iasonas Lamprianou
On 06/07/2010 02:49 AM, Iasonas Lamprianou wrote:
> Hi all,
> does anyone have any practical examples of how this command can be used in prettyR?
> add.value.labels(x,value.labels)
>
> I mean, can we have the SPSS style of using numbers and/or labels if we want to?
>
> Thank you for your time
>
Hi Jason,
The value labels used in prettyR are mainly to help those users who are
importing SPSS .sav files and want to see the value labels displayed in
the output of some functions. Thus if you import an SPSS dataset with
add.value.labels=TRUE, functions like "brkdn" will display those labels.

The add.value.labels function just lets the user add value labels to
variables that don't have any.

Jim

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: prettyR

Iasonas Lamprianou

Thank you,

I'll have a go and if I have more questions I'll probably come back to you...


Dr. Iasonas Lamprianou


Assistant Professor (Educational Research and Evaluation)
Department of Education Sciences
European University-Cyprus
P.O. Box 22006
1516 Nicosia
Cyprus
Tel.: +357-22-713178
Fax: +357-22-590539


Honorary Research Fellow
Department of Education
The University of Manchester
Oxford Road, Manchester M13 9PL, UK
Tel. 0044  161 275 3485
[hidden email]


--- On Mon, 7/6/10, Jim Lemon <[hidden email]> wrote:

> From: Jim Lemon <[hidden email]>
> Subject: Re: [R] prettyR
> To: "Iasonas Lamprianou" <[hidden email]>
> Cc: [hidden email]
> Date: Monday, 7 June, 2010, 12:01
> On 06/07/2010 02:49 AM, Iasonas
> Lamprianou wrote:
> > Hi all,
> > does anyone have any practical examples of how this
> command can be used in prettyR?
> > add.value.labels(x,value.labels)
> >
> > I mean, can we have the SPSS style of using numbers
> and/or labels if we want to?
> >
> > Thank you for your time
> >
> Hi Jason,
> The value labels used in prettyR are mainly to help those
> users who are importing SPSS .sav files and want to see the
> value labels displayed in the output of some functions. Thus
> if you import an SPSS dataset with add.value.labels=TRUE,
> functions like "brkdn" will display those labels.
>
> The add.value.labels function just lets the user add value
> labels to variables that don't have any.
>
> Jim
>




______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: prettyR

Iasonas Lamprianou
In reply to this post by Joris FA Meys
Thank you,

I'll have a go and if I have more questions I'll probably come back to you...

Dr. Iasonas Lamprianou


Assistant Professor (Educational Research and Evaluation)
Department of Education Sciences
European University-Cyprus
P.O. Box 22006
1516 Nicosia
Cyprus
Tel.: +357-22-713178
Fax: +357-22-590539


Honorary Research Fellow
Department of Education
The University of Manchester
Oxford Road, Manchester M13 9PL, UK
Tel. 0044  161 275 3485
[hidden email]


--- On Mon, 7/6/10, Joris Meys <[hidden email]> wrote:

> From: Joris Meys <[hidden email]>
> Subject: Re: [R] prettyR
> To: "Iasonas Lamprianou" <[hidden email]>
> Cc: [hidden email]
> Date: Monday, 7 June, 2010, 2:05
> Very simple as explained in the help
> files:
>
> > X <- 1:5
> > X
> [1] 1 2 3 4 5
>
> > add.value.labels(X,letters[1:5])
> [1] 1 2 3 4 5
> attr(,"value.labels")
> a b c d e
> 1 2 3 4 5
> > X
> [1] 1 2 3 4 5
>
> X didn't change.
>
> > X <- add.value.labels(X,letters[1:5])
> > X
> [1] 1 2 3 4 5
> attr(,"value.labels")
> a b c d e
> 1 2 3 4 5
> >
> X changed. Mind you, those value labels are only read by
> functions
> that use it. functions like names(), colnames(), rownames()
> and the
> likes won't use those labels.
>
> If you really want to use a kind of labels that works in
> almost every
> situation, just use factors.
>
> Cheers
> Joris
>
>
> On Sun, Jun 6, 2010 at 6:49 PM, Iasonas Lamprianou <[hidden email]>
> wrote:
> > Hi all,
> > does anyone have any practical examples of how this
> command can be used in prettyR?
> > add.value.labels(x,value.labels)
> >
> > I mean, can we have the SPSS style of using numbers
> and/or labels if we want to?
> >
> > Thank you for your time
> >
> > Jason
> >
> >
> > Dr. Iasonas Lamprianou
> >
> >
> > Assistant Professor (Educational Research and
> Evaluation)
> > Department of Education Sciences
> > European University-Cyprus
> > P.O. Box 22006
> > 1516 Nicosia
> > Cyprus
> > Tel.: +357-22-713178
> > Fax: +357-22-590539
> >
> >
> > Honorary Research Fellow
> > Department of Education
> > The University of Manchester
> > Oxford Road, Manchester M13 9PL, UK
> > Tel. 0044  161 275 3485
> > [hidden email]
> >
> >
> >
> >
> > ______________________________________________
> > [hidden email]
> mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained,
> reproducible code.
> >
>
>
>
> --
> Ghent University
> Faculty of Bioscience Engineering
> Department of Applied mathematics, biometrics and process
> control
>
> tel : +32 9 264 59 87
> [hidden email]
> -------------------------------
> Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
>




______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.