Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from SChamberlain/master

see the fixes
  • Loading branch information...
commit 869451db86c8790bd132fb598a487bdfd8c05f54 2 parents 2649f2d + 87538c4
Edmund Hart authored
12 DESCRIPTION
View
@@ -11,13 +11,13 @@ License: CC0
URL: http://github.com/emhart/rGtrends
Bug reports: http://github.com/emhart/rGtrends/issues
Depends:
- rjava
-rjython
-stringr
+ rJava,
+ rJython,
+ stringr
Imports:
- rjava
-rjython
-rstringr
+ rJava,
+ rJython,
+ stringr
Collate:
'add_char.R'
'format_py_date.R'
4 NAMESPACE
View
@@ -0,0 +1,4 @@
+export(rGtrends)
+import(rJava)
+import(rJython)
+import(stringr)
2  R/rGtrends.R
View
@@ -8,7 +8,7 @@
#' @import rJython rJava stringr
#' @author Edmund Hart \email{edmund.m.hart@@gmail.com}
#' @export
-#' @example \dontrun{
+#' @examples \dontrun{
#' my_search <- rGrends("Bieber")
#' plot(my_search[,2],my_search[,1],type='l')
#' }
20 man/add_char.Rd
View
@@ -0,0 +1,20 @@
+\name{add_char}
+\alias{add_char}
+\title{Adds quote padding so terms can be searchable with python}
+\usage{
+ add_char(my_string)
+}
+\arguments{
+ \item{my_string}{A vector of strings that are padded with
+ quotation marks so they can be passed to python Required}
+}
+\value{
+ a vector of strings padded with quotes
+}
+\description{
+ Adds quote padding so terms can be searchable with python
+}
+\author{
+ Edmund Hart \email{edmund.m.hart@gmail.com}
+}
+
21 man/format_py_date.Rd
View
@@ -0,0 +1,21 @@
+\name{format_py_date}
+\alias{format_py_date}
+\title{Formats rJava strings of dates into text that can be converted to POSIX date}
+\usage{
+ format_py_date(date_vec)
+}
+\arguments{
+ \item{date_vec}{A vector of dates retured and stripped of
+ characters from rJava}
+}
+\value{
+ a vector of POSIX formatted dates
+}
+\description{
+ Formats rJava strings of dates into text that can be
+ converted to POSIX date
+}
+\author{
+ Edmund Hart \email{edmund.m.hart@gmail.com}
+}
+
40 man/rGtrends.Rd
View
@@ -0,0 +1,40 @@
+\name{rGtrends}
+\alias{rGtrends}
+\title{Search google trends (http://trends.google.com)
+using a python API.}
+\usage{
+ rGtrends(keywords,
+ src_path = paste(getwd(), "/src", sep = ""),
+ date = c("all", "all"))
+}
+\arguments{
+ \item{keywords}{A vector of search strings, each term
+ will be a seperate search. Required}
+
+ \item{date}{A vector of dates coded a string in the form
+ YYYY-MM, with the first element being the starting date
+ and the second element the end date. If you want to
+ return the entire range leave blank. If you want from a
+ starting date to the last available point, leave the
+ second element in vector as "all", or the first as "all"
+ to search from the beginning until the specified end
+ date}
+}
+\value{
+ a data frame with weekly search output and search volmue
+ within the specified date range
+}
+\description{
+ Search google trends (http://trends.google.com) using a
+ python API.
+}
+\examples{
+\dontrun{
+my_search <- rGrends("Bieber")
+plot(my_search[,2],my_search[,1],type='l')
+}
+}
+\author{
+ Edmund Hart \email{edmund.m.hart@gmail.com}
+}
+
20 man/strip_char.Rd
View
@@ -0,0 +1,20 @@
+\name{strip_char}
+\alias{strip_char}
+\title{Strips rJava S4 class characters from text vector returned from python}
+\usage{
+ strip_char(Js4text)
+}
+\arguments{
+ \item{Js4text}{vector of rJava S4 class strings}
+}
+\value{
+ a vector stripped of quotes ond brackets
+}
+\description{
+ Strips rJava S4 class characters from text vector
+ returned from python
+}
+\author{
+ Edmund Hart \email{edmund.m.hart@gmail.com}
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.