new to R and I hope to find solution to my practice task

hi guys, I am newly introduced to R and I am overwhelmed by it. I have this assignment and I have no clue as to how to go about it. I was hoping someone could help me figure it out. I would be very grateful .

with the ESS dataset ,

Create a subset with participant id (no) and the variables freehms, hmsfmlsh, hmsacld and gndr.

3.Invert the scale of the variable hmsfmlsh.

4.Remove missing values from the data.

5.Create a new variable with the consisting of the mean of the variables freehms, hmsfmlsh and hmsacld for each participant.

6.Create a histogram for freehms.

7.Create a boxplot for the index by gender.

8.Calculate the mean of the index by gender (gndr

Hi @richy1on1, welcome to the community!

As a homework problem, this is for you to figure out. If you post what you've tried so far and what error(s) you are getting, then people here will have a chance to help you past your blockers. As written now, it's just asking for people to write the code for you, which is unlikely to get much of a response.

Best,
Randy

1 Like

As @ randyzwitch says.

This may help you show us what you are doing.

FAQ: How to do a minimal reproducible example ( reprex ) for beginners

A handy way to supply data is to use the dput() function. Do dput(mydata) where "mydata" is the name of your dataset. For really large datasets probably dput(head(mydata, 100)) will do. Paste the output between
```

```

2 Likes

Something I just stumbled over that you might find interesting How to Keep Certain Columns in Base R with subset(): A Complete Guide

1 Like

Agree with this response. Please consult FAQ: Homework Policy

1 Like