Intro webR Quiz

Exercise 1

Calculate the mean of these numbers


______(1:10)
_webr_editor_3 = Object {code: null, options: Object, indicator: Ke}
mean(1:10)
mean(1:10)

Exercise 2

Replace with the text area_name

select(linelist, ____)
_webr_editor_8 = Object {code: null, options: Object, indicator: Ke}
select(linelist, area_name)
select(linelist, area_name)

Exercise 3

Replace with the select function to select the column area_name.

_____(linelist, area_name)
_webr_editor_13 = Object {code: null, options: Object, indicator: Ke}
select(linelist, area_name)
select(linelist, area_name)

Run any code

_webr_editor_18 = Object {code: "", options: Object, indicator: Ke}

ojs

foo = 123;
foo = 123
bar
OJS Runtime Error (line 122, column 1)

bar is not defined

When you change this it affects things above it!

bar <- foo * 2
_webr_editor_19 = Object {code: null, options: Object, indicator: Ke}

We can also do interactive stuff!

viewof colour = Inputs.select(
  [ 'orangered', 'forestgreen', 'cornflowerblue' ],
  { label: 'Colour' }
);
draw_hist(colour);
colour = "orangered"
OJS Runtime Error (line 150, column 1)

draw_hist is not defined

naquiz Example

Bill Gates was the founder of:

Apple

Microsoft

Facebook

Google

Downloading webR