Variance in Weather in R - can’t find function “variance”

Hello everyone,

I’m working on the project .

I made it to step 2 with no problems, but the step 3 when I used the code to get a single column from a DataFrame as below didn’t work.

one_column <- london_data$column_name

I double-checked my code with what the hint suggested, and it’s exactly the same.

I even copied and pasted to make sure there wasn’t some tiny typo, and still the same result.

I had no problems so far but now I’m stuck. Can anyone figure out what the problem is? Is it a problem with my code, or a bug in Codecademy?

For reference, here is all the code I’ve done so far:


temp <- london_data$TemperatureC (didn’t work)

Tks so much

You must select a tag to post in this category. Please find the tag relating to the section of the course you are on

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

Hello, @abdulhem. What makes you say it didn’t work?

If, for example, I do this:

    x <- 5

In the browser, I see:
If I want to see the value of x displayed in the browser, I can do something like this:

    x <- 5

Now I see the following in the browser:

Hi @midlindner tks a lot for your answer however what I meant was the code for step 3 is not working for this exercise and as the next exercise 4 won’t work because takes the code of exercise 3.

See the picture attached

Please take a look to the link below so you can see and understand my view:

As you can see these codes highlighted (in a red square )are linked to the get an answer however the step 3 tell us to call a single column from the database but didn’t work.

Is there any problem with my code, or a bug in Codecademy?

Tks a lot again and can’t wait to sort out this problem

What I tried to illustrate, unsuccessfully, was that your code is working. You just haven’t printed the variables to be able to see the results. The instructions may not ask you to print the values, but if you want visual confirmation of the values assigned, that’s the only way.

You can use head() or print() or simple type the variable name on a line.

1 Like

Tks a lot @midlindnerfor your help now I got your point.

Tks and have a good day

1 Like