search for: mo12

Displaying 1 result from an estimated 1 matches for "mo12".

Did you mean: lo12
2009 Nov 24
1
How to interpret the name of an object literally?
..."fund" is a matrix of open, high, low, close, and volume prices returns <- function(fund) { p_12ago = as.vector(fund[nrow(fund)-252,6]) perc_diff_12mo = ((p_last - p_12ago) / p_last)*100 #This is the line that's giving me problems: funds=c(as.character(fund)) mo12=c(perc_diff_12mo) final_results=data.frame(funds,mo12) return(final_results) } I can't figure out how to insert the original argument from the function (in this case the name of the fund). Ultimately I want to be able to do returns("GOOG"), and have the output in this for...