content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
testlist <- list(Rs = numeric(0), atmp = 0, relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06, 6.68889884134308e+51, -4.05003163986346e... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615853680-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 659 | r | testlist <- list(Rs = numeric(0), atmp = 0, relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06, 6.68889884134308e+51, -4.05003163986346e... |
options(java.parameters = c("-Xmx20000m"))
pacman::p_load(GreedyExperimentalDesign, doParallel, tidyverse, magrittr, data.table, viridis, RColorBrewer, ggsci, lmtest, sandwich)
#R CMD INSTALL -l ~/Documents/R/win-library/3.6/ GreedyExperimentalDesign
cl = makeCluster(nC)
registerDoParallel(cl)
clusterExport(cl, list(
... | /hybrid_paper/common_sims.R | no_license | kapelner/GreedyExperimentalDesign | R | false | false | 5,302 | r | options(java.parameters = c("-Xmx20000m"))
pacman::p_load(GreedyExperimentalDesign, doParallel, tidyverse, magrittr, data.table, viridis, RColorBrewer, ggsci, lmtest, sandwich)
#R CMD INSTALL -l ~/Documents/R/win-library/3.6/ GreedyExperimentalDesign
cl = makeCluster(nC)
registerDoParallel(cl)
clusterExport(cl, list(
... |
\name{SubsetByPloidy}
\alias{SubsetByPloidy}
\alias{SubsetByPloidy.RADdata}
\title{
Create a RADdata object with a Subset of Possible Ploidies
}
\description{
This function is used for removing some of the ploidies (inheritance modes)
stored in a \code{\link{RADdata}} object. If genotype calling has already
been perfo... | /man/SubsetByPloidy.Rd | no_license | quanrd/polyRAD | R | false | false | 1,946 | rd | \name{SubsetByPloidy}
\alias{SubsetByPloidy}
\alias{SubsetByPloidy.RADdata}
\title{
Create a RADdata object with a Subset of Possible Ploidies
}
\description{
This function is used for removing some of the ploidies (inheritance modes)
stored in a \code{\link{RADdata}} object. If genotype calling has already
been perfo... |
\name{momentsALD}
\alias{momentsALD}
\alias{meanALD}
\alias{varALD}
\alias{skewALD}
\alias{kurtALD}
\alias{momentALD}
\alias{absALD}
\title{Moments for the Asymmetric Laplace Distribution
}
\description{Mean, variance, skewness, kurtosis, central moments w.r.t \code{mu} and first absolute central moment for... | /man/momentsALD.Rd | no_license | cran/ald | R | false | false | 3,548 | rd | \name{momentsALD}
\alias{momentsALD}
\alias{meanALD}
\alias{varALD}
\alias{skewALD}
\alias{kurtALD}
\alias{momentALD}
\alias{absALD}
\title{Moments for the Asymmetric Laplace Distribution
}
\description{Mean, variance, skewness, kurtosis, central moments w.r.t \code{mu} and first absolute central moment for... |
#' Check if a data frame is grouped
#'
#' Internal replication of dplyr::is.grouped_df()
#'
#' @param x An object
#'
#' @return Logical: TRUE if dataframe is grouped; false if not.
#'
#' @noRd
is_grouped <- function(x) {
inherits(x, "grouped_df")
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | /R/data.frame.R | permissive | jdtrat/emphatic | R | false | false | 16,046 | r |
#' Check if a data frame is grouped
#'
#' Internal replication of dplyr::is.grouped_df()
#'
#' @param x An object
#'
#' @return Logical: TRUE if dataframe is grouped; false if not.
#'
#' @noRd
is_grouped <- function(x) {
inherits(x, "grouped_df")
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
plot.DMFA <- function (x, axes = c(1, 2), choix = "ind", label = "all",
lim.cos2.var = 0., xlim=NULL, ylim=NULL, title = NULL,palette = NULL, new.plot = FALSE,
autoLab = c("auto","yes","no"), ...)
{
res.dmfa = x
autoLab <- match.arg(autoLab,c("auto","yes","no"))
if (autoLab=="yes") autoLab=TRUE
if (... | /R/plot.DMFA.R | no_license | ntduc11/FactoMineR | R | false | false | 7,116 | r | plot.DMFA <- function (x, axes = c(1, 2), choix = "ind", label = "all",
lim.cos2.var = 0., xlim=NULL, ylim=NULL, title = NULL,palette = NULL, new.plot = FALSE,
autoLab = c("auto","yes","no"), ...)
{
res.dmfa = x
autoLab <- match.arg(autoLab,c("auto","yes","no"))
if (autoLab=="yes") autoLab=TRUE
if (... |
## Put comments here that give an overall description of what your
## functions do
## These functions will take an input matrix, calculate its inverse
## and give it as the returned value which will also be cached.
## If the calculated value is cached, it will not calculate the
## inverse and only return the cached i... | /cachematrix.R | no_license | cammillius/ProgrammingAssignment2 | R | false | false | 1,823 | r | ## Put comments here that give an overall description of what your
## functions do
## These functions will take an input matrix, calculate its inverse
## and give it as the returned value which will also be cached.
## If the calculated value is cached, it will not calculate the
## inverse and only return the cached i... |
\name{sv}
\alias{sv}
\title{
Calculating starting values for the vector of (mean1, mean2, var1, corr, var2) from completely observed data.
}
\description{
Calculates starting values for the vector of (mean1, mean2, var1, corr, var2) from completely observed data.
}
\usage{
sv(data, lower1, upper1, lower2... | /man/sv.Rd | no_license | cran/clikcorr | R | false | false | 1,862 | rd | \name{sv}
\alias{sv}
\title{
Calculating starting values for the vector of (mean1, mean2, var1, corr, var2) from completely observed data.
}
\description{
Calculates starting values for the vector of (mean1, mean2, var1, corr, var2) from completely observed data.
}
\usage{
sv(data, lower1, upper1, lower2... |
##### GET DATA
### from csv file
#library(readr)
#apple_health_data <- read_csv("C:/Users/karin/Google Drive/Projects/Data Analysis/Health Analysis/data/apple_health_data.csv",
# col_types = cols(endDate = col_datetime(format = "%Y-%m-%d %H:%M:%S"),
# year =... | /apple_data_cleanup.R | no_license | KMGehweiler/Cycle-Health-Analysis | R | false | false | 3,467 | r | ##### GET DATA
### from csv file
#library(readr)
#apple_health_data <- read_csv("C:/Users/karin/Google Drive/Projects/Data Analysis/Health Analysis/data/apple_health_data.csv",
# col_types = cols(endDate = col_datetime(format = "%Y-%m-%d %H:%M:%S"),
# year =... |
##' Short summary of the random effects parameters, the fixed treatment
##' effects, and the surrogacy evaluation criteria estimated from a joint surrogate model
##'
##' This function returns the estimate of the coefficients and their standard error with p-values
##' of the Wald test for the joint surrogate model, a... | /R/summary.jointSurroPenal.R | no_license | michaelmayer2/frailtypack | R | false | false | 9,226 | r | ##' Short summary of the random effects parameters, the fixed treatment
##' effects, and the surrogacy evaluation criteria estimated from a joint surrogate model
##'
##' This function returns the estimate of the coefficients and their standard error with p-values
##' of the Wald test for the joint surrogate model, a... |
##################################################
### Load libraries
##################################################
library(broom)
library(corrr)
library(dplyr)
library(ez)
library(ggplot2)
library(readr)
library(tidyr)
library(car)
###################################################
### Read in data
#########... | /scripts/05-classical-procedures.R | no_license | sjmessan/epsy-8282 | R | false | false | 7,272 | r | ##################################################
### Load libraries
##################################################
library(broom)
library(corrr)
library(dplyr)
library(ez)
library(ggplot2)
library(readr)
library(tidyr)
library(car)
###################################################
### Read in data
#########... |
rm(list=ls())
library(ggplot2)
dir <- paste0("Z:\\DEC\\Kimberley_Science_and_Sustainability_Strategy",
"\\Working\\Mitchell_Plateau\\Rapideye\\2014_cross_calibration")
setwd(dir)
cc <- c("integer", rep("numeric", 10))
df <- read.csv("2014_to_2012_cal.csv", header = TRUE, colClasses = cc)
dpi<-300
if... | /Regression model plot loop HELPER.R | no_license | Bartesto/helper_functions | R | false | false | 1,903 | r | rm(list=ls())
library(ggplot2)
dir <- paste0("Z:\\DEC\\Kimberley_Science_and_Sustainability_Strategy",
"\\Working\\Mitchell_Plateau\\Rapideye\\2014_cross_calibration")
setwd(dir)
cc <- c("integer", rep("numeric", 10))
df <- read.csv("2014_to_2012_cal.csv", header = TRUE, colClasses = cc)
dpi<-300
if... |
##########################################
# AUXILIAR FUNCTIONS AND PACKAGES REQUIRED
##########################################
# KernSmooth package.
#source("distpred_aux2.R")# AUXILIARES1 file.
#source("distpred_aux.R")# AUXILIARES file.
#require(KernSmooth)
################################
# INPUT PARAMET... | /R/distpred.R | no_license | cran/TSclust | R | false | false | 12,231 | r | ##########################################
# AUXILIAR FUNCTIONS AND PACKAGES REQUIRED
##########################################
# KernSmooth package.
#source("distpred_aux2.R")# AUXILIARES1 file.
#source("distpred_aux.R")# AUXILIARES file.
#require(KernSmooth)
################################
# INPUT PARAMET... |
\name{getPeakData}
\alias{getPeakData}
\title{Function to return data from the NWISWeb peak values service}
\usage{
getPeakData(sites)
}
\arguments{
\item{sites}{string containing the site for the
retrieval}
}
\value{
Peak a data frame containing columns 'Date' and
'Discharge'
}
\description{
This function ... | /R/RProjects/HITHATStats/man/getPeakData.Rd | no_license | jlthomps/EflowStats | R | false | false | 498 | rd | \name{getPeakData}
\alias{getPeakData}
\title{Function to return data from the NWISWeb peak values service}
\usage{
getPeakData(sites)
}
\arguments{
\item{sites}{string containing the site for the
retrieval}
}
\value{
Peak a data frame containing columns 'Date' and
'Discharge'
}
\description{
This function ... |
#EXPLORATORY ANALYSIS OF INSTAGRAM DATA
#Import instagram data and save it in object called "di"
di <- read.csv("data_insta_101817.csv")
#Summarizing the data gile
head(di)
#Saving the unique users in the vecor "uni"
uni <- unique(di$USERNAME)
#Counting the number of unique users
length(uni)
#Save matrix of userna... | /Quality_Score.R | no_license | SueYang/Imagion | R | false | false | 9,292 | r | #EXPLORATORY ANALYSIS OF INSTAGRAM DATA
#Import instagram data and save it in object called "di"
di <- read.csv("data_insta_101817.csv")
#Summarizing the data gile
head(di)
#Saving the unique users in the vecor "uni"
uni <- unique(di$USERNAME)
#Counting the number of unique users
length(uni)
#Save matrix of userna... |
testlist <- list(A = structure(c(2.31584307392681e+77, 5.26442100768605e-312, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_row... | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613102508-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 343 | r | testlist <- list(A = structure(c(2.31584307392681e+77, 5.26442100768605e-312, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_row... |
# Methods for lmer and for the objects that it produces
## Some utilities
## Return the pairs of expressions separated by vertical bars
findbars <- function(term)
{
if (is.name(term) || is.numeric(term)) return(NULL)
if (term[[1]] == as.name("(")) return(findbars(term[[2]]))
if (!is.call(term)) stop("term... | /branches/Matrix-mer2/R/lmer.R | no_license | LTLA/Matrix | R | false | false | 33,188 | r | # Methods for lmer and for the objects that it produces
## Some utilities
## Return the pairs of expressions separated by vertical bars
findbars <- function(term)
{
if (is.name(term) || is.numeric(term)) return(NULL)
if (term[[1]] == as.name("(")) return(findbars(term[[2]]))
if (!is.call(term)) stop("term... |
#' as.data.frame method for labelled vectors
#'
#' @param x a labelled vector
#' @param ... additional arguments to be passed to or from methods.
#' @export
as.data.frame.labelled <- function(x, ...) {
if (typeof(x) == "character") {
as.data.frame.character(x, stringsAsFactors = FALSE, ...)
} else {
as.data... | /R/as.data.frame.R | no_license | gdutz/labelled | R | false | false | 349 | r | #' as.data.frame method for labelled vectors
#'
#' @param x a labelled vector
#' @param ... additional arguments to be passed to or from methods.
#' @export
as.data.frame.labelled <- function(x, ...) {
if (typeof(x) == "character") {
as.data.frame.character(x, stringsAsFactors = FALSE, ...)
} else {
as.data... |
/scripts/plots/Java2/Rectangle/08/lines8.R | no_license | seminariosuacj/EyeTracking | R | false | false | 19,258 | r | ||
\name{PikHol}
\alias{PikHol}
\title{Optimal Inclusion Probabilities Under Multi-purpose Sampling}
\description{Computes the population vector of optimal inclusion probabilities under the Holmbergs's Approach}
\usage{
PikHol(n, sigma, e, Pi)
}
\arguments{
\item{n}{Vector of optimal sample sizes for each of the character... | /man/PikHol.rd | no_license | damarals/TeachingSampling | R | false | false | 3,576 | rd | \name{PikHol}
\alias{PikHol}
\title{Optimal Inclusion Probabilities Under Multi-purpose Sampling}
\description{Computes the population vector of optimal inclusion probabilities under the Holmbergs's Approach}
\usage{
PikHol(n, sigma, e, Pi)
}
\arguments{
\item{n}{Vector of optimal sample sizes for each of the character... |
library(RODBC)
myServer <- "localhost"
myUser <- "user"
myPassword <- "password"
myDatabase <- "petroleum"
myDriver <- "{SQL Server Native Client 11.0}"
connectionString <- paste0(
"Driver=", myDriver,
";Server=", myServer,
";Database=", myDatabase,
";Uid=", myUser,
";Pwd=", myPassword)
conn <- odbcDr... | /BasketAnalysis/Prepare.R | no_license | paloukari/Petroleum | R | false | false | 827 | r | library(RODBC)
myServer <- "localhost"
myUser <- "user"
myPassword <- "password"
myDatabase <- "petroleum"
myDriver <- "{SQL Server Native Client 11.0}"
connectionString <- paste0(
"Driver=", myDriver,
";Server=", myServer,
";Database=", myDatabase,
";Uid=", myUser,
";Pwd=", myPassword)
conn <- odbcDr... |
#Copyright (C) 2008 Peter Langfelder
#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... | /R/blockwiseModulesC.R | no_license | cran/WGCNA | R | false | false | 139,702 | r |
#Copyright (C) 2008 Peter Langfelder
#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... |
## Necesary Information for doing this assesment, is located into several files.
## There are several variables studied. From those variables we have several features derived.
## Variables are:
## - Triaxial acceleration from the accelerometer (total acceleration) and the estimated body acceleration.
## - Triaxial Angu... | /run_analysis.R | no_license | cvalls/GettingAndCleaningData | R | false | false | 14,695 | r | ## Necesary Information for doing this assesment, is located into several files.
## There are several variables studied. From those variables we have several features derived.
## Variables are:
## - Triaxial acceleration from the accelerometer (total acceleration) and the estimated body acceleration.
## - Triaxial Angu... |
#options(shiny.trace = TRUE)
options(warn=-1)
options(shiny.sanitize.errors = TRUE)
shinyServer(function(input, output, session) {
# Subjetivos --------------------------------------------------------------
output$botonesSubjetivos <- renderUI({
BotonesGenerales(dicSbj, cscl = "buttonStyle")
})
out... | /appCiudatos/server.R | no_license | espelaez/ciudatos-app-2 | R | false | false | 58,999 | r | #options(shiny.trace = TRUE)
options(warn=-1)
options(shiny.sanitize.errors = TRUE)
shinyServer(function(input, output, session) {
# Subjetivos --------------------------------------------------------------
output$botonesSubjetivos <- renderUI({
BotonesGenerales(dicSbj, cscl = "buttonStyle")
})
out... |
rm(list = ls())
#### Marcowiz
library('quadprog')
library('MASS')
mu <- matrix(c(0.0008,
0.0067,
0.0641,
0.0408,
0.0743,
0.0370,
0.0480,
0.0660),8,1)
colnames(mu)<-c("mean")
rownames(mu)<-c("US Bon... | /R/Financial_analytics_Portfolio_Optimization.R | no_license | Rajeshvegi/ISB_CBA | R | false | false | 11,680 | r | rm(list = ls())
#### Marcowiz
library('quadprog')
library('MASS')
mu <- matrix(c(0.0008,
0.0067,
0.0641,
0.0408,
0.0743,
0.0370,
0.0480,
0.0660),8,1)
colnames(mu)<-c("mean")
rownames(mu)<-c("US Bon... |
library(shiny)
library(visNetwork)
library(jsonlite)
library(curl)
library(dplyr)
library(stringr)
library(readr)
library(igraph)
source(file = 'igraph-data.R')
source(file = 'data.R')
shinyServer(function(input, output) {
my_id <- reactiveVal(c_my_id)
nodes <- reactiveVal(nodes)
net <- reactiveVal(net)
edg... | /network/shiny/server.R | permissive | bala-kuppusamy/visual-design | R | false | false | 3,629 | r | library(shiny)
library(visNetwork)
library(jsonlite)
library(curl)
library(dplyr)
library(stringr)
library(readr)
library(igraph)
source(file = 'igraph-data.R')
source(file = 'data.R')
shinyServer(function(input, output) {
my_id <- reactiveVal(c_my_id)
nodes <- reactiveVal(nodes)
net <- reactiveVal(net)
edg... |
Iconv <- function(x,from="",to="",...) UseMethod("Iconv")
Iconv.importer <- function(x,from="",to="",...){
x@.Data <- lapply(x@.Data,Iconv.item,from,to,...)
return(x)
}
Iconv.item <- function(x,from="",to="",...){
if(length(ann <- annotation(x)))
annotation(x) <- Iconv.annotation(ann,from=from,to=to,...)
... | /pkg/R/Iconv.R | no_license | miranda-chen/memisc | R | false | false | 769 | r | Iconv <- function(x,from="",to="",...) UseMethod("Iconv")
Iconv.importer <- function(x,from="",to="",...){
x@.Data <- lapply(x@.Data,Iconv.item,from,to,...)
return(x)
}
Iconv.item <- function(x,from="",to="",...){
if(length(ann <- annotation(x)))
annotation(x) <- Iconv.annotation(ann,from=from,to=to,...)
... |
.javaMem <- function(cmd) {
return(tryCatch({
cmd
},warning = function(w) {
cat(paste0(w))
}, error = function(e) {
if(grepl("OutOfMemoryError",e)) {
cat(paste0("Not enough memory allocated to Java.\n",
"Please restart R and run the command:\n",
" options(jav... | /R/utils.R | no_license | JacobCoblentz/BARP | R | false | false | 2,470 | r | .javaMem <- function(cmd) {
return(tryCatch({
cmd
},warning = function(w) {
cat(paste0(w))
}, error = function(e) {
if(grepl("OutOfMemoryError",e)) {
cat(paste0("Not enough memory allocated to Java.\n",
"Please restart R and run the command:\n",
" options(jav... |
##Requirement
#Loading the data
#When loading the dataset into R, please consider the following:
# The dataset has 2,075,259 rows and 9 columns. First calculate a rough estimate of how much memory the dataset will require in memory before reading into R. Make sure your computer has enough memory (most modern computers... | /Plot1.R | no_license | ablashknr/ExData_Plotting1 | R | false | false | 3,027 | r | ##Requirement
#Loading the data
#When loading the dataset into R, please consider the following:
# The dataset has 2,075,259 rows and 9 columns. First calculate a rough estimate of how much memory the dataset will require in memory before reading into R. Make sure your computer has enough memory (most modern computers... |
#' Two-item permutations
#'
#' Returns a vector of all possible 2-item permutations for elements in a vector
#' @param x A vector or an R object, which is coercible to one by as.vector(x, "numeric")
#' @param repeats logical. Can elements combine with themselves?
#' @usage permutation(x, repeats = FALSE)
#' @export
#' ... | /R/permutation.R | no_license | opelr/opelR | R | false | false | 825 | r | #' Two-item permutations
#'
#' Returns a vector of all possible 2-item permutations for elements in a vector
#' @param x A vector or an R object, which is coercible to one by as.vector(x, "numeric")
#' @param repeats logical. Can elements combine with themselves?
#' @usage permutation(x, repeats = FALSE)
#' @export
#' ... |
## This code takes cleaned Current Population Survey Data and produces
## Exhibits of trends and indicators of post-secondary education across
## years and birth cohorts of Americans
## Set up environment
rm(list=ls())
try(setwd("C:/Documents and Settings/nmader/My Documents/Google Drive/Lumina/Data and Documentatio... | /code/data-analysis/3-generate-counterfactuals.r | no_license | chapinhall/us-ed-in-context | R | false | false | 11,664 | r | ## This code takes cleaned Current Population Survey Data and produces
## Exhibits of trends and indicators of post-secondary education across
## years and birth cohorts of Americans
## Set up environment
rm(list=ls())
try(setwd("C:/Documents and Settings/nmader/My Documents/Google Drive/Lumina/Data and Documentatio... |
context("config")
test_that("spark_config_exists function works as expected", {
expect_false(
spark_config_exists(list(), "sparklyr.log.console", FALSE)
)
expect_true(
spark_config_exists(list(), "sparklyr.log.console", TRUE)
)
expect_false(
spark_config_exists(list("sparklyr.log.console"), "sp... | /tests/testthat/test-config.R | permissive | tnixon/sparklyr | R | false | false | 1,352 | r | context("config")
test_that("spark_config_exists function works as expected", {
expect_false(
spark_config_exists(list(), "sparklyr.log.console", FALSE)
)
expect_true(
spark_config_exists(list(), "sparklyr.log.console", TRUE)
)
expect_false(
spark_config_exists(list("sparklyr.log.console"), "sp... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y){
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(solveMatrix) ... | /cachematrix.R | no_license | Swingrose/ProgrammingAssignment2 | R | false | false | 828 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y){
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(solveMatrix) ... |
tracing_solution_server = function(input, output, session) {
#initial state
value = reactiveValues(full_table = tibble(Name = rep(c("Alex", "Blake", "Chris"), each = 2),
Category = rep(c("Policy", "Operations"),3),
Experie... | /Code/server/tracing_solution.R | permissive | davidmillson/2019-SG-R-User-Day | R | false | false | 2,011 | r | tracing_solution_server = function(input, output, session) {
#initial state
value = reactiveValues(full_table = tibble(Name = rep(c("Alex", "Blake", "Chris"), each = 2),
Category = rep(c("Policy", "Operations"),3),
Experie... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/notes.R
\name{note-equivalence}
\alias{note-equivalence}
\alias{note_is_equal}
\alias{note_is_identical}
\alias{pitch_is_equal}
\alias{pitch_is_identical}
\alias{octave_is_equal}
\alias{octave_is_identical}
\title{Note, pitch and chord equiva... | /man/note-equivalence.Rd | permissive | brunaw/tabr | R | false | true | 4,232 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/notes.R
\name{note-equivalence}
\alias{note-equivalence}
\alias{note_is_equal}
\alias{note_is_identical}
\alias{pitch_is_equal}
\alias{pitch_is_identical}
\alias{octave_is_equal}
\alias{octave_is_identical}
\title{Note, pitch and chord equiva... |
library(climatol)
### Name: rclimdex
### Title: Daily temperature data
### Aliases: rclimdex rcxsta df1 df2 df3
### Keywords: datasets
### ** Examples
data(rclimdex)
print(rcxsta)
head(df1)
#clean memory space:
rm(rcxsta, df1, df2, df3)
| /data/genthat_extracted_code/climatol/examples/rclimdex.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 244 | r | library(climatol)
### Name: rclimdex
### Title: Daily temperature data
### Aliases: rclimdex rcxsta df1 df2 df3
### Keywords: datasets
### ** Examples
data(rclimdex)
print(rcxsta)
head(df1)
#clean memory space:
rm(rcxsta, df1, df2, df3)
|
#' Formatting of data for node information.
#'
#' Formats digists and matrixes for node information printing.
#'
#' @param x Data to format
#' @param digit Number of digits to print
#' @param format Formatting of data.
#'
#' @return Formatted data.
#'
formatg <- function(x, digits = getOption("digits"),
... | /R/giniSplit.R | no_license | Terhon/MOW-RandomForest | R | false | false | 12,565 | r | #' Formatting of data for node information.
#'
#' Formats digists and matrixes for node information printing.
#'
#' @param x Data to format
#' @param digit Number of digits to print
#' @param format Formatting of data.
#'
#' @return Formatted data.
#'
formatg <- function(x, digits = getOption("digits"),
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/foo.R
\name{plot.pred.PrevMap}
\alias{plot.pred.PrevMap}
\title{Plot of a predicted surface}
\usage{
\method{plot}{pred.PrevMap}(x, type = NULL, summary = "predictions", ...)
}
\arguments{
\item{x}{an object of class "PrevMap".}
\item{type}{... | /man/plot.pred.PrevMap.Rd | no_license | cran/PrevMap | R | false | true | 1,220 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/foo.R
\name{plot.pred.PrevMap}
\alias{plot.pred.PrevMap}
\title{Plot of a predicted surface}
\usage{
\method{plot}{pred.PrevMap}(x, type = NULL, summary = "predictions", ...)
}
\arguments{
\item{x}{an object of class "PrevMap".}
\item{type}{... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{Match.file.hash.history}
\alias{Match.file.hash.history}
\title{Matches hash of target file to target file in depenency tree}
\usage{
Match.file.hash.history(git.dir, file.for.hashing)
}
\arguments{
\item{git.dir}{git directory}
\item{file.for.hashing}{in file... | /man/Match.file.hash.history.Rd | no_license | emilyburnett/IT2 | R | false | false | 516 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{Match.file.hash.history}
\alias{Match.file.hash.history}
\title{Matches hash of target file to target file in depenency tree}
\usage{
Match.file.hash.history(git.dir, file.for.hashing)
}
\arguments{
\item{git.dir}{git directory}
\item{file.for.hashing}{in file... |
## This function calculates the inverse of a matrix and
## saves it to the cache. In this way, the next time
## you need calculate the inverse of a matrix, the previously
## saved value is returned instead of repeting the calculation
## This function creates a special matrix ( is really a list)
makeCacheMatrix <- func... | /cachematrixprueba.R | no_license | belenlu/ProgrammingAssignment2 | R | false | false | 1,798 | r | ## This function calculates the inverse of a matrix and
## saves it to the cache. In this way, the next time
## you need calculate the inverse of a matrix, the previously
## saved value is returned instead of repeting the calculation
## This function creates a special matrix ( is really a list)
makeCacheMatrix <- func... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.histograms.R
\docType{methods}
\name{plot.histograms}
\alias{plot.histograms}
\alias{plot.histograms,Rscexv-method}
\title{description of function plot.histograms}
\usage{
plot.histograms(dataObj, cuts = vector("list", 1), subpath = "pre... | /man/plot.histograms-methods.Rd | no_license | stela2502/Rscexv | R | false | true | 662 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.histograms.R
\docType{methods}
\name{plot.histograms}
\alias{plot.histograms}
\alias{plot.histograms,Rscexv-method}
\title{description of function plot.histograms}
\usage{
plot.histograms(dataObj, cuts = vector("list", 1), subpath = "pre... |
## ----echo=FALSE----------------------------------------------------------
library(knitr)
opts_chunk$set(size="footnotesize")
## set the working directory
##setwd('../tex');
## ----echo=FALSE, results='asis', fig.height = 4, fig.width = 6, fig.cap = 'The function $y = 2 + 3x -x^2$ with the value of $x$ that maximise... | /tmbIntro/tmbIntro.R | no_license | mintoc/environmetrics | R | false | false | 4,903 | r | ## ----echo=FALSE----------------------------------------------------------
library(knitr)
opts_chunk$set(size="footnotesize")
## set the working directory
##setwd('../tex');
## ----echo=FALSE, results='asis', fig.height = 4, fig.width = 6, fig.cap = 'The function $y = 2 + 3x -x^2$ with the value of $x$ that maximise... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/performance.R
\name{performance}
\alias{performance}
\title{Performance map profile}
\usage{
performance(FUN = mean, units = "days")
}
\arguments{
\item{FUN}{A summary function to be called on the process time of a specific activity, e.g. mea... | /man/performance.Rd | no_license | BijsT/processmapR-1 | R | false | true | 599 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/performance.R
\name{performance}
\alias{performance}
\title{Performance map profile}
\usage{
performance(FUN = mean, units = "days")
}
\arguments{
\item{FUN}{A summary function to be called on the process time of a specific activity, e.g. mea... |
##STA693 HW1 ##
##Xuan Shi ##
##install packages
# install.packages("tidyverse")
# install.packages("nycflights13")
## load libraries
library(tidyverse)
library(dplyr)
library(nycflights13)
## dataset for assignment
flights
summary(flights)
# check on-line for coding manuel #
# https://www2.stat.duke.edu/courses/Sp... | /693 Spring 2018 Assignment 1.R | no_license | KristenMcQuerry/XuanShi | R | false | false | 2,632 | r | ##STA693 HW1 ##
##Xuan Shi ##
##install packages
# install.packages("tidyverse")
# install.packages("nycflights13")
## load libraries
library(tidyverse)
library(dplyr)
library(nycflights13)
## dataset for assignment
flights
summary(flights)
# check on-line for coding manuel #
# https://www2.stat.duke.edu/courses/Sp... |
#
# Author: Daniel Dittenhafer
#
# Created: Aug 31, 2014
#
# Description: Answers to Week 2 Quiz
#
# 1. Create a vector that contains 20 numbers.
myFirstVector <- c(2,4,4,6,8,9,10,12,13,13,15,16,18,19,20,21,21,24,25,26)
length(myFirstVector) # = 20
# 2. Use R to convert the vector from question 1 into a char... | /Week2-Quiz.R | permissive | dwdii/DataAcqMgmt | R | false | false | 5,248 | r | #
# Author: Daniel Dittenhafer
#
# Created: Aug 31, 2014
#
# Description: Answers to Week 2 Quiz
#
# 1. Create a vector that contains 20 numbers.
myFirstVector <- c(2,4,4,6,8,9,10,12,13,13,15,16,18,19,20,21,21,24,25,26)
length(myFirstVector) # = 20
# 2. Use R to convert the vector from question 1 into a char... |
## These two functions that are used to create a special object
## that stores a matrix and caches its inverse to avoid the
## costly computation associated with this.
##
## Phillip Owens 01 December 2017
## This function creates a special "matrix" object
## that can cache its inverse
makeCacheMatrix <- function(x =... | /cachematrix.R | no_license | phillipowens/ProgrammingAssignment2 | R | false | false | 1,212 | r | ## These two functions that are used to create a special object
## that stores a matrix and caches its inverse to avoid the
## costly computation associated with this.
##
## Phillip Owens 01 December 2017
## This function creates a special "matrix" object
## that can cache its inverse
makeCacheMatrix <- function(x =... |
#! /usr/bin/Rscript
## El archivo con el mínimo es:
## dos_elipses_0.70_0.006.mse
args <- commandArgs(trailingOnly=TRUE)
if (length(args) != 1) {
message("Missing file name")
quit()
}
mseAvgFile <- paste0(args[1], ".mse.avg")
outputFile <- paste0(args[1], ".png")
table = read.table(mseAvgFile,header=FALSE)
c... | /dos_elipses/graph_local_min.r | no_license | MatiRC94/ML | R | false | false | 1,740 | r | #! /usr/bin/Rscript
## El archivo con el mínimo es:
## dos_elipses_0.70_0.006.mse
args <- commandArgs(trailingOnly=TRUE)
if (length(args) != 1) {
message("Missing file name")
quit()
}
mseAvgFile <- paste0(args[1], ".mse.avg")
outputFile <- paste0(args[1], ".png")
table = read.table(mseAvgFile,header=FALSE)
c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.R
\name{LoadMap}
\alias{LoadMap}
\title{Read .shp file and attach strata names to the object}
\usage{
LoadMap(map.file, type = "df")
}
\arguments{
\item{map.file}{The path to the .shp file to be read in}
\item{type}{Either "df" to retur... | /man/LoadMap.Rd | permissive | USFWS/AKaerial | R | false | true | 820 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.R
\name{LoadMap}
\alias{LoadMap}
\title{Read .shp file and attach strata names to the object}
\usage{
LoadMap(map.file, type = "df")
}
\arguments{
\item{map.file}{The path to the .shp file to be read in}
\item{type}{Either "df" to retur... |
\name{resamp.3i}
\alias{resamp.3i}
\title{randomizing a species-by-plots matrix: '3i' of Hardy (2008)}
\usage{resamp.3i(obj)}
\arguments{
\item{obj}{a species-by-plots matrix}
}
\details{A resampling procedure for a species-by-plots matrix, where observed abundances are shuffled within species and among plots.}
... | /checkpoints/archive/2010/04.2010/04.24.2010/spacodi/man/resamp.3i.Rd | no_license | eastman/spacodiR | R | false | false | 946 | rd | \name{resamp.3i}
\alias{resamp.3i}
\title{randomizing a species-by-plots matrix: '3i' of Hardy (2008)}
\usage{resamp.3i(obj)}
\arguments{
\item{obj}{a species-by-plots matrix}
}
\details{A resampling procedure for a species-by-plots matrix, where observed abundances are shuffled within species and among plots.}
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lm.r
\name{fit_lm}
\alias{fit_lm}
\title{Fit a linear model fitted with ordinary least squares}
\usage{
fit_lm(x, y, formula = y ~ ., ...)
}
\arguments{
\item{x}{Descriptors.}
\item{y}{Response, numeric.}
\item{formula}{See \code{\link{lm}}... | /man/fit_lm.Rd | no_license | cran/emil | R | false | true | 577 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lm.r
\name{fit_lm}
\alias{fit_lm}
\title{Fit a linear model fitted with ordinary least squares}
\usage{
fit_lm(x, y, formula = y ~ ., ...)
}
\arguments{
\item{x}{Descriptors.}
\item{y}{Response, numeric.}
\item{formula}{See \code{\link{lm}}... |
# setwd('D:/DO/eDO_datathon')
data_folder <- 'data/input/'
# LIBRARIES --------------------------------------------------------------------
library(data.table)
source('code/tools_R.R')
# LOADS ------------------------------------------------------------------------
df_clus <- fread(paste0(data_folder,'generated_by_us/... | /code/04_feature_engineering.R | no_license | patriciamv/eDO_datathon | R | false | false | 1,566 | r | # setwd('D:/DO/eDO_datathon')
data_folder <- 'data/input/'
# LIBRARIES --------------------------------------------------------------------
library(data.table)
source('code/tools_R.R')
# LOADS ------------------------------------------------------------------------
df_clus <- fread(paste0(data_folder,'generated_by_us/... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/knit_utils.R
\name{rres_knit_solutions_date}
\alias{rres_knit_solutions_date}
\title{Render two versions of a file, with and without solutions}
\usage{
rres_knit_solutions_date(input, ...)
}
\arguments{
\item{input}{text: the name of the file... | /man/rres_knit_solutions_date.Rd | permissive | DATA-413-613-Master/rresutils | R | false | true | 1,332 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/knit_utils.R
\name{rres_knit_solutions_date}
\alias{rres_knit_solutions_date}
\title{Render two versions of a file, with and without solutions}
\usage{
rres_knit_solutions_date(input, ...)
}
\arguments{
\item{input}{text: the name of the file... |
library(bang)
### Name: sim_pred_beta_binom
### Title: Simulate from a beta-binomial posterior predictive distribution
### Aliases: sim_pred_beta_binom
### ** Examples
rat_res <- hef(model = "beta_binom", data = rat)
rat_sim_pred <- sim_pred_beta_binom(rat_res$theta_sim_vals, rat, 50)
| /data/genthat_extracted_code/bang/examples/sim_pred_beta_binom.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 293 | r | library(bang)
### Name: sim_pred_beta_binom
### Title: Simulate from a beta-binomial posterior predictive distribution
### Aliases: sim_pred_beta_binom
### ** Examples
rat_res <- hef(model = "beta_binom", data = rat)
rat_sim_pred <- sim_pred_beta_binom(rat_res$theta_sim_vals, rat, 50)
|
x <- rep(1, length.out=100)
y <- x
for (i in 1:1000) {
x[i+1] = 1/y[i]
y[i+1] =
z[i+1] = y[i]*2
}
plot(x,y, type="l")
cbind(x,y)
# See http://en.wikipedia.org/wiki/List_of_chaotic_maps
a = 1.2
b = 1
n = 500
x0 = pi+0.4
y0 = pi
x = rep(x0, length.out=n)
y = rep(y0, length.out=n)
for (i in 1:n){
x[i+1]... | /oldcode/embeddingexample.R | no_license | noamross/S-Maps | R | false | false | 465 | r | x <- rep(1, length.out=100)
y <- x
for (i in 1:1000) {
x[i+1] = 1/y[i]
y[i+1] =
z[i+1] = y[i]*2
}
plot(x,y, type="l")
cbind(x,y)
# See http://en.wikipedia.org/wiki/List_of_chaotic_maps
a = 1.2
b = 1
n = 500
x0 = pi+0.4
y0 = pi
x = rep(x0, length.out=n)
y = rep(y0, length.out=n)
for (i in 1:n){
x[i+1]... |
#Set up
install.packages("dplyr")
update.packages("dplyr")
library(dplyr)
install.packages("NHANES")
library(NHANES)
data(NHANES)
?NHANES
dim(NHANES) #n = 10,000 obs. of 76 variables
library(tidyverse)
#A. Data cleaning + Defining population
#Selecting adults >18
nhanes_adult <- subset(NHANES, NHANES$Age >= 18)
dim(... | /Sleep <7.R | no_license | fatima1397/Stats-Project-1---Sleep | R | false | false | 8,494 | r | #Set up
install.packages("dplyr")
update.packages("dplyr")
library(dplyr)
install.packages("NHANES")
library(NHANES)
data(NHANES)
?NHANES
dim(NHANES) #n = 10,000 obs. of 76 variables
library(tidyverse)
#A. Data cleaning + Defining population
#Selecting adults >18
nhanes_adult <- subset(NHANES, NHANES$Age >= 18)
dim(... |
library(RMySQL)
del_crisis_bow <- "truncate table crisis_bow"
dbGetQuery(con, del_crisis_bow)
cri_rank_attach <- function(filename)
{
word_vector <- readLines(filename)
idxMat <- matrix(rep(0, length(word_vector)),, 1)
idxMat[which(word_vector=="1")] <- 1
idxMat[which(word_vector=="1")+1] <- 1
... | /Text Mining/Keyword Analysis_R/db_insert_crisis_bag_of_words.R | no_license | ArialChan/Experiment | R | false | false | 5,154 | r | library(RMySQL)
del_crisis_bow <- "truncate table crisis_bow"
dbGetQuery(con, del_crisis_bow)
cri_rank_attach <- function(filename)
{
word_vector <- readLines(filename)
idxMat <- matrix(rep(0, length(word_vector)),, 1)
idxMat[which(word_vector=="1")] <- 1
idxMat[which(word_vector=="1")+1] <- 1
... |
#' Print a simmr output object
#'
#' @param x An object of class \code{simmr_output}
#' @param ... Other arguments (not supported)
#'
#' @return Returns a neat summary of the object
#'
#' @seealso \code{\link{simmr_mcmc}} for creating \code{simmr_output} objects
#' @export
print.simmr_output <-
function(x,...) {
cat... | /R/print.simmr_output.R | no_license | PhDMeiwp/simmr | R | false | false | 839 | r | #' Print a simmr output object
#'
#' @param x An object of class \code{simmr_output}
#' @param ... Other arguments (not supported)
#'
#' @return Returns a neat summary of the object
#'
#' @seealso \code{\link{simmr_mcmc}} for creating \code{simmr_output} objects
#' @export
print.simmr_output <-
function(x,...) {
cat... |
## Course Project 2 : plot1.R
## Questions
## 1. Have total emissions from PM2.5 decreased in the United States from 1999 to 2008?
## Using the base plotting system, make a plot showing the total PM2.5 emission from
## all sources for each of the years 1999, 2002, 2005, and 2008.
## Libraries
library... | /plot1.R | no_license | charlesaraya/ExploratoyData | R | false | false | 1,821 | r | ## Course Project 2 : plot1.R
## Questions
## 1. Have total emissions from PM2.5 decreased in the United States from 1999 to 2008?
## Using the base plotting system, make a plot showing the total PM2.5 emission from
## all sources for each of the years 1999, 2002, 2005, and 2008.
## Libraries
library... |
library(data.table)
library("smooth")
setwd("//cdc.gov/private/L137/yks5/OMSA/ISYE6501/hw3")
setwd("G:/a-XiaoWang/OMSA/ISYE-6501/hw2")
#Question 7.2
Using the 20 years of daily high temperature data for Atlanta (July through October) from Question 6.2
(file temps.txt), build and use an exponential smoothing mod... | /hw3/My code and submission/hw3.R | no_license | aten2001/ISYE-6503 | R | false | false | 9,347 | r | library(data.table)
library("smooth")
setwd("//cdc.gov/private/L137/yks5/OMSA/ISYE6501/hw3")
setwd("G:/a-XiaoWang/OMSA/ISYE-6501/hw2")
#Question 7.2
Using the 20 years of daily high temperature data for Atlanta (July through October) from Question 6.2
(file temps.txt), build and use an exponential smoothing mod... |
library(shiny)
# Define UI for application that draws a histogram
shinyUI(fluidPage(
# Application title
titlePanel("Portfolio Optimizer"),
# Sidebar with a slider input for the number of bins
sidebarLayout(
sidebarPanel(
h3("Configure Portfolio"),
p("Information calculated using historic... | /ui.R | no_license | cowls/portfolio_optimizer | R | false | false | 721 | r | library(shiny)
# Define UI for application that draws a histogram
shinyUI(fluidPage(
# Application title
titlePanel("Portfolio Optimizer"),
# Sidebar with a slider input for the number of bins
sidebarLayout(
sidebarPanel(
h3("Configure Portfolio"),
p("Information calculated using historic... |
library(xkcd)
### Name: xkcd-package
### Title: Plotting ggplot2 Graphics in an XKCD Style
### Aliases: xkcd-package xkcd
### Keywords: package
### ** Examples
## Not run: vignette("xkcd-intro")
| /data/genthat_extracted_code/xkcd/examples/xkcd-package.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 202 | r | library(xkcd)
### Name: xkcd-package
### Title: Plotting ggplot2 Graphics in an XKCD Style
### Aliases: xkcd-package xkcd
### Keywords: package
### ** Examples
## Not run: vignette("xkcd-intro")
|
## Check non-eyetracking results
trialInfo = data.frame(participantNumber=numeric(), trialNum=numeric(), TargetPresent=numeric(), betea=numeric(), seed=numeric(), x=numeric(), y=numeric(), RT=numeric())
for (person in people)
{
dat = read.csv(paste("../results/ac_", person, "_vs.txt", sep=""))
# if (person>2)
# {
... | /TextureExpReplication/analysis/basicAnalysis.R | no_license | Riadsala/2015-StochasticSearch | R | false | false | 731 | r | ## Check non-eyetracking results
trialInfo = data.frame(participantNumber=numeric(), trialNum=numeric(), TargetPresent=numeric(), betea=numeric(), seed=numeric(), x=numeric(), y=numeric(), RT=numeric())
for (person in people)
{
dat = read.csv(paste("../results/ac_", person, "_vs.txt", sep=""))
# if (person>2)
# {
... |
#' Events_ReClassification
#'
#' EventPointer can detect splicing events that cannot
#' be cataloged in any of the canonical types
#' (Cassette Exon, Alternative 3' or 5' splice site,
#' retained intron and mutually exclusive exon).
#' These events are classified as "Complex Events".
#' With this function, Ev... | /R/Events_ReClassification.R | no_license | jpromeror/EventPointer | R | false | false | 3,680 | r | #' Events_ReClassification
#'
#' EventPointer can detect splicing events that cannot
#' be cataloged in any of the canonical types
#' (Cassette Exon, Alternative 3' or 5' splice site,
#' retained intron and mutually exclusive exon).
#' These events are classified as "Complex Events".
#' With this function, Ev... |
library(twitteR)
library(lubridate)
library(ggplot2)
library(tm)
library(wordcloud)
consumerKey='x'
consumerSecret='x'
accesstoken ='x'
tokensecret = 'x'
#establishing connection with Twitter api
setup_twitter_oauth(consumerKey,
consumerSecret,
accesstoken,
... | /twitter_analysis.R | no_license | amrrs/TwitterAnalysis-in-R | R | false | false | 9,722 | r | library(twitteR)
library(lubridate)
library(ggplot2)
library(tm)
library(wordcloud)
consumerKey='x'
consumerSecret='x'
accesstoken ='x'
tokensecret = 'x'
#establishing connection with Twitter api
setup_twitter_oauth(consumerKey,
consumerSecret,
accesstoken,
... |
## Adjust last interval for age structure
## produces table of adjustment factors for open interval (theta --
## not to be confused with other theta concerning PYL modeling)
## We want to know how adjustments for open interval for
## all of our countries.
library(data.table)
## We can use Wuhan single age up to 99
##... | /progs/original_code/age_structure_adjustment.R | no_license | josh-goldstein-git/dempersp_covid_mortality | R | false | false | 5,180 | r | ## Adjust last interval for age structure
## produces table of adjustment factors for open interval (theta --
## not to be confused with other theta concerning PYL modeling)
## We want to know how adjustments for open interval for
## all of our countries.
library(data.table)
## We can use Wuhan single age up to 99
##... |
testlist <- list(doy = c(4.62595082430429e-312, 3.64097969159734e-277, -0.427429395729092, 2.09887675795476e-104, 1.55322770574539e-47, 1.45474215376015e+135, 3.56441595774554e+114, -2.64525441665141e+303, -9.52682579807939e+139, -3.98397314603138e+183, -1.77863325536183e+126, 6.42851301544252e-310, 1.6601383076532... | /meteor/inst/testfiles/Photoperiod/AFL_Photoperiod/Photoperiod_valgrind_files/1615769288-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 683 | r | testlist <- list(doy = c(4.62595082430429e-312, 3.64097969159734e-277, -0.427429395729092, 2.09887675795476e-104, 1.55322770574539e-47, 1.45474215376015e+135, 3.56441595774554e+114, -2.64525441665141e+303, -9.52682579807939e+139, -3.98397314603138e+183, -1.77863325536183e+126, 6.42851301544252e-310, 1.6601383076532... |
library(shiny)
library(stringr)
library(MALDIHDX)
library(DT)
library(shinyjs)
library(ggplot2)
library(shinythemes)
library(MALDIquantForeign)
library(MALDIquantForeign)
library(reshape2)
options(shiny.maxRequestSize = 30*1024^2)
defSNR = 5
# Define UI
ui <- fluidPage(theme=shinytheme("cerulean"),
... | /app.R | no_license | jaredraynes/MALDIHDXShiny | R | false | false | 30,754 | r |
library(shiny)
library(stringr)
library(MALDIHDX)
library(DT)
library(shinyjs)
library(ggplot2)
library(shinythemes)
library(MALDIquantForeign)
library(MALDIquantForeign)
library(reshape2)
options(shiny.maxRequestSize = 30*1024^2)
defSNR = 5
# Define UI
ui <- fluidPage(theme=shinytheme("cerulean"),
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Phemd-methods.R
\name{seuratInfo}
\alias{seuratInfo}
\title{Accessor function for stored Seurat object within Phemd object}
\usage{
seuratInfo(obj)
}
\arguments{
\item{obj}{A Phemd object.}
}
\value{
An object of class 'Seurat'
}
\description... | /man/seuratInfo.Rd | no_license | zorrodong/phemd | R | false | true | 510 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Phemd-methods.R
\name{seuratInfo}
\alias{seuratInfo}
\title{Accessor function for stored Seurat object within Phemd object}
\usage{
seuratInfo(obj)
}
\arguments{
\item{obj}{A Phemd object.}
}
\value{
An object of class 'Seurat'
}
\description... |
####************************************************************************####
#### WRAPS ####
# leadingSNP<-function(dat, significancecol='significance',window=5e4){
#
# colnames(dat) [which(colnames(dat) == significancecol)] <- 'significance'
#
# dat <- dat %>%
# mutate(posround=round(pos / window)*wi... | /R/gemma.R | no_license | MoisesExpositoAlonso/napML | R | false | false | 11,415 | r | ####************************************************************************####
#### WRAPS ####
# leadingSNP<-function(dat, significancecol='significance',window=5e4){
#
# colnames(dat) [which(colnames(dat) == significancecol)] <- 'significance'
#
# dat <- dat %>%
# mutate(posround=round(pos / window)*wi... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/unnest.R
\name{unnest_}
\alias{unnest_}
\title{Standard-evaluation version of \code{unnest}.}
\usage{
unnest_(data, col)
}
\arguments{
\item{data}{A data frame.}
\item{col}{Name of column that needs to be unnested.}
}
\description{
T... | /man/unnest_.Rd | no_license | statisfactions/tidyr | R | false | false | 344 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/unnest.R
\name{unnest_}
\alias{unnest_}
\title{Standard-evaluation version of \code{unnest}.}
\usage{
unnest_(data, col)
}
\arguments{
\item{data}{A data frame.}
\item{col}{Name of column that needs to be unnested.}
}
\description{
T... |
rm(list=ls())
library(pROC)
training<-read.csv("F:/Thesis/DataMing+MachieLeaning/CAD/Common5/CAD Dataset Train70p.csv")
testing<-read.csv("F:/Thesis/DataMing+MachieLeaning/CAD/Common5/CAD Dataset Test30p.csv")
library(caret)
# logit <- glm(target ~ cp+ca+thal, family='binomial', data=training)
# print(summary(log... | /Common5/LOG_REG.R | permissive | UtshaDas/CAD-Classification | R | false | false | 1,718 | r | rm(list=ls())
library(pROC)
training<-read.csv("F:/Thesis/DataMing+MachieLeaning/CAD/Common5/CAD Dataset Train70p.csv")
testing<-read.csv("F:/Thesis/DataMing+MachieLeaning/CAD/Common5/CAD Dataset Test30p.csv")
library(caret)
# logit <- glm(target ~ cp+ca+thal, family='binomial', data=training)
# print(summary(log... |
#' @title
#' Coefficient of variation
#'
#' @description
#' Compute the coefficient of variation of a numeric vector \code{x},
#' defined as the ratio between the standard deviation and the mean.
#'
#' @param x
#' numeric. A numeric vector.
#'
#' @param na_rm
#' logical. Should missing values be remov... | /R/cv.R | no_license | cran/statip | R | false | false | 912 | r | #' @title
#' Coefficient of variation
#'
#' @description
#' Compute the coefficient of variation of a numeric vector \code{x},
#' defined as the ratio between the standard deviation and the mean.
#'
#' @param x
#' numeric. A numeric vector.
#'
#' @param na_rm
#' logical. Should missing values be remov... |
library(mvMonitoring)
### Name: mspProcessData
### Title: Simulate Normal or Fault Observations from a Single-State or
### Multi-State Process
### Aliases: mspProcessData
### ** Examples
## Not run:
##D # cut down on R CMD check time
##D
##D mspProcessData(faults = "All")
##D
## End(Not run)
| /data/genthat_extracted_code/mvMonitoring/examples/mspProcessData.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 309 | r | library(mvMonitoring)
### Name: mspProcessData
### Title: Simulate Normal or Fault Observations from a Single-State or
### Multi-State Process
### Aliases: mspProcessData
### ** Examples
## Not run:
##D # cut down on R CMD check time
##D
##D mspProcessData(faults = "All")
##D
## End(Not run)
|
rm(list=ls())
source("helper/useful.R")
d <- read.csv("data/paper/2013_MathAnxiety.csv")
## average the measures
names(d)[6:21]
names(d)[25:36]
names(d)[c(25,32,36)]
d$anxiety <- rowMeans(d[,6:21],na.rm=TRUE)
d$mindset <- rowMeans(d[,25:36],na.rm=TRUE)
d$mindset2 <- rowMeans(d[,c(25,32,36)],na.rm=TRUE)
## aggregate a... | /2-math anxiety.R | permissive | langcog/mentalabacus | R | false | false | 1,213 | r | rm(list=ls())
source("helper/useful.R")
d <- read.csv("data/paper/2013_MathAnxiety.csv")
## average the measures
names(d)[6:21]
names(d)[25:36]
names(d)[c(25,32,36)]
d$anxiety <- rowMeans(d[,6:21],na.rm=TRUE)
d$mindset <- rowMeans(d[,25:36],na.rm=TRUE)
d$mindset2 <- rowMeans(d[,c(25,32,36)],na.rm=TRUE)
## aggregate a... |
library(shiny)
library(tidyverse)
library(sweep)
library(DT)
library(qgraph)
library(shinythemes)
library(rcmdcheck)
######## The code for data processing ############################
load(file = 'data/transaction_data.RData')
load(file = 'data/product.RData')
# removing dirty commodity description and joining the tw... | /DunnhumbyDashboard/global.r | no_license | stanley97dion/ISSS603_Project | R | false | false | 1,859 | r | library(shiny)
library(tidyverse)
library(sweep)
library(DT)
library(qgraph)
library(shinythemes)
library(rcmdcheck)
######## The code for data processing ############################
load(file = 'data/transaction_data.RData')
load(file = 'data/product.RData')
# removing dirty commodity description and joining the tw... |
# tabela com dados de todo o brasil do IBGE
tab <- read.csv("../tabela-regionaisIBGE.csv")
### 1. Qual é o estado?
tabuf <- subset(tab, Nome_UF=="São Paulo")
unique(tabuf$Nome_Microrregião)
unique(tabuf$Nome_Mesorregião)
### 2. O que temos desse estado no banco de dados?
library("AlertTools"); library(assertthat) ; ... | /config/configNovoMun.R | no_license | marfcg/AlertaDengueAnalise | R | false | false | 6,922 | r | # tabela com dados de todo o brasil do IBGE
tab <- read.csv("../tabela-regionaisIBGE.csv")
### 1. Qual é o estado?
tabuf <- subset(tab, Nome_UF=="São Paulo")
unique(tabuf$Nome_Microrregião)
unique(tabuf$Nome_Mesorregião)
### 2. O que temos desse estado no banco de dados?
library("AlertTools"); library(assertthat) ; ... |
source("functions.R")
set.seed(2) #1 good
neach=10
means=expand.grid(rep=1:neach,mu1=c(2,15)*5,mu2=c(2,15))[,-1]
dat=rpois(prod(dim(means)),lambda = as.matrix(means))
dat_mat=matrix(dat,ncol=2)
lambdas=seq(0,3,length.out = 30)
beta_out<-clust_path(dat_mat,lambdas,tau=Inf,weights=FALSE)
plot_path_2d_alt(dat_mat,beta... | /my_lqa_mult_optim.R | no_license | gordy2x/clustnet2 | R | false | false | 2,208 | r | source("functions.R")
set.seed(2) #1 good
neach=10
means=expand.grid(rep=1:neach,mu1=c(2,15)*5,mu2=c(2,15))[,-1]
dat=rpois(prod(dim(means)),lambda = as.matrix(means))
dat_mat=matrix(dat,ncol=2)
lambdas=seq(0,3,length.out = 30)
beta_out<-clust_path(dat_mat,lambdas,tau=Inf,weights=FALSE)
plot_path_2d_alt(dat_mat,beta... |
% Generated by roxygen2 (4.0.0): do not edit by hand
\name{sanitize_text}
\alias{sanitize_text}
\title{sanitize_text}
\usage{
sanitize_text(input_text)
}
\arguments{
\item{input_text}{The input text}
}
\description{
Removes UTF8 characters from text columns
}
\examples{
\dontrun{
sanitize_text("This is some bad text \\... | /man/sanitize_text.Rd | no_license | frackham/testdat | R | false | false | 369 | rd | % Generated by roxygen2 (4.0.0): do not edit by hand
\name{sanitize_text}
\alias{sanitize_text}
\title{sanitize_text}
\usage{
sanitize_text(input_text)
}
\arguments{
\item{input_text}{The input text}
}
\description{
Removes UTF8 characters from text columns
}
\examples{
\dontrun{
sanitize_text("This is some bad text \\... |
library(httr)
library(jsonlite)
library(dplyr)
library(tidyr)
source("create_table.R")
return_summary <- function(basic_table, cuisine1, cuisine2) {
cuisine1_table <- mutate(basic_table, is1 = lapply(attributes.cuisine, element, cuisine1)) %>%
filter(is1 == TRUE)
cuisine2_table <- mutate(basic_table, is1 = l... | /andy_part.R | no_license | AndyChenHe/Cuisine_final | R | false | false | 5,541 | r | library(httr)
library(jsonlite)
library(dplyr)
library(tidyr)
source("create_table.R")
return_summary <- function(basic_table, cuisine1, cuisine2) {
cuisine1_table <- mutate(basic_table, is1 = lapply(attributes.cuisine, element, cuisine1)) %>%
filter(is1 == TRUE)
cuisine2_table <- mutate(basic_table, is1 = l... |
packages = c(
'bs4Dash',
'DT',
'here',
'leaflet',
'leaflet.extras',
'lubridate',
'MASS',
'RCurl',
'rjson',
'shiny',
'tidyverse',
'plotly'
)
### Deployment
for(p in packages){
if(!require(p, character.only = T)){
install.packages(p)
}
library(p, character.only = T)
}
# Overcome limita... | /R/packages.R | no_license | tws4793/va-housing | R | false | false | 523 | r | packages = c(
'bs4Dash',
'DT',
'here',
'leaflet',
'leaflet.extras',
'lubridate',
'MASS',
'RCurl',
'rjson',
'shiny',
'tidyverse',
'plotly'
)
### Deployment
for(p in packages){
if(!require(p, character.only = T)){
install.packages(p)
}
library(p, character.only = T)
}
# Overcome limita... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genomics_objects.R
\name{SearchAnnotationsRequest}
\alias{SearchAnnotationsRequest}
\title{SearchAnnotationsRequest Object}
\usage{
SearchAnnotationsRequest(annotationSetIds = NULL, pageSize = NULL,
pageToken = NULL, range = NULL)
}
\argume... | /googlegenomicsv1beta2.auto/man/SearchAnnotationsRequest.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 917 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genomics_objects.R
\name{SearchAnnotationsRequest}
\alias{SearchAnnotationsRequest}
\title{SearchAnnotationsRequest Object}
\usage{
SearchAnnotationsRequest(annotationSetIds = NULL, pageSize = NULL,
pageToken = NULL, range = NULL)
}
\argume... |
#### ff_rosters (Fleaflicker) ####
#' Get a dataframe of roster data
#'
#' @param conn a conn object created by `ff_connect()`
#' @param ... arguments passed to other methods (currently none)
#'
#' @examples
#' \donttest{
#' joe_conn <- ff_connect(platform = "fleaflicker", league_id = 312861, season = 2020)
#' ff_rost... | /R/flea_rosters.R | permissive | jpiburn/ffscrapr | R | false | false | 1,431 | r | #### ff_rosters (Fleaflicker) ####
#' Get a dataframe of roster data
#'
#' @param conn a conn object created by `ff_connect()`
#' @param ... arguments passed to other methods (currently none)
#'
#' @examples
#' \donttest{
#' joe_conn <- ff_connect(platform = "fleaflicker", league_id = 312861, season = 2020)
#' ff_rost... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/estimate_formation_head.R
\name{estimate_formation_head}
\alias{estimate_formation_head}
\title{Estimate formation heads given a set of transmissivity values and blended
head measurements.}
\usage{
estimate_formation_head(transmissivity, blen... | /man/estimate_formation_head.Rd | no_license | jkennel/sokol | R | false | true | 2,175 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/estimate_formation_head.R
\name{estimate_formation_head}
\alias{estimate_formation_head}
\title{Estimate formation heads given a set of transmissivity values and blended
head measurements.}
\usage{
estimate_formation_head(transmissivity, blen... |
# renv::init()
# renv::snapshot()
renv::restore()
| /code/install_packages.R | no_license | hugheylab/bloodCCD_analysis | R | false | false | 52 | r | # renv::init()
# renv::snapshot()
renv::restore()
|
testlist <- list(Beta = 0, CVLinf = -1.37672045398631e-268, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615827277-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 487 | r | testlist <- list(Beta = 0, CVLinf = -1.37672045398631e-268, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794... |
library(FSAdata)
### Name: BassFL
### Title: Catch-at-age for Suwanee and Largemouth Bass.
### Aliases: BassFL
### Keywords: datasets
### ** Examples
data(BassFL)
str(BassFL)
head(BassFL)
op <- par(mfrow=c(3,2),mar=c(3,3,2,1),mgp=c(1.75,0.5,0),tcl=-0.2,pch=19)
plot(log(num)~age,data=BassFL,subset=(loc=="SantaFe" & ... | /data/genthat_extracted_code/FSAdata/examples/BassFL.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,531 | r | library(FSAdata)
### Name: BassFL
### Title: Catch-at-age for Suwanee and Largemouth Bass.
### Aliases: BassFL
### Keywords: datasets
### ** Examples
data(BassFL)
str(BassFL)
head(BassFL)
op <- par(mfrow=c(3,2),mar=c(3,3,2,1),mgp=c(1.75,0.5,0),tcl=-0.2,pch=19)
plot(log(num)~age,data=BassFL,subset=(loc=="SantaFe" & ... |
library(immunedeconv)
#gtex
mixture_file <- read.csv("./gtexTpm.csv")
rownames(mixture_file) <- mixture_file$gene
mixture_file <- mixture_file[,-1]
gtex <- immunedeconv::deconvolute(mixture_file, "quantiseq")
#tcga
mixture_file <- read.csv("./tcgaTpm.csv")
rownames(mixture_file) <- mixture_file$gene
mixture_file <- mix... | /process/quantiseq.R | no_license | HealthVivo/GEPIA2021 | R | false | false | 396 | r | library(immunedeconv)
#gtex
mixture_file <- read.csv("./gtexTpm.csv")
rownames(mixture_file) <- mixture_file$gene
mixture_file <- mixture_file[,-1]
gtex <- immunedeconv::deconvolute(mixture_file, "quantiseq")
#tcga
mixture_file <- read.csv("./tcgaTpm.csv")
rownames(mixture_file) <- mixture_file$gene
mixture_file <- mix... |
source("sourceFiles/initialPackages.R")
source("sourceFiles/readFiles.R")
source("sourceFiles/supportFunctions.R")
#-------------------------Machinery Historical----------------
# Assign a name to the data set
MacHis_data <- `35111314-Orders Received for Machinery -- Historical Data(3) v1`
#Remove the last column ... | /predictedClusters.R | no_license | Aphees/R_Projects | R | false | false | 43,549 | r | source("sourceFiles/initialPackages.R")
source("sourceFiles/readFiles.R")
source("sourceFiles/supportFunctions.R")
#-------------------------Machinery Historical----------------
# Assign a name to the data set
MacHis_data <- `35111314-Orders Received for Machinery -- Historical Data(3) v1`
#Remove the last column ... |
zmat <- mvrnorm(n,rep(0,p),Sigma = Sigma)
#zmat <- matrix(runif(n*p), nrow = n)
zmat[,1]<-abs(zmat[,1]) +0.5
zmat[,s1[2]]<-abs(zmat[,s1[2]]) +0.5
zmat1<-cbind(rep(1,n),zmat)
e.u<-runif(n);
logt=zmat%*%alpha+zmat[,1]*g1*qeffect.1(e.u)+zmat[,s1[2]]*g2*qeffect.2(e.u);
logc = rnorm(n,0,4) + rnorm(n,-4,1) + rno... | /2_genDat.R | no_license | feizhe/HDCQR_Paper | R | false | false | 480 | r |
zmat <- mvrnorm(n,rep(0,p),Sigma = Sigma)
#zmat <- matrix(runif(n*p), nrow = n)
zmat[,1]<-abs(zmat[,1]) +0.5
zmat[,s1[2]]<-abs(zmat[,s1[2]]) +0.5
zmat1<-cbind(rep(1,n),zmat)
e.u<-runif(n);
logt=zmat%*%alpha+zmat[,1]*g1*qeffect.1(e.u)+zmat[,s1[2]]*g2*qeffect.2(e.u);
logc = rnorm(n,0,4) + rnorm(n,-4,1) + rno... |
## First lecture of week 1, reviewed.
set.seed(13435)
# ----- subset using vector statement
X <- data.frame("var1"=sample(1:5),"var2"=sample(6:10),"var3"=sample(11:15))
X$var2[c(1:3)] = NA
# X <- X[sample(1:5),];
# ----- subset using logical statement, logical row/col vector
X[X$var1>3,]
X[(X$var1>3 & X$var3>12),]
... | /GettingAndCleaningData/Week3/Subsetting_and_Sorting.R | no_license | figoyouwei/datasciencecoursera | R | false | false | 790 | r | ## First lecture of week 1, reviewed.
set.seed(13435)
# ----- subset using vector statement
X <- data.frame("var1"=sample(1:5),"var2"=sample(6:10),"var3"=sample(11:15))
X$var2[c(1:3)] = NA
# X <- X[sample(1:5),];
# ----- subset using logical statement, logical row/col vector
X[X$var1>3,]
X[(X$var1>3 & X$var3>12),]
... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
ModelParameterInference <- function(Input, Freevec, Y, Missing, Y_uncertainty, Nl, Ne, Np, Nr, SampledPara, SampledVe, MeanOfPrior, VarOfPrior, Ve, Nve, Residualgroup, SdforParameters, Sdfor... | /R/RcppExports.R | no_license | Onogi/GenomeBasedModel | R | false | false | 1,708 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
ModelParameterInference <- function(Input, Freevec, Y, Missing, Y_uncertainty, Nl, Ne, Np, Nr, SampledPara, SampledVe, MeanOfPrior, VarOfPrior, Ve, Nve, Residualgroup, SdforParameters, Sdfor... |
#' Reduced Nearest Neighbors
#'
#' Similarity-based method designed to select the most relevant instances for
#' subsequent classification with a \emph{nearest neighbor} rule. For more
#' information, see 'Details' and 'References' sections.
#'
#' \code{RNN} is an extension of \code{\link{CNN}}. The latter provid... | /R/RNN.R | no_license | cran/NoiseFiltersR | R | false | false | 6,287 | r | #' Reduced Nearest Neighbors
#'
#' Similarity-based method designed to select the most relevant instances for
#' subsequent classification with a \emph{nearest neighbor} rule. For more
#' information, see 'Details' and 'References' sections.
#'
#' \code{RNN} is an extension of \code{\link{CNN}}. The latter provid... |
#
# _ _ _ _ _
# (_) | | | | | | | |
# _ __ ___ _ _ __ | |_ | |__ | | __ _ _ __ | | __
# | '_ \ / _ \ | || '_ \ | __|| '_ \ | | / _` || '_ \ | |/ /
# | |_) || (_) || || | | || |_ | |_) || || (_| || | | || <
# | .__/... | /R/info_add.R | permissive | dwtcourses/pointblank | R | false | false | 28,678 | r | #
# _ _ _ _ _
# (_) | | | | | | | |
# _ __ ___ _ _ __ | |_ | |__ | | __ _ _ __ | | __
# | '_ \ / _ \ | || '_ \ | __|| '_ \ | | / _` || '_ \ | |/ /
# | |_) || (_) || || | | || |_ | |_) || || (_| || | | || <
# | .__/... |
# Script for knit .Rmd-file
knitr::knit2html("PA1_template.Rmd")
| /knit_document.R | no_license | janzzon/RepData_PeerAssessment1 | R | false | false | 65 | r | # Script for knit .Rmd-file
knitr::knit2html("PA1_template.Rmd")
|
#' Title
#'
#' @param page xlm2::read_html output
#'
#' @return table of % correct on this question for each group
#' @export
#'
#' @examples
extract_percent_correct <- function(page){
# leaguewide
leaguewide <-
page %>%
rvest::html_nodes(css = "div.leaguewide") %>%
rvest::html_text() %>%
stringr::s... | /R/extract_percent_correct.R | no_license | lqsullivan/learnedr | R | false | false | 1,026 | r | #' Title
#'
#' @param page xlm2::read_html output
#'
#' @return table of % correct on this question for each group
#' @export
#'
#' @examples
extract_percent_correct <- function(page){
# leaguewide
leaguewide <-
page %>%
rvest::html_nodes(css = "div.leaguewide") %>%
rvest::html_text() %>%
stringr::s... |
get_wb <- function(catchment, flowData, sseb_data, gridmet_data) {
sec_per_day <- 24 * 60^2
q <- dplyr::filter(flowData, Date >= as.Date("2009-10-01") & Date <= as.Date("2010-10-01"))
q <- dplyr::select(q, t = Date, x = X_00060_00003)
q$x <- units::set_units(q$x * sec_per_day, "ft^3")
q$cumsum <- cumsum(q$x)... | /docs/awra_2019/R/wb_funs.R | permissive | hydroinfo-gis/nhdplusTools | R | false | false | 1,437 | r | get_wb <- function(catchment, flowData, sseb_data, gridmet_data) {
sec_per_day <- 24 * 60^2
q <- dplyr::filter(flowData, Date >= as.Date("2009-10-01") & Date <= as.Date("2010-10-01"))
q <- dplyr::select(q, t = Date, x = X_00060_00003)
q$x <- units::set_units(q$x * sec_per_day, "ft^3")
q$cumsum <- cumsum(q$x)... |
#' @name pkgnews
#' @description Read R package news files, regardless of whether or not the
#' package is installed.
#' @docType package
#' @keywords internal
"_PACKAGE"
| /R/pkgnews-package.R | no_license | cran/pkgnews | R | false | false | 179 | r | #' @name pkgnews
#' @description Read R package news files, regardless of whether or not the
#' package is installed.
#' @docType package
#' @keywords internal
"_PACKAGE"
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shortcuts.R
\name{ecosections}
\alias{ecosections}
\title{British Columbia Ecosections}
\source{
\code{bcdata::bcdc_get_data(record = 'ccc01f43-860d-4583-8ba4-e72d8379441e', resource = '6b6a3122-7a0b-4c0f-a72b-1e5c0e13d7e6')}
}
\usage{
ecosec... | /man/ecosections.Rd | permissive | rtortini/bcmaps | R | false | true | 865 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shortcuts.R
\name{ecosections}
\alias{ecosections}
\title{British Columbia Ecosections}
\source{
\code{bcdata::bcdc_get_data(record = 'ccc01f43-860d-4583-8ba4-e72d8379441e', resource = '6b6a3122-7a0b-4c0f-a72b-1e5c0e13d7e6')}
}
\usage{
ecosec... |
server <- function(input, output, session)
{
library("shiny")
library("dplyr")
library("plotly")
library("RJDBC")
library("knitr")
library("DT")
options(shiny.maxRequestSize = 3000*1024^2)
# Driver <- JDBC("com.mysql.jdbc.Driver", classPath = "/Users/JorgeQuintana/IdeaProjects/Connect/mysql-connector-j... | /server.R | no_license | wangdom5566/Shiny | R | false | false | 4,065 | r | server <- function(input, output, session)
{
library("shiny")
library("dplyr")
library("plotly")
library("RJDBC")
library("knitr")
library("DT")
options(shiny.maxRequestSize = 3000*1024^2)
# Driver <- JDBC("com.mysql.jdbc.Driver", classPath = "/Users/JorgeQuintana/IdeaProjects/Connect/mysql-connector-j... |
#' @title
#' Identity of a Model Test
#' @description
#' Function for using the Identity of a Model test, as described by Regazzi (1999).
#'
#' @param df a data frame.
#' @param factor Quoted name of the factor variable used to differentiate the data projects in the test.
#' @param reduced_model Quoted or unquoted red... | /R/ident_model.R | permissive | sollano/forestmangr | R | false | false | 18,731 | r | #' @title
#' Identity of a Model Test
#' @description
#' Function for using the Identity of a Model test, as described by Regazzi (1999).
#'
#' @param df a data frame.
#' @param factor Quoted name of the factor variable used to differentiate the data projects in the test.
#' @param reduced_model Quoted or unquoted red... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.