Maleana Khoury
Maleana Khoury

Reputation: 1

How can I italicize one word of a single line y-axis label in RStudio?

I'm trying to make my y-axis label read as "Nam expression" but seem to be having trouble. I'm using this command (I've tried a number of combinations of quotations and parentheses already but nothing seems to work):

plot(NAM_expression_over_time[,2], xlab = "Time (hours)" , ylab =  expression(italic("Nam ")), "expression")

I get this error message:

Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ

How can I go about solving this problem?

Upvotes: 0

Views: 25

Answers (0)

Related Questions