时间:2021-07-01 10:21:17 帮助过:6人阅读
GetSinaURL <- function(code = '600000', year = '2016', quarter = '1', index = FALSE) {
sina.url <- ''
if (index) {
sina.url <- paste0('http://vip.stock.finance.sina.com.cn/corp/go.php/vMS_MarketHistory/stockid/', code, '/type/S.phtml?year=', year, '&jidu=', quarter)
} else {
sina.url <- paste0('http://vip.stock.finance.sina.com.cn/corp/go.php/vMS_FuQuanMarketHistory/stockid/', code, '.phtml?year=', year, '&jidu=', quarter)
}
return(sina.url)
}
下面这个是什么编程语言呢?看着像js,但是在js 我也没见过<-
GetSinaURL <- function(code = '600000', year = '2016', quarter = '1', index = FALSE) {
sina.url <- ''
if (index) {
sina.url <- paste0('http://vip.stock.finance.sina.com.cn/corp/go.php/vMS_MarketHistory/stockid/', code, '/type/S.phtml?year=', year, '&jidu=', quarter)
} else {
sina.url <- paste0('http://vip.stock.finance.sina.com.cn/corp/go.php/vMS_FuQuanMarketHistory/stockid/', code, '.phtml?year=', year, '&jidu=', quarter)
}
return(sina.url)
}
google了下,找到原文了.
R抓取A股历史行情并写入MySQL
是不是R语音
F#是使用<-作为赋值运算的,其他的我就不清楚了 。
golang是有这个符号的,但没有function之类的