Q:

R plot with names on the y-axis and values on the x-axis

I have a data frame, which has two columns (names and values). I attempt to display the names on the y-axis and the values on the x-axis.
At the moment the index number (and not the names) are printed on the x-axis. How can I change it from the x-axis to the y-axis and from index numbers to names (A, B,...).
Below is a MWE:
name <- c("A", "B", "C", "D", "E")
values <- c(3.4, 2.7, 4.6, 5.2, 2.1)

df <- cbind.data.frame(name, values)
df <- df[order(-df$values),]

plot(df$values)

A:

plot(df$values, seq_along(df$name), yaxt = "n")
axis(2, at = seq_along(df$name), labels = df$name)

A slightly better way would be to include the y number in the frame and plot against that:
df$y <- seq_len(nrow(df))
plot(y ~ values, data = df, yaxt = "n", xlab = "Values", ylab = "Name")
axis(2, at = df$y, labels = df$name)

