Using the 173 majors listed in fivethirtyeight.com’s College Majors dataset, provide code that identifies the majors that contain either “DATA” or “STATISTICS”
| FOD1P | Major | Major_Category |
|---|---|---|
| 6212 | MANAGEMENT INFORMATION SYSTEMS AND STATISTICS | Business |
| 2101 | COMPUTER PROGRAMMING AND DATA PROCESSING | Computers & Mathematics |
| 3702 | STATISTICS AND DECISION SCIENCE | Computers & Mathematics |
Write code that transforms the data below:
[1] “bell pepper” “bilberry” “blackberry” “blood orange” [5] “blueberry” “cantaloupe” “chili pepper” “cloudberry”
[9] “elderberry” “lime” “lychee” “mulberry”
[13] “olive” “salal berry”
[1] "bell pepper" "bilberry" "blackberry" "blood orange" "blueberry"
[6] "cantaloupe" "chili pepper" "cloudberry" "elderberry" "lime"
[11] "lychee" "mulberry" "olive" "salal berry"
Into a format like this:
c(“bell pepper”, “bilberry”, “blackberry”, “blood orange”, “blueberry”, “cantaloupe”, “chili pepper”, “cloudberry”, “elderberry”, “lime”, “lychee”, “mulberry”, “olive”, “salal berry”)
c("bell pepper", "bilberry", "blackberry", "blood orange", "blueberry",
"cantaloupe", "chili pepper", "cloudberry", "elderberry", "lime",
"lychee", "mulberry", "olive", "salal berry")
Describe, in words, what these expressions will match:
Error: <text>:1:25: unexpected input
1: str_view(fruit_list,(..)\
^
Error: <text>:1:25: unexpected input
1: str_view(fruit_list,(..)\
^
Construct regular expressions to match words that: