Re: [R] Variable and value labels

2023-07-13 Thread Anupam Tyagi
.  > > > > But seriously, we often are like new users even when we once knew a bit > about something. The R from before 2003 (or was it S?) has evolved quite a > bit. If, like me, you have used lots of other computer languages in > between, then they often blend in your m

Re: [R] Variable and value labels

2023-07-13 Thread avi.e.gross
and methods and of course quirks. And, of course, I sympathize with adjusting from other environments designed for somewhat more specific purposes like Stata as R is more of a general purpose programming language. Often people start with those others and then come to R because they ne

Re: [R] Variable and value labels

2023-07-13 Thread Anupam Tyagi
Thanks, Avi. By labels I mean human readable descriptions of variables and values of factor variables. In a plot, I want labels to be used for labelling axes on which a factor is plotted, and variable labels for axes names/descriptions in a plot. I may have borrowed the terminology of variable and

Re: [R] Variable and value labels

2023-07-13 Thread Adrian Dușa
Anupam, This is very general, and it also depends on the scientific domain. Factors do solve the value labels, but they drop the (original) values. They also lose the connection to the different types of missing values (an important topic in the social sciences). Base R provides as much as it

Re: [R] Variable and value labels

2023-07-12 Thread avi.e.gross
Anupam, Your question, even after looking at other messages, remains a bit unclear. What do you mean by "labels"? What you mean by variables and values and how is that related to factors? An example or two would be helpful so we can say more than PROBABLY. Otherwise, you risk having many people

Re: [R] Variable and value labels

2023-07-12 Thread Anupam Tyagi
r-help-boun...@r-project.org] On Behalf Of Anupam > Tyagi > >Sent: Wednesday, 12 July, 2023 14:11 > >To: Martin Maechler > >Cc: r-help mailing list > >Subject: Re: [R] Variable and value labels > > > >Thanks. Sorry, I have not consulted help pages, but did a we

Re: [R] Variable and value labels

2023-07-12 Thread Viechtbauer, Wolfgang (NP)
al Message- >From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Anupam Tyagi >Sent: Wednesday, 12 July, 2023 14:11 >To: Martin Maechler >Cc: r-help mailing list >Subject: Re: [R] Variable and value labels > >Thanks. Sorry, I have not consulted help pages, but

Re: [R] Variable and value labels

2023-07-12 Thread Anupam Tyagi
Thanks. Sorry, I have not consulted help pages, but did a web search. Web search results are referring to some package or the other for doing labels. Thanks for letting me know that this can be done in base-R. I will try to find the relevant information in R documentation. On Wed, 12 Jul, 2023,

Re: [R] Variable and value labels

2023-07-12 Thread Martin Maechler
> Anupam Tyagi > on Wed, 12 Jul 2023 09:18:55 +0530 writes: > Hello, > is there an easy way to do variable and value labels (for > factor variables) in base-R, without using a package. Yes, there are many. How many help pages (in R , i.e. base-R) did you consult?