Complete the code to create a character string variable named greeting with the value "Hello".
greeting <- [1]In R, character strings must be enclosed in double or single quotes. Here, double quotes are used.
Complete the code to find the number of characters in the string stored in word.
length <- [1](word)The nchar() function returns the number of characters in a string in R.
Fix the error in the code to concatenate two strings with a space between them.
full_name <- paste(first_name, [1], last_name)To add a space between two strings in paste(), use a string with a space: ' '.
Fill both blanks to create a named vector with words as names and their lengths as values.
word_lengths <- c([1] = nchar([2]))
We use the variable word as the name and calculate its length with nchar(word).
Fill all three blanks to create a named vector of uppercase words with their lengths greater than 3.
result <- c([1] = [2](word), nchar(word)[nchar(word) [3] 3])
tolower() instead of toupper()< or ==The name is word, the function to uppercase is toupper, and the condition is > 3.