Completely new to RStudio and need help

It si not clear what you mean by "I have 3 rows of data" but here is an example of how to subset a named vector.

row3 <- c("A" = 1, "B" = 2, "C" = 3)
row3
#> A B C 
#> 1 2 3

mean(row3[c("A", "B")])
#> [1] 1.5
sd(row3[c("A", "B")])
#> [1] 0.7071068

Created on 2019-09-15 by the reprex package (v0.3.0.9000)

If you need more specific help please provide a minimal REPRoducible EXample (reprex). A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ: