Re: [R] Variable labels

2021-05-15 Thread Steven Yen
Thanks. On 2021/5/16 上午 11:52, Robert Knight wrote: > Hi Steven, > > You make great sense wanting to have labels for your variables.   When > in RStudio, the little arrow beside "mydata" in the Environment tab > can be clicked and you see all the variables there.  And so you would > like to see

Re: [R] Variable labels

2021-05-15 Thread Robert Knight
Actually, I just found exactly what you want. Before that though, I am having a hard time finding any such cool job despite having even had classes with some great professors in economics at UND, and so I work in a completely non data related thing. Here is exactly what you want, code included.

Re: [R] Variable labels

2021-05-15 Thread Robert Knight
Hi Steven, You make great sense wanting to have labels for your variables. When in RStudio, the little arrow beside "mydata" in the Environment tab can be clicked and you see all the variables there. And so you would like to see a description under the variable names. Here is one way to accom

Re: [R] Variable labels

2021-05-14 Thread John Dougherty via R-help
On Fri, 14 May 2021 17:20:20 +0800 Steven Yen wrote: > Thanks to all, for bearing with me. > > Now I realize expss may not be what I need. I have now written a > self-runnable, replicable set of codes (listed below). Perhaps that > gives an idea of what I need. Question is, whethet this is the

Re: [R] Variable labels

2021-05-14 Thread David Carlson
which behaves like the one you get? Use > save/load. > You want to do something different? So please explain what exactly. > > Cheers > Petr > > > > -Original Message- > > From: Steven Yen > > Sent: Thursday, May 13, 2021 5:53 PM > > To: PIKAL Petr

Re: [R] Variable labels

2021-05-14 Thread Deepayan Sarkar
e data file just use attr. > > > > attr(mydata, "var.labels") <- definitions$var.labels > > > > attributes(mydata) > > $names > > [1] "id" "age" "yrmarry" > > > > $class > > [1] "data.f

Re: [R] Variable labels

2021-05-14 Thread PIKAL Petr
> Sent: Friday, May 14, 2021 12:48 PM > To: PIKAL Petr > Cc: R-help Mailing List > Subject: Re: [R] Variable labels > > Never mind what I said about "Clickable". All I meant was I created an item > "definitions" that appears after I load the binary file, and th

Re: [R] Variable labels

2021-05-14 Thread Steven Yen
ttributes(mydata) $names [1] "id" "age" "yrmarry" $class [1] "data.frame" $row.names [1] 1 2 3 4 5 6 $var.labels [1] "Individual ID" "Age in Years" "Years of marriage" Cheers Petr -Original Message- Fr

Re: [R] Variable labels

2021-05-14 Thread PIKAL Petr
quot; "age" "yrmarry" $class [1] "data.frame" $row.names [1] 1 2 3 4 5 6 $var.labels [1] "Individual ID" "Age in Years" "Years of marriage" Cheers Petr > -Original Message- > From: R-help On Behalf Of Steven Yen

Re: [R] Variable labels

2021-05-14 Thread Steven Yen
get? Use save/load. You want to do something different? So please explain what exactly. Cheers Petr -----Original Message- From: Steven Yen Sent: Thursday, May 13, 2021 5:53 PM To: PIKAL Petr Subject: Re: [R] Variable labels Petr Those attachments (1.jpg, 2.jpg) I sent earlier were just

Re: [R] Variable labels

2021-05-14 Thread Jim Lemon
;? You can > use attr. > You want to make binary file which behaves like the one you get? Use > save/load. > You want to do something different? So please explain what exactly. > > Cheers > Petr > > > > -----Original Message- > > From: Steven Yen > >

Re: [R] Variable labels

2021-05-13 Thread PIKAL Petr
M > To: PIKAL Petr > Subject: Re: [R] Variable labels > > Petr > > Those attachments (1.jpg, 2.jpg) I sent earlier were just screen captures > (with a third-party program) of what I saw in the Environment pane right > after loading the data. Sorry I cannot explain my

Re: [R] Variable labels

2021-05-13 Thread PIKAL Petr
t ordinary vector" > attr(vec.m, "some") [1] "some specialvector" "another special vector" "just ordinary vector" > Cheers Petr > -Original Message- > From: R-help On Behalf Of Steven Yen > Sent: Thursday, May 13, 2021 10:0

Re: [R] Variable labels

2021-05-13 Thread Steven Yen
Thanks. What I need “appears” simple. The .RData file is provided by a third party (likely converted from a different data format such as SAS in which variable labels (not value labels) are common). When I load the binary file, in the “environment” I see, as expected, a data frame showing how ma

Re: [R] Variable labels

2021-05-12 Thread Fredrik Karlsson
Hi, I am sorry but I don't understand your question, Generally, "clicking" is not something you can assume to be implemented for anything in R. However, if you read the manual for the package https://gdemin.github.io/expss/ you get an example at the bottom where an illustration of how the packa

[R] Variable labels

2021-05-12 Thread Steven Yen
I insert variable with the expss function as shown below. No error message. My question is, how to save the variable labels in the data frame so that I can click to read the labels. Thank you. mydata<-read_excel("data/Excel/hseinv.xlsx",na=".") library(expss) mydata=apply_labels(mydata,    

Re: [R] Variable labels and value labels

2016-06-01 Thread Jim Lemon
80+")) age value.labels(age) Jim On Thu, Jun 2, 2016 at 3:37 AM, wrote: > Hi Jim, > > many thanks for the hint. > > When looking at the documentation I did not get how I do control which > value gets which label. Is it possible to define it? > > Kind regards > &

Re: [R] Variable labels and value labels

2016-05-31 Thread Jim Lemon
Hi Georg, You may find the "add.value.labels" function in the prettyR package useful. Jim On Tue, May 31, 2016 at 10:00 PM, wrote: > Hi All, > > I am using R for social sciences. In this field I am used to use short > variable names like "q1" for question 1, "q2" for question 2 and so on and >

Re: [R] Variable labels and value labels

2016-05-31 Thread Bert Gunter
I am not sure this is relevant or helpful, but see ?abbreviate, which one can use to abbreviate long strings as labels (but only for English-like languages, I believe). -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Op

Re: [R] Variable labels and value labels

2016-05-31 Thread PIKAL Petr
Hi see in line > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of > g.maub...@weinwolf.de > Sent: Tuesday, May 31, 2016 2:01 PM > To: r-help@r-project.org > Subject: [R] Variable labels and value labels > > Hi All, > > I

[R] Variable labels and value labels

2016-05-31 Thread G . Maubach
Hi All, I am using R for social sciences. In this field I am used to use short variable names like "q1" for question 1, "q2" for question 2 and so on and label the variables like q1 : "Please tell us your age" or q2 : "Could you state us your household income?" or something similar indicating w

Re: [R] Variable labels

2012-07-18 Thread Francois Maurice
Thanks a lot, it works fine with me !! François Maurice De : "Nutter, Benjamin" À : Francois Maurice ; r-help@r-project.org Envoyé le : mercredi 18 juillet 2012 8h21 Objet : RE: [R] Variable labels I have my own function for doing this that is similar to the one presented below. 

Re: [R] Variable labels

2012-07-18 Thread Nutter, Benjamin
00 Euclid Ave.  |  Cleveland, OH 44195  | (216) 445-1365 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Francois Maurice Sent: Tuesday, July 17, 2012 4:36 PM To: r-help@r-project.org Subject: [R] Variable labels Hi,   I'm us

[R] Variable labels

2012-07-17 Thread Francois Maurice
Hi,   I'm using write.table() to export dataframe to Excel. All works fine except that I want to export the variable labels instead of variable names.  I can see the labels in the R consol using attr(), but I just don't know how to use the labels instead of the names. Thanks, François Mauric

Re: [R] variable labels to accompany data.frame

2009-10-28 Thread David Winsemius
As does Muenchen in RforSASSPSSusers.pdf and in the book that grew out of that effort: http://rforsasandspssusers.googlepages.com/RforSASSPSSusers.pdf http://www.amazon.com/SAS-SPSS-Users-Statistics-Computing/dp/0387094172/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1217456813&sr=8-1 http://rforsasan

Re: [R] variable labels to accompany data.frame

2009-10-28 Thread Ista Zahn
Alzola and Harrell discuss some of these issues in "An introduction to S and the Hmisc and Design Libraries". -ista On Wed, Oct 28, 2009 at 1:27 PM, Jacob Wegelin wrote: > > Often it is useful to keep a "codebook" to document the contents of a > dataset. (By "dataset" I mean > a rectangular stru

Re: [R] variable labels to accompany data.frame

2009-10-28 Thread David Winsemius
I find that Harrell's describe ( Hmisc) provides some of that desired functionality. When I am creating a paper codebook I will print the results of describe function fro a dataframe to create an overview snapshot and will post a copy of str(dfname) on the wall. As his help page says: "desc

[R] variable labels to accompany data.frame

2009-10-28 Thread Jacob Wegelin
Often it is useful to keep a "codebook" to document the contents of a dataset. (By "dataset" I mean a rectangular structure such as a dataframe.) The codebook has as many rows as the dataset has columns (variables, fields). The columns (fields) of the codebook may include: • va