Error
There was an error loading the page.
The student must write R code to define vectors, in a few ways.
Metadata
-
England schools
-
England university
-
Scotland schools
Taxonomy: mathcentre
Taxonomy: Kind of activity
Taxonomy: Context
Contributors
Feedback
From users who are members of R programming :
![]() |
said | Needs to be tested | 2 years, 10 months ago |
From users who are not members of R programming :
![]() |
said | Has some problems | 3 years ago |
History
Christian Lawson-Perfect 1 year, 10 months ago
Published this.Aamir Khan 2 years, 10 months ago
Gave some feedback: Needs to be tested
Aamir Khan commented 2 years, 10 months ago
Added an alternative answer for part d to detect a logical vector.
Aamir Khan 3 years ago
Gave some feedback: Ready to use
Aamir Khan commented 3 years ago
Added randomisation to part b to avoid literal values being marked as correct.
Leaving alternatives for now as it seems broken.
Christian Lawson-Perfect 3 years ago
Gave some feedback: Has some problems
Christian Lawson-Perfect commented 3 years ago
In parts b and d, I'd randomise the values of x and y, so you can't just write down the literal values given in the prompts.
This might be going over and above, but in part d if I answer
z <- y>55
, I get a vector of booleans. Could you detect that with an alternative?
Aamir Khan commented 3 years, 1 month ago
Updated to new extension.
Aamir Khan 3 years, 1 month ago
Gave some feedback: Needs to be tested
Aamir Khan 3 years, 5 months ago
Gave some feedback: Ready to use
Aamir Khan 3 years, 5 months ago
Created this as a copy of R vectors.There is only one version of this question that you have access to.
There are 29 other versions that do you not have access to.
Name | Type | Generated Value |
---|
x_vector | vector |
vector(3,8,4,6,6,4,9,6)
|
||||
x_r | string |
3,8,4,6,6,4,9,6
|
||||
partc_a | integer |
3
|
||||
partc_b | integer |
104
|
||||
partc_step | number |
0.2
|
||||
partb_n | integer |
2
|
||||
partd_n | integer |
53
|
||||
parte_a_a | integer |
8
|
||||
parte_a_b | integer |
22
|
||||
parte_a_length | integer |
170
|
||||
parte_b_a | integer |
5
|
||||
parte_b_b | integer |
28
|
Generated value: vector
- x_r
- "Part a)" - prompt
Use this tab to check that this question works as expected.
Part | Test | Passed? |
---|---|---|
Code | ||
Hasn't run yet | ||
Code | ||
Hasn't run yet | ||
Code | ||
Hasn't run yet | ||
Code | ||
Hasn't run yet | ||
Code | ||
Hasn't run yet | ||
Code | ||
Hasn't run yet | ||
Code | ||
Hasn't run yet |
This question is used in the following exams:
- R Syntax by Aamir Khan in MAS8406.
- Practice Material for Numbas Test 1 by Rachel Binks in NCL MAS2906.
- Week 3 assessment by Aamir Khan in MAS8406.
- R programming practice by Aamir Khan in R programming.
- R Syntax by Aamir Khan in NCL PSY3048.
- R Refresher Test by Aamir Khan in NCL MAS2906.
- R Refresher Test by Chris Graham in Chris's workspace.