mirror of https://git.sr.ht/~hrbrmstr/hgr
boB Rudis
6 years ago
18 changed files with 277 additions and 40 deletions
@ -0,0 +1,25 @@ |
|||
# Contributor Code of Conduct |
|||
|
|||
As contributors and maintainers of this project, we pledge to respect all people who |
|||
contribute through reporting issues, posting feature requests, updating documentation, |
|||
submitting pull requests or patches, and other activities. |
|||
|
|||
We are committed to making participation in this project a harassment-free experience for |
|||
everyone, regardless of level of experience, gender, gender identity and expression, |
|||
sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. |
|||
|
|||
Examples of unacceptable behavior by participants include the use of sexual language or |
|||
imagery, derogatory comments or personal attacks, trolling, public or private harassment, |
|||
insults, or other unprofessional conduct. |
|||
|
|||
Project maintainers have the right and responsibility to remove, edit, or reject comments, |
|||
commits, code, wiki edits, issues, and other contributions that are not aligned to this |
|||
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed |
|||
from the project team. |
|||
|
|||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by |
|||
opening an issue or contacting one or more of the project maintainers. |
|||
|
|||
This Code of Conduct is adapted from the Contributor Covenant |
|||
(http:contributor-covenant.org), version 1.0.0, available at |
|||
http://contributor-covenant.org/version/1/0/0/ |
@ -0,0 +1,57 @@ |
|||
#' Use hgr as a mini-browser (RStudio Addin) |
|||
#' |
|||
#' @export |
|||
mini_browser <- function() { |
|||
|
|||
# Get the document context. |
|||
context <- rstudioapi::getActiveDocumentContext() |
|||
|
|||
# Set the default data to use based on the selection. |
|||
text <- context$selection[[1]]$text |
|||
defaultData <- text |
|||
|
|||
# Generate UI for the gadget. |
|||
ui <- miniPage( |
|||
gadgetTitleBar("BrowseR"), |
|||
miniContentPanel( |
|||
shiny::div( |
|||
style="width:100%", |
|||
textInput("URL", "Location:", width="70%"), |
|||
submitButton("Go!") |
|||
), |
|||
shiny::br(), |
|||
htmlOutput("output") |
|||
) |
|||
) |
|||
|
|||
|
|||
# Server code for the gadget. |
|||
server <- function(input, output, session) { |
|||
|
|||
output$output <- renderText({ |
|||
goto_url <- input$URL %||% "" |
|||
if (goto_url != "") { |
|||
tmp <- hgr::just_the_facts(goto_url) |
|||
tmp$content |
|||
} |
|||
|
|||
# data <- reactiveData() |
|||
# if (nzchar(data) > 0) { |
|||
# tweet_base <- stringi::stri_wrap(data, 134, whitespace_only = TRUE) |
|||
# paste0(sprintf("%s %d/%d", tweet_base, 1:length(tweet_base), length(tweet_base)), collapse="<br/>\n<br/>\n") |
|||
# } else { |
|||
# "" |
|||
# } |
|||
}) |
|||
|
|||
# Listen for 'done'. |
|||
observeEvent(input$done, { |
|||
invisible(stopApp()) |
|||
}) |
|||
} |
|||
|
|||
# Use a modal dialog as a viewr. |
|||
viewer <- dialogViewer("BrowseR", width = 800, height = 600) |
|||
runGadget(ui, server, viewer = viewer) |
|||
|
|||
} |
@ -0,0 +1,45 @@ |
|||
# DO NOT CHANGE the "init" and "install" sections below |
|||
|
|||
# Download script file from GitHub |
|||
init: |
|||
ps: | |
|||
$ErrorActionPreference = "Stop" |
|||
Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1" |
|||
Import-Module '..\appveyor-tool.ps1' |
|||
|
|||
install: |
|||
ps: Bootstrap |
|||
|
|||
cache: |
|||
- C:\RLibrary |
|||
|
|||
# Adapt as necessary starting from here |
|||
|
|||
build_script: |
|||
- travis-tool.sh install_deps |
|||
|
|||
test_script: |
|||
- travis-tool.sh run_tests |
|||
|
|||
on_failure: |
|||
- 7z a failure.zip *.Rcheck\* |
|||
- appveyor PushArtifact failure.zip |
|||
|
|||
artifacts: |
|||
- path: '*.Rcheck\**\*.log' |
|||
name: Logs |
|||
|
|||
- path: '*.Rcheck\**\*.out' |
|||
name: Logs |
|||
|
|||
- path: '*.Rcheck\**\*.fail' |
|||
name: Logs |
|||
|
|||
- path: '*.Rcheck\**\*.Rout' |
|||
name: Logs |
|||
|
|||
- path: '\*_*.tar.gz' |
|||
name: Bits |
|||
|
|||
- path: '\*_*.zip' |
|||
name: Bits |
@ -0,0 +1 @@ |
|||
comment: false |
@ -0,0 +1,38 @@ |
|||
<section id="articleBody" class="articleBody"> |
|||
<p>R is an open source programming language and software environment, commonly used for statistical computing within data heavy roles such as data mining and statistics.</p> |
|||
<p><strong>Are you a programmer looking for a new job? <a href="http://www.techworld.com/jobs/channel-developerstw/">Browse our jobs board here</a>.</strong></p> |
|||
<header class="articleHeader"> |
|||
<figure> |
|||
<div> |
|||
<meta> |
|||
<meta> |
|||
<img src="https://cdn1.techworld.com/cmsdata/features/3664613/female_developer_istock_cecilie_arcurs_thumb800.jpg" alt="female developer istock cecilie arcurs"> |
|||
</div> |
|||
<meta> |
|||
</figure> |
|||
</header> |
|||
<p>R has had a resurgence in recent years with a growing number of programmers using its data generation and analysis capabilities within machine learning and other emerging data-dependant technologies.</p> |
|||
<p>We discuss why you should learn and use R and how to get skilled up.</p> |
|||
<h2>Why should I learn R programming language?</h2> |
|||
<p>While R can seem overly complex at the start, for those looking for a programming language with a lot of meat on the bones, R is worth your consideration.</p> |
|||
<p>In fact, a number of well-known organisations are taking advantage of R's impressive statistical features.</p> |
|||
<section class="inArticleRelatedList" id="inArticleRelated-6491BBC4-9DE6-470F-A409672B0331C9A6"> </section> <p>Some Facebook employees are using R to analyse user behaviour, while over 500 Google employees are using R to make its advertising more effective, says <a href="http://blog.revolutionanalytics.com/2013/05/companies-using-open-source-r-in-2013.html">Revolution Analytics</a>.</p> |
|||
<p>R uses command-line scripting, which is ideal for storing numerous series of complex data-analysis and recycling that analysis' on similar sets of data.</p> |
|||
<p>R is totally free and open source, so unlike its rivals such as SAS or Matlab, R can be customised, cloned and even redistributed.</p> |
|||
<p>One of the biggest benefits to open source software is that upgrades to the software are much more regular.</p> |
|||
<p>This is extremely advantageous for statistical programming languages and environments.</p> |
|||
<p>R is available on Windows, Linux and Mac OS X and able to import data from a whole host of programmes including Microsoft Excel, MySQL and Oracle.</p> |
|||
<section class="inArticleRelatedList" id="inArticleRelated-128F754A-0C56-4947-ABB06D81B7A432DD"> </section> <p>R really is a data analyst or statistician's dream - it packs a punch. R is able to handle an incredible amount of data and its two million users can vouch for that.</p> |
|||
<p>In fact, one of R's selling points is that exact community. R's large and active online community supply a myriad of documentation, tutorials and online query forums.</p> |
|||
<p><strong><a href="http://www.techworld.com/jobs/channel-developerstw/">Find your next job in development here</a>.</strong></p> |
|||
<h2>How do I learn R programming language?</h2> |
|||
<p>If you're not 100 percent sure that R is for you, you might want to take an introductory course. Online video courses are very popular and won't break the bank. </p> |
|||
<p><a href="https://www.udemy.com/courses/search/?q=R&src=ukw">Udemy</a> offers a range of online classes for R and statistical programming languages as a whole. These can start at around £10, so why not give it a shot. </p> |
|||
<p>Another popular route for those with a background in programming is to just get stuck in. </p> |
|||
<p>Just visit<span> </span><strong><a href="http://www.r-project.org/">r-project.org</a></strong> to install and get started.</p> |
|||
<p>While you don't need any additional downloads to begin working with R, it is a good idea to install <a href="http://www.rstudio.com/ide/">RStudio</a>, the <span>free R integrated development environment (IDE).</span></p> |
|||
<p><span>This studio includes useful features to make the learning process a little less daunting from syntax highlighting and code auto-completion. </span></p> |
|||
<p><span>You'll be able to take advantage of lots of online tutorials and documentation, including coding shortcuts,<strong> <a href="http://www.rstudio.com/ide/docs/">here</a></strong>.</span></p> |
|||
<p><strong>For a full guide on getting started with R, <a href="https://www.computerworld.com/article/2497143/business-intelligence/business-intelligence-beginner-s-guide-to-r-introduction.html?page=2">see here</a>.</strong></p> |
|||
<p>Find your next job with <a href="https://www.techworld.com/jobs/"> techworld jobs</a></p> |
|||
</section> |
@ -0,0 +1,11 @@ |
|||
% Generated by roxygen2: do not edit by hand |
|||
% Please edit documentation in R/mini-browser.r |
|||
\name{mini_browser} |
|||
\alias{mini_browser} |
|||
\title{Use hgr as a mini-browser (RStudio Addin)} |
|||
\usage{ |
|||
mini_browser() |
|||
} |
|||
\description{ |
|||
Use hgr as a mini-browser (RStudio Addin) |
|||
} |
Loading…
Reference in new issue