Exercise

# Using $ notation

The **$** notation can be used to perform transformations if you want. The data frame `yourdata`

is pre-loaded in the workspace. This data frame contains the variables `A`

, `B`

, `C`

and `D`

.

Instructions

**100 XP**

- Copy the data frame
`yourdata`

and assign it to`yourdata2`

. - Subtract all the observations of the
`A`

variable from the observations of the`D`

variable and assign it to`yourdata2$diff`

. - Divide all the observations from the
`D`

variable through the observations of`A`

variable and assign it to`yourdata2$ratio`

. - Compute the logarithm of the
`D`

variable and assign it to`yourdata2$Dlog`

. - Calculate the mean of the variables
`A`

,`B`

,`C`

and`D`

and assign it to`yourdata2$mean`

.

Make use of the dollar notation.