#
# extraTechInds: extra Technical Indicators of TTR and quantmod
#
# Copyright (C) 2016 Chen Chaozong
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#' Retrieve Wind snapshot data
#'
#' @aliases getwss
#' @param windcodes wind codes in w.wss
#' @param windfields fields in w.wss
#' @param options options in w.wss, use w.menu to get more help
#' @export
getwss <- function(windcodes,windfields, options = ""){
if(checkwindr()!=0) return(NULL)
tmpdata <- w.wss(windcodes,windfields,options)
if(!tmpdata$ErrorCode==0) {
message(paste("Can not get wind data, error code:",tmpdata$ErrorCode))
return(NULL)
}
out <- tmpdata$Data
names(out) <- tolower(names(out))
return(out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.