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 |
|---|---|---|---|---|---|---|---|---|---|
library(ISLR)
library(tree)
library(OneR)
library(Hmisc)
library(gmodels)
library(rJava)
library(RWeka)
library(caret)
library(e1071)
library(MASS)
library(rpart)
library(mice)
library(VIM)
library(ggplot2)
library(statip)
library(rpart.plot)
library(tidyrules)
library(dplyr)
library(rpart)
#Ripper
attrition_train[,c... | /Coverage.R | no_license | emirpita/Machine-Learning-Homework | R | false | false | 1,208 | r | library(ISLR)
library(tree)
library(OneR)
library(Hmisc)
library(gmodels)
library(rJava)
library(RWeka)
library(caret)
library(e1071)
library(MASS)
library(rpart)
library(mice)
library(VIM)
library(ggplot2)
library(statip)
library(rpart.plot)
library(tidyrules)
library(dplyr)
library(rpart)
#Ripper
attrition_train[,c... |
#' @title Check preservation
#' @description Checks if a partial ranking is preserved in the ranking induced by `scores`.
#' @param P A partial ranking as matrix object calculated with [neighborhood_inclusion]
#' or [positional_dominance].
#' @param scores Numeric vector containing the scores of a centrality index.
... | /R/check.preservation.R | no_license | knapply/netrankr | R | false | false | 1,147 | r | #' @title Check preservation
#' @description Checks if a partial ranking is preserved in the ranking induced by `scores`.
#' @param P A partial ranking as matrix object calculated with [neighborhood_inclusion]
#' or [positional_dominance].
#' @param scores Numeric vector containing the scores of a centrality index.
... |
library(dplyr)
df <- read.csv('data/players.csv', stringsAsFactors = F)
df <- filter(df, isActive == T)
teams <- sort(unique(df$nameTeam))
players <- sort(unique(filter(df, nameTeam == "Los Angeles Lakers")$namePlayer))
| /showcase/global.R | no_license | sdgass13/nba_shiny_app | R | false | false | 225 | r | library(dplyr)
df <- read.csv('data/players.csv', stringsAsFactors = F)
df <- filter(df, isActive == T)
teams <- sort(unique(df$nameTeam))
players <- sort(unique(filter(df, nameTeam == "Los Angeles Lakers")$namePlayer))
|
library(data.table)
ultimatePai = function (test, uniqueBool = T){
#modify incident name of testprob, test
test$Incident.Name = gsub(x = test$Incident.Name, pattern = " ", replacement = ".")
if (uniqueBool == T) {
test = unique(test[,c("Week","Incident.Name","Weekday","Hour","Month","Day", "Year","Black","V... | /paiultimate.R | no_license | mdinh186/Google_Queries_Time_Series | R | false | false | 3,263 | r | library(data.table)
ultimatePai = function (test, uniqueBool = T){
#modify incident name of testprob, test
test$Incident.Name = gsub(x = test$Incident.Name, pattern = " ", replacement = ".")
if (uniqueBool == T) {
test = unique(test[,c("Week","Incident.Name","Weekday","Hour","Month","Day", "Year","Black","V... |
# DiagnosticPlots.r modified from: http://ucfagls.wordpress.com/2011/06/12/additive-modelling-and-the-hadcrut3v-global-mean-temperature-series/
# Load required libraries
library(mgcv)
library(nlme)
library(MASS)
library(emdbook)
script.dir <- dirname(sys.frame(1)$ofile)
setwd(script.dir)
# Load r... | /scripts/Multimodel averaging parametric/T11_marinePA.r | no_license | mikeharfoot/Aichi-2020-analysis | R | false | false | 11,275 | r | # DiagnosticPlots.r modified from: http://ucfagls.wordpress.com/2011/06/12/additive-modelling-and-the-hadcrut3v-global-mean-temperature-series/
# Load required libraries
library(mgcv)
library(nlme)
library(MASS)
library(emdbook)
script.dir <- dirname(sys.frame(1)$ofile)
setwd(script.dir)
# Load r... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/mr_cML-methods.R
\docType{methods}
\name{mr_cML}
\alias{mr_cML}
\alias{mr_cML,MRInput-method}
\title{Constrained maximum likelihood (cML) method}
\usage{
mr_cML(
object,
MA = TRUE,
DP = TRUE,
K_vec = 0:(length(object@... | /man/mr_cML.Rd | no_license | cran/MendelianRandomization | R | false | true | 4,692 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/mr_cML-methods.R
\docType{methods}
\name{mr_cML}
\alias{mr_cML}
\alias{mr_cML,MRInput-method}
\title{Constrained maximum likelihood (cML) method}
\usage{
mr_cML(
object,
MA = TRUE,
DP = TRUE,
K_vec = 0:(length(object@... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 3303
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3293
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3293
c
c Input Parameter (command line, fil... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Wintersteiger/RankingFunctions/rankfunc60_signed_32/rankfunc60_signed_32.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 791 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 3303
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3293
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3293
c
c Input Parameter (command line, fil... |
library(readr)
library(dplyr)
library(ggplot2)
library(highcharter)
bsg= read_rds("~/Downloads/bsg.rds")
bsg %>% select(bsmmat01, bsmmat02, bsmmat03, bsmmat04, bsmmat05, bsbg07a, bsbg07b) -> scores
scores %>% mutate(nomre = round((bsmmat01 + bsmmat02 + bsmmat03 + bsmmat04 + bsmmat05) / 5, 0)) -> scores
scores %>... | /HW4/HW4-2.R | no_license | praal/data_analysis_course | R | false | false | 997 | r | library(readr)
library(dplyr)
library(ggplot2)
library(highcharter)
bsg= read_rds("~/Downloads/bsg.rds")
bsg %>% select(bsmmat01, bsmmat02, bsmmat03, bsmmat04, bsmmat05, bsbg07a, bsbg07b) -> scores
scores %>% mutate(nomre = round((bsmmat01 + bsmmat02 + bsmmat03 + bsmmat04 + bsmmat05) / 5, 0)) -> scores
scores %>... |
library(reshape2)
##### Download Data Files & Extract From Archive If The UCI Directory Doesn't Already Exist #####
# I look for the existance of the phone data directory - if not present, download & extract
if(!file.exists("UCI\ HAR\ Dataset")) {
fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fpr... | /run_analysis.R | no_license | limrock1/Getting_Cleaning_Data | R | false | false | 4,002 | r | library(reshape2)
##### Download Data Files & Extract From Archive If The UCI Directory Doesn't Already Exist #####
# I look for the existance of the phone data directory - if not present, download & extract
if(!file.exists("UCI\ HAR\ Dataset")) {
fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fpr... |
var_mlm <- function(df = pheno, nullmodel="~ (1 | GCA1.all) + (1 | GCA2.all)", fullmodel="~ (1 | GCA1.all) + (1 | GCA2.all) + (1 | SCA.all)"){
# Structures to hold results
r2marg <- data.frame(trait=vector(), r2marg=vector(), r2cond=vector())
sig <- data.frame(trait=vector(), chisq=vector(), df=vector... | /Rcodes/var_mlm.R | no_license | yangjl/zmSNPtools | R | false | false | 1,581 | r |
var_mlm <- function(df = pheno, nullmodel="~ (1 | GCA1.all) + (1 | GCA2.all)", fullmodel="~ (1 | GCA1.all) + (1 | GCA2.all) + (1 | SCA.all)"){
# Structures to hold results
r2marg <- data.frame(trait=vector(), r2marg=vector(), r2cond=vector())
sig <- data.frame(trait=vector(), chisq=vector(), df=vector... |
# Introduction
## ══════════════
# • Learning objectives:
## • Learn the R formula interface
## • Specify factor contrasts to test specific hypotheses
## • Perform model comparisons
## • Run and interpret variety of regression models in R
## Set working directory
## ─────────────────────────
## ... | /LinearRegProject.R | no_license | Kangell1/Springboard_Coursework | R | false | false | 9,318 | r | # Introduction
## ══════════════
# • Learning objectives:
## • Learn the R formula interface
## • Specify factor contrasts to test specific hypotheses
## • Perform model comparisons
## • Run and interpret variety of regression models in R
## Set working directory
## ─────────────────────────
## ... |
##%######################################################%##
# #
#### Script para análisis de datos de Star Wars ####
# #
##%######################################################%##
# Cargamos lo... | /20190926_Octava_reunion/script_base.R | no_license | RMalagaGroup/Presentaciones | R | false | false | 2,568 | r | ##%######################################################%##
# #
#### Script para análisis de datos de Star Wars ####
# #
##%######################################################%##
# Cargamos lo... |
## Many cases handled here are simple replacements, e.g. ^ to pow.
## These could easily be done elsewhere, but it works cleanly to do them here.
####################################
## System to processSpecificCalls ##
####################################
compile_simpleTransformations <- function(code,
... | /nCompiler/R/compile_simpleTransformations.R | permissive | nimble-dev/nCompiler | R | false | false | 2,027 | r | ## Many cases handled here are simple replacements, e.g. ^ to pow.
## These could easily be done elsewhere, but it works cleanly to do them here.
####################################
## System to processSpecificCalls ##
####################################
compile_simpleTransformations <- function(code,
... |
#===========================================================================================
# Statistical test (Vrd) for within-participant AR comparisons as proposed by Vatavu & Wobbrock 2015
# Author: Theophanis Tsandilas
#======================================================================================
... | /section6.within.vatavu2015.Vrd.R | no_license | raduvro/TOCHI-supplementary | R | false | false | 3,231 | r |
#===========================================================================================
# Statistical test (Vrd) for within-participant AR comparisons as proposed by Vatavu & Wobbrock 2015
# Author: Theophanis Tsandilas
#======================================================================================
... |
########################################
# Shoo the Flu evaluation
# Analysis of student influenza vaccination coverage
# Create figures showing vaccination coverage by education
########################################
rm(list=ls())
# define directories, load libraries
source(here::here("0-config.R"))
load(vax_res... | /2-tab-fig/4-fig-vxcov-edu.R | no_license | jadebc/vax-cov-public | R | false | false | 3,171 | r | ########################################
# Shoo the Flu evaluation
# Analysis of student influenza vaccination coverage
# Create figures showing vaccination coverage by education
########################################
rm(list=ls())
# define directories, load libraries
source(here::here("0-config.R"))
load(vax_res... |
testlist <- list(rates = numeric(0), thresholds = numeric(0), x = c(9.92835148599348e-101, 9.70418706716128e-101, 9.70418706716128e-101, 9.70418706716128e-101, 9.70418706716128e-101, 9.70418706716128e-101, 9.70418706716128e-101, 9.70418706716128e-101, NaN, 9.70419048763886e-101, 9.70418696071228e-101, 9.70418706716... | /grattan/inst/testfiles/IncomeTax/libFuzzer_IncomeTax/IncomeTax_valgrind_files/1610051557-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 609 | r | testlist <- list(rates = numeric(0), thresholds = numeric(0), x = c(9.92835148599348e-101, 9.70418706716128e-101, 9.70418706716128e-101, 9.70418706716128e-101, 9.70418706716128e-101, 9.70418706716128e-101, 9.70418706716128e-101, 9.70418706716128e-101, NaN, 9.70419048763886e-101, 9.70418696071228e-101, 9.70418706716... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getbacon.R
\name{getbacon}
\alias{getbacon}
\title{getbacon}
\usage{
getbacon(width, height)
}
\arguments{
\item{width}{numeric}
\item{height}{numeric}
}
\value{
link character
}
\description{
Places the link for a random picture of bacon wh... | /man/getbacon.Rd | no_license | bdacunha/randompic | R | false | true | 390 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getbacon.R
\name{getbacon}
\alias{getbacon}
\title{getbacon}
\usage{
getbacon(width, height)
}
\arguments{
\item{width}{numeric}
\item{height}{numeric}
}
\value{
link character
}
\description{
Places the link for a random picture of bacon wh... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pass_recieve.R
\name{Pass}
\alias{Pass}
\title{Simple way to send objects from one script to another.}
\usage{
Pass(x, description = "results")
}
\arguments{
\item{x}{R object to send}
\item{description}{String describing R object stored in ... | /man/Pass.Rd | no_license | gelfondjal/adapr | R | false | true | 618 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pass_recieve.R
\name{Pass}
\alias{Pass}
\title{Simple way to send objects from one script to another.}
\usage{
Pass(x, description = "results")
}
\arguments{
\item{x}{R object to send}
\item{description}{String describing R object stored in ... |
library(cec2005benchmark)
### Name: cec2005benchmark1
### Title: Function Number 1
### Aliases: cec2005benchmark1
### ** Examples
cec2005benchmark1(runif(10, -100, 100))
| /data/genthat_extracted_code/cec2005benchmark/examples/cec2005benchmark1.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 177 | r | library(cec2005benchmark)
### Name: cec2005benchmark1
### Title: Function Number 1
### Aliases: cec2005benchmark1
### ** Examples
cec2005benchmark1(runif(10, -100, 100))
|
#' plot an intensity surface on the sphere
plot.sphppm <- function(x, eye=place("nedlands"), top=place("northpole"),
w,
..., eps=NULL, dimyx=NULL, main="",
action=c("image", "contour", "imagecontour"),
col.image=NULL, col.lin... | /R/plot.sphppm.R | no_license | baddstats/spherstat | R | false | false | 3,778 | r | #' plot an intensity surface on the sphere
plot.sphppm <- function(x, eye=place("nedlands"), top=place("northpole"),
w,
..., eps=NULL, dimyx=NULL, main="",
action=c("image", "contour", "imagecontour"),
col.image=NULL, col.lin... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/dimred_sample_page.R
\name{add_dimred_sample_page}
\alias{add_dimred_sample_page}
\alias{add_dimred_sample_page,i2dashboard,missing-method}
\alias{add_dimred_sample_page,i2dashboard,SingleCellExperiment-method}
\alias{add_dim... | /man/dimred-sample-page.Rd | permissive | loosolab/i2dash.scrnaseq | R | false | true | 3,305 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/dimred_sample_page.R
\name{add_dimred_sample_page}
\alias{add_dimred_sample_page}
\alias{add_dimred_sample_page,i2dashboard,missing-method}
\alias{add_dimred_sample_page,i2dashboard,SingleCellExperiment-method}
\alias{add_dim... |
#' Generates CUSUM plot for specified IDs.
#'
#' @param cu.object an object returned from cusum or cusum.poly
#' @param ID a numeric ID.
#' @return Returns a plot for specified cusum person chart.
#' @export
#' @import graphics
cusum.plot <- function(cu.object, ID){
cu.dat <- cu.object$CusumChart
c.max <- cu.dat[... | /R/cusum.plot.R | no_license | cran/PsyControl | R | false | false | 665 | r | #' Generates CUSUM plot for specified IDs.
#'
#' @param cu.object an object returned from cusum or cusum.poly
#' @param ID a numeric ID.
#' @return Returns a plot for specified cusum person chart.
#' @export
#' @import graphics
cusum.plot <- function(cu.object, ID){
cu.dat <- cu.object$CusumChart
c.max <- cu.dat[... |
# ==================================================
# project: Data for Jan
# Author: Andres Castaneda
# Dependencies: The World Bank
# ----------------------------------------------------
# Creation Date: 2020-05-21
# Modification Date:
# Script version: 01
# References:
#
#
# Output: ... | /R/sdg_10_dataJan.R | no_license | randrescastaneda/SDG_2020 | R | false | false | 8,596 | r | # ==================================================
# project: Data for Jan
# Author: Andres Castaneda
# Dependencies: The World Bank
# ----------------------------------------------------
# Creation Date: 2020-05-21
# Modification Date:
# Script version: 01
# References:
#
#
# Output: ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print_and_plot.R
\name{plot_model_set}
\alias{plot_model_set}
\title{Plot several causal hypothesis at once.}
\usage{
plot_model_set(
model_set,
labels = NULL,
algorithm = "kk",
manual_layout = NULL,
text_size = 5,
box_x = 12,
b... | /man/plot_model_set.Rd | no_license | achazhardenberg/phylopath | R | false | true | 2,930 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print_and_plot.R
\name{plot_model_set}
\alias{plot_model_set}
\title{Plot several causal hypothesis at once.}
\usage{
plot_model_set(
model_set,
labels = NULL,
algorithm = "kk",
manual_layout = NULL,
text_size = 5,
box_x = 12,
b... |
#' all_intersect
#'
#' @param geom ()
#'
#' @return the geometry that contain the intersect of all geom contain in param
#' @import sf
#'
all_intersect<-function(geom){
geom_intersect = sf::st_intersection(x=geom[[1]], y=geom[[2]])
return(geom_intersect)
}
| /R/all_intersect.R | no_license | Caoimhyn/OuVivre | R | false | false | 263 | r | #' all_intersect
#'
#' @param geom ()
#'
#' @return the geometry that contain the intersect of all geom contain in param
#' @import sf
#'
all_intersect<-function(geom){
geom_intersect = sf::st_intersection(x=geom[[1]], y=geom[[2]])
return(geom_intersect)
}
|
library(NoiseFiltersR)
### Name: ModeFilter
### Title: Mode Filter
### Aliases: ModeFilter ModeFilter.default ModeFilter.formula
### ** Examples
# Next example is not run because in some cases it can be rather slow
## Not run:
##D data(iris)
##D out <- ModeFilter(Species~., data = iris, type = "classical", n... | /data/genthat_extracted_code/NoiseFiltersR/examples/ModeFilter.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 453 | r | library(NoiseFiltersR)
### Name: ModeFilter
### Title: Mode Filter
### Aliases: ModeFilter ModeFilter.default ModeFilter.formula
### ** Examples
# Next example is not run because in some cases it can be rather slow
## Not run:
##D data(iris)
##D out <- ModeFilter(Species~., data = iris, type = "classical", n... |
##
## A bunch of handy functions.
##
#' Load a list of libraries, checking if the attachment to the calling script
#' is successful.
#'
#' @param librariesList
#'
#' @return
#'
loadLibraries <- function(librariesList){
result <- TRUE
for (lib in librariesList) {
if(FALSE == library(lib, charac... | /helpers.R | no_license | valieg/ExData_Plotting1 | R | false | false | 450 | r | ##
## A bunch of handy functions.
##
#' Load a list of libraries, checking if the attachment to the calling script
#' is successful.
#'
#' @param librariesList
#'
#' @return
#'
loadLibraries <- function(librariesList){
result <- TRUE
for (lib in librariesList) {
if(FALSE == library(lib, charac... |
library(readxl)
library(dplyr)
# setwd("~/Desktop/Competition/original data")
# july = read_excel('ActiveSoybeanContractsfor2020.CSV.xlsx')
# weather
setwd("~/Desktop/Competition/new_weather")
july = read.csv('may_contract.csv')
arkansas = read.csv('arkansas_temp.csv')
illinois = read.csv('illinois_temp.csv')
indiana ... | /weather_selection.R | permissive | PatrickJamesHoban/soybean-market-price-forecasting | R | false | false | 9,674 | r | library(readxl)
library(dplyr)
# setwd("~/Desktop/Competition/original data")
# july = read_excel('ActiveSoybeanContractsfor2020.CSV.xlsx')
# weather
setwd("~/Desktop/Competition/new_weather")
july = read.csv('may_contract.csv')
arkansas = read.csv('arkansas_temp.csv')
illinois = read.csv('illinois_temp.csv')
indiana ... |
#Script transforming simuPOP csv into BayEnv intput file
#Set working directory
setwd('some directory')
#Setting up some variables
#Range of the simulations for the "for loop"
range_sim=1:100
#Prefix for the CSV file names
prefCSV='sim'
#Number of populations
nb_pop=16
#Number of individuals sampled per popula... | /MathieuGautier/ScriptsR/scriptBayEnv_env.R | no_license | cayek/Data2016_2017 | R | false | false | 988 | r | #Script transforming simuPOP csv into BayEnv intput file
#Set working directory
setwd('some directory')
#Setting up some variables
#Range of the simulations for the "for loop"
range_sim=1:100
#Prefix for the CSV file names
prefCSV='sim'
#Number of populations
nb_pop=16
#Number of individuals sampled per popula... |
#NFL team stats
# Section 0: load packages ----
library(dplyr)
library(ggplot2)
library(ggthemes)
library(rvest)
library(lubridate)
library(knitr)
library(rmarkdown)
library(reshape2)
library(extrafont)
#
#
#
# Section 1: OFFENSE ----
#scrape offense data using rvest package
url.offense.2015 <- "http://www.nfl.com/... | /nfl_team_stats.R | no_license | brndngrhm/nfl_team_stats | R | false | false | 17,118 | r | #NFL team stats
# Section 0: load packages ----
library(dplyr)
library(ggplot2)
library(ggthemes)
library(rvest)
library(lubridate)
library(knitr)
library(rmarkdown)
library(reshape2)
library(extrafont)
#
#
#
# Section 1: OFFENSE ----
#scrape offense data using rvest package
url.offense.2015 <- "http://www.nfl.com/... |
require(bio.base)
require(bio.lobster)
p = bio.lobster::load.environment()
require(bio.polygons)
p$libs = NULL
require(PBSmapping)
require(bio.lobster)
require(bio.utilities)
require(dplyr)
require(bio.survey)
p = bio.lobster::load.environment()
p$libs = NULL
fp = file.path(project.datadirectory('bio.lobster'),"analy... | /inst/Updates/LFA41/LFA41_UpdateMD/LFA41_analysis.R | no_license | LobsterScience/bio.lobster | R | false | false | 2,370 | r | require(bio.base)
require(bio.lobster)
p = bio.lobster::load.environment()
require(bio.polygons)
p$libs = NULL
require(PBSmapping)
require(bio.lobster)
require(bio.utilities)
require(dplyr)
require(bio.survey)
p = bio.lobster::load.environment()
p$libs = NULL
fp = file.path(project.datadirectory('bio.lobster'),"analy... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tidy_FIA.R
\name{read_ref_table}
\alias{read_ref_table}
\title{Read FIA reference table}
\usage{
read_ref_table(table)
}
\arguments{
\item{table_name}{name of reference table e.g. "REF_SPECIES"}
}
\value{
dataframe of reference table
}
\descr... | /man/read_ref_table.Rd | no_license | General-Directorate-Forestry/tidyFIA | R | false | true | 355 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tidy_FIA.R
\name{read_ref_table}
\alias{read_ref_table}
\title{Read FIA reference table}
\usage{
read_ref_table(table)
}
\arguments{
\item{table_name}{name of reference table e.g. "REF_SPECIES"}
}
\value{
dataframe of reference table
}
\descr... |
%% File Name: systime.Rd
%% File Version: 0.15
\name{systime}
\alias{systime}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
\R Utilities: Various Strings Representing System Time
}
\description{
This function generates system time strings in several formats.
}
\usage{
systime()
}
%- maybe also... | /man/systime.Rd | no_license | alexanderrobitzsch/miceadds | R | false | false | 1,386 | rd | %% File Name: systime.Rd
%% File Version: 0.15
\name{systime}
\alias{systime}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
\R Utilities: Various Strings Representing System Time
}
\description{
This function generates system time strings in several formats.
}
\usage{
systime()
}
%- maybe also... |
\name{hemorrhage}
\alias{hemorrhage}
\docType{data}
\title{
Hemorrhage data from Dupont.
}
\description{
Hemorrhage data from Dupont.
}
\usage{data(hemorrhage)}
\format{
A data frame with 71 observations on the following 3 variables.
\describe{
\item{\code{genotype}}{a numeric vector}
\item{\code{time}}{a n... | /man/hemorrhage.Rd | no_license | kloke/npsm | R | false | false | 502 | rd | \name{hemorrhage}
\alias{hemorrhage}
\docType{data}
\title{
Hemorrhage data from Dupont.
}
\description{
Hemorrhage data from Dupont.
}
\usage{data(hemorrhage)}
\format{
A data frame with 71 observations on the following 3 variables.
\describe{
\item{\code{genotype}}{a numeric vector}
\item{\code{time}}{a n... |
FunctionMinusPseudoLogLikeReliabilityXY<-function(VecPar,datosX,datosY,precision,Reliability,Threshold)
{
ScaleX<-VecPar[1]
Shape<-VecPar[2]
ScaleY<-ScaleX*(1-Reliability)/Reliability
MenosLogVeroX<-FunctionMinusLogLike(c(Threshold,ScaleX,Shape),datosX,precision)
MenosLogVeroY<-FunctionMinusLogLike(c(Threshol... | /R_Programs_Discretized_Likelihood/02ProfileLikelihoodApproach/FunctionMinusPseudoLogLikeReliabilityXY.R | no_license | gudeliafp/Programs-Discretized-Likelihood | R | false | false | 423 | r | FunctionMinusPseudoLogLikeReliabilityXY<-function(VecPar,datosX,datosY,precision,Reliability,Threshold)
{
ScaleX<-VecPar[1]
Shape<-VecPar[2]
ScaleY<-ScaleX*(1-Reliability)/Reliability
MenosLogVeroX<-FunctionMinusLogLike(c(Threshold,ScaleX,Shape),datosX,precision)
MenosLogVeroY<-FunctionMinusLogLike(c(Threshol... |
# Clear variables and load r packages used
rm(list=ls(all=TRUE))
library(graphics)
library(data.table)
# Read all data in
data <- read.table("household_power_consumption.txt",header=TRUE, sep=";")
# Modify Date to be of Date class and subset only the data from 2007-02-01 and 2007-02-02
data$Date<- as.Date(data$Date, ... | /plot2.R | no_license | iacooana/ExData_Plotting1 | R | false | false | 1,039 | r | # Clear variables and load r packages used
rm(list=ls(all=TRUE))
library(graphics)
library(data.table)
# Read all data in
data <- read.table("household_power_consumption.txt",header=TRUE, sep=";")
# Modify Date to be of Date class and subset only the data from 2007-02-01 and 2007-02-02
data$Date<- as.Date(data$Date, ... |
# Session 1 Assignment 2
# What should be the output of the following Script?
v <- c( 2,5.5,6)
t <- c(8, 3, 4)
print(v%/%t)
#======================================================================================
# 2. You have 25 excel files with names as xx_1.xlsx, xx_2.xlsx,....xx_25.xlsx in a dir.
... | /Session 1- Assignment 2.R | no_license | ayushyuvraj/Assignment1.2 | R | false | false | 1,516 | r |
# Session 1 Assignment 2
# What should be the output of the following Script?
v <- c( 2,5.5,6)
t <- c(8, 3, 4)
print(v%/%t)
#======================================================================================
# 2. You have 25 excel files with names as xx_1.xlsx, xx_2.xlsx,....xx_25.xlsx in a dir.
... |
complete <- function(directory, id = 1:332) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
cwd <- getwd()
filename <- function(dir,n){
sprintf("%s/%s/%03d%s",cwd,dir,n,".csv")
}
## '... | /R_Programming/PA1/complete.R | no_license | chenxiao4/DataScienceCoursera | R | false | false | 1,061 | r | complete <- function(directory, id = 1:332) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
cwd <- getwd()
filename <- function(dir,n){
sprintf("%s/%s/%03d%s",cwd,dir,n,".csv")
}
## '... |
context("calibration")
#------------------------------------------------
test_that("calibrate particle works", {
data <- read.csv(squire_file("extdata/example.csv"),stringsAsFactors = FALSE)
interventions <- read.csv(squire_file("extdata/example_intervention.csv"))
int_unique <- interventions_unique(interventio... | /tests/testthat/test-calibration.R | permissive | mrc-ide/squire | R | false | false | 26,177 | r | context("calibration")
#------------------------------------------------
test_that("calibrate particle works", {
data <- read.csv(squire_file("extdata/example.csv"),stringsAsFactors = FALSE)
interventions <- read.csv(squire_file("extdata/example_intervention.csv"))
int_unique <- interventions_unique(interventio... |
#!/usr/bin/env Rscript
#### SET-UP --------------------------------------------------------------------
cat('\n\n#### vcf2loci_filterloci.R: Starting script.\n\n')
## Libraries:
if(!'pacman' %in% rownames(installed.packages())) install.packages('pacman')
library(pacman)
packages <- c('valr', 'tidyverse')
p_load(char ... | /geno/vcf2loci/vcf2loci_filterloci.R | no_license | jelmerp/genomics | R | false | false | 6,798 | r | #!/usr/bin/env Rscript
#### SET-UP --------------------------------------------------------------------
cat('\n\n#### vcf2loci_filterloci.R: Starting script.\n\n')
## Libraries:
if(!'pacman' %in% rownames(installed.packages())) install.packages('pacman')
library(pacman)
packages <- c('valr', 'tidyverse')
p_load(char ... |
# Authors: Traci Lim, Willian Skinner, Yi Luo
# Dataset Description:
# -> This data contains airline data from the US Bureau of Transportation for the period of January 2017
# -> We intend to collate all 12 months of data and attempt to predict airline delays using multiclass classifcation.
# -> Some information about... | /full code/delay_prediction_030418.r | no_license | longwind48/airline-delay-prediction | R | false | false | 41,375 | r | # Authors: Traci Lim, Willian Skinner, Yi Luo
# Dataset Description:
# -> This data contains airline data from the US Bureau of Transportation for the period of January 2017
# -> We intend to collate all 12 months of data and attempt to predict airline delays using multiclass classifcation.
# -> Some information about... |
# This is an autogenerated script
n = 200
lam1 = 2
lam2 = 5
prob = 0.250000
phi = -0.750000
nsim = 200
df = simulation_mixedPoissonAR1(n, lam1, lam2, phi, prob, nsim)
| /archived sims/MixedPoissonAR1/IYW/GeneratedFiles/MixedPois2-5AR1_IYW_N200_NS200_PhiNeg.R | no_license | jlivsey/countsFun | R | false | false | 168 | r | # This is an autogenerated script
n = 200
lam1 = 2
lam2 = 5
prob = 0.250000
phi = -0.750000
nsim = 200
df = simulation_mixedPoissonAR1(n, lam1, lam2, phi, prob, nsim)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mainMethods.R
\name{getMSTLR}
\alias{getMSTLR}
\title{getMSTLR: create spanning tree with specified root and leaves}
\usage{
getMSTLR(
g1,
rootDist,
cenDist,
cluid,
root = 1,
leaves = list(a = c(9, 12, 13), b = 17, c = c(2, 6), d ... | /man/getMSTLR.Rd | permissive | ouyang-lab/LISA2 | R | false | true | 730 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mainMethods.R
\name{getMSTLR}
\alias{getMSTLR}
\title{getMSTLR: create spanning tree with specified root and leaves}
\usage{
getMSTLR(
g1,
rootDist,
cenDist,
cluid,
root = 1,
leaves = list(a = c(9, 12, 13), b = 17, c = c(2, 6), d ... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/et_functions.R
\name{getu2f}
\alias{getu2f}
\title{convert wind speed to 2m value function}
\usage{
getu2f(uz, zw)
}
\arguments{
\item{uz}{Wind speed in m/s. No default.}
\item{zw}{Wind speed measurement height in m. No de... | /ASCEET/man/getu2f.Rd | no_license | anfrench/ASCEET_v2 | R | false | false | 510 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/et_functions.R
\name{getu2f}
\alias{getu2f}
\title{convert wind speed to 2m value function}
\usage{
getu2f(uz, zw)
}
\arguments{
\item{uz}{Wind speed in m/s. No default.}
\item{zw}{Wind speed measurement height in m. No de... |
# import the dataset
wbcd <- read.csv("wisc_bc_data.csv", stringsAsFactors = FALSE)
#structure of the dataset
str(wbcd)
# drop the id feature
wbcd<-wbcd[-1]
# table of diagnosis
table(wbcd$diagnosis)
# recode diagnosis as a factor
wbcd$diagnosis <- factor(wbcd$diagnosis, levels = c("B", "M"),
... | /cancer_prediction.R | no_license | YaswanthMareedu/cancer_prediction | R | false | false | 2,397 | r | # import the dataset
wbcd <- read.csv("wisc_bc_data.csv", stringsAsFactors = FALSE)
#structure of the dataset
str(wbcd)
# drop the id feature
wbcd<-wbcd[-1]
# table of diagnosis
table(wbcd$diagnosis)
# recode diagnosis as a factor
wbcd$diagnosis <- factor(wbcd$diagnosis, levels = c("B", "M"),
... |
library(alr3)
### Name: hooker
### Title: Hooker's data
### Aliases: hooker
### Keywords: datasets
### ** Examples
head(hooker)
| /data/genthat_extracted_code/alr3/examples/hooker.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 135 | r | library(alr3)
### Name: hooker
### Title: Hooker's data
### Aliases: hooker
### Keywords: datasets
### ** Examples
head(hooker)
|
# loading in the necessary libraries
library(tidyverse) # loads the tibble package to convert rownmes_to_col
library(janitor) # to use the clean names function
library(readr) # used to read in the raw data file type .rds
library(here) # to enable the file locations to be reproducible
# fetching the raw data file
dec... | /task1/data_cleaning_scripts/decathlon.R | no_license | pjbateman/dirty_data_codeclan_project_paul | R | false | false | 1,141 | r | # loading in the necessary libraries
library(tidyverse) # loads the tibble package to convert rownmes_to_col
library(janitor) # to use the clean names function
library(readr) # used to read in the raw data file type .rds
library(here) # to enable the file locations to be reproducible
# fetching the raw data file
dec... |
#rm(list = ls());gc()
#digits_to_match <- 5 #For two accounts to be considered equal, they must have at least how many digits?
#Set main working directory
project_folder <- "C:/Users/Felipe/Desktop/Duke MIDS/Modelling and Representation of Data/0 - Final Project/"
setwd(project_folder)
#Load packages
library(magritt... | /Scripts/1 - Data preparation/10 - Reads financial accounts.R | permissive | felbuch/Copycat-Towns | R | false | false | 2,501 | r | #rm(list = ls());gc()
#digits_to_match <- 5 #For two accounts to be considered equal, they must have at least how many digits?
#Set main working directory
project_folder <- "C:/Users/Felipe/Desktop/Duke MIDS/Modelling and Representation of Data/0 - Final Project/"
setwd(project_folder)
#Load packages
library(magritt... |
#' @name SDMX
#' @rdname SDMX
#' @aliases SDMX,SDMX-method
#'
#' @usage
#' SDMX(xmlObj, namespaces)
#'
#' @param xmlObj object of class "XMLInternalDocument derived from XML package
#' @param namespaces object of class "data.frame" given the list of namespace URIs
#' @return an object of class "SDMX"
#'
#... | /R/SDMX-methods.R | no_license | cran/rsdmx | R | false | false | 7,517 | r | #' @name SDMX
#' @rdname SDMX
#' @aliases SDMX,SDMX-method
#'
#' @usage
#' SDMX(xmlObj, namespaces)
#'
#' @param xmlObj object of class "XMLInternalDocument derived from XML package
#' @param namespaces object of class "data.frame" given the list of namespace URIs
#' @return an object of class "SDMX"
#'
#... |
############ scMap #################################
library(scmap)
###Tman is the online dataset I would want to compare my data (SCE) with the Tman dataset. This should already be QC'd and loaded into the environment as normal.
###SCE (your data) can already be in the enviro, but what I tend to do is save the SCE o... | /scMap.r | no_license | eoindosullivan/GitHub-scripts | R | false | false | 3,577 | r | ############ scMap #################################
library(scmap)
###Tman is the online dataset I would want to compare my data (SCE) with the Tman dataset. This should already be QC'd and loaded into the environment as normal.
###SCE (your data) can already be in the enviro, but what I tend to do is save the SCE o... |
setwd("C:/Users/sbhowmi/Desktop/Self Learning/Exploratory Data Analyis/Course_Directory/Week3")
png(file = "faceData_face.png")
load("data/face.rda")
image(t(faceData)[, nrow(faceData):1])
png(file = "faceData_Variance_explained.png")
svd1 <- svd(scale(faceData))
plot(svd1$d^2/sum(svd1$d^2), pch = 19, xlab = "Singula... | /Week 3/faceData.R | no_license | saurish/EDA-Course-Code | R | false | false | 1,247 | r | setwd("C:/Users/sbhowmi/Desktop/Self Learning/Exploratory Data Analyis/Course_Directory/Week3")
png(file = "faceData_face.png")
load("data/face.rda")
image(t(faceData)[, nrow(faceData):1])
png(file = "faceData_Variance_explained.png")
svd1 <- svd(scale(faceData))
plot(svd1$d^2/sum(svd1$d^2), pch = 19, xlab = "Singula... |
install.packages("Tmisc")
library(Tmisc)
library(tidyverse)
data(quartet)
View(quartet)
quartet %>%
group_by(set) %>%
summarise(mean(x),sd(x),mean(y),sd(y),cor(x,y))
ggplot(quartet,aes(x,y))+geom_point()+geom_smooth(method = lm, se = FALSE)+facet_wrap(~set)
install.packages("datasauRus")
library("da... | /R/week3/samedatadifferentoutcome.R | no_license | ashokjha/dataanalytics | R | false | false | 481 | r | install.packages("Tmisc")
library(Tmisc)
library(tidyverse)
data(quartet)
View(quartet)
quartet %>%
group_by(set) %>%
summarise(mean(x),sd(x),mean(y),sd(y),cor(x,y))
ggplot(quartet,aes(x,y))+geom_point()+geom_smooth(method = lm, se = FALSE)+facet_wrap(~set)
install.packages("datasauRus")
library("da... |
#rm(list=ls())
# import package
library(DT)
library(leaflet)
library(shiny)
library(dplyr)
library(readr)
library(tidytext)
library(ggplot2)
library(tidyr)
library(forcats)
#set working directory
#setwd("")
# import data
#business <- read_csv("business_city.csv")
# set restaurant name
business_tag <- c("McDonald's","... | /Code/server.R | no_license | SixuLi/STAT-628-Module-3 | R | false | false | 7,938 | r | #rm(list=ls())
# import package
library(DT)
library(leaflet)
library(shiny)
library(dplyr)
library(readr)
library(tidytext)
library(ggplot2)
library(tidyr)
library(forcats)
#set working directory
#setwd("")
# import data
#business <- read_csv("business_city.csv")
# set restaurant name
business_tag <- c("McDonald's","... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dynnet.R
\name{get_graph}
\alias{get_graph}
\title{Select Graph from a \code{dynnet} Object}
\usage{
get_graph(object, period = NULL)
}
\arguments{
\item{object}{\code{\link{dynnet}} object}
\item{period}{Integer, numeric, or \code{NULL} ind... | /man/get_graph.Rd | no_license | petershan1119/dynnet | R | false | true | 875 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dynnet.R
\name{get_graph}
\alias{get_graph}
\title{Select Graph from a \code{dynnet} Object}
\usage{
get_graph(object, period = NULL)
}
\arguments{
\item{object}{\code{\link{dynnet}} object}
\item{period}{Integer, numeric, or \code{NULL} ind... |
#Statistical Inference Course - Simulation Exercise
#by Preetika Srivastava
#Multiple Simulations will be ran to compare the theoretical mean and standard deviation of exponential function, to that the one obtained
#by simulations. This exercise leverages the idea of 'Central Limit Theorem'
set.seed(3007)
lambda = 0.... | /Simulation_Exercise.R | no_license | ankurkhaitan/Statistical-Inference-Coursera | R | false | false | 1,453 | r | #Statistical Inference Course - Simulation Exercise
#by Preetika Srivastava
#Multiple Simulations will be ran to compare the theoretical mean and standard deviation of exponential function, to that the one obtained
#by simulations. This exercise leverages the idea of 'Central Limit Theorem'
set.seed(3007)
lambda = 0.... |
gsagenie.reset.run <- function(session, input, output, step1_status, step2_status, step3_status, result_status, event='') {
if (event == 'go_back') {
updateCheckboxInput(session, 'detail', value=FALSE);
updateCheckboxInput(session, 'run_button', value=TRUE);
updateCheckboxInput(session, 'step3_show', valu... | /source/gsagenie.reset.run.r | no_license | zhezhangsh/gsagenie | R | false | false | 778 | r | gsagenie.reset.run <- function(session, input, output, step1_status, step2_status, step3_status, result_status, event='') {
if (event == 'go_back') {
updateCheckboxInput(session, 'detail', value=FALSE);
updateCheckboxInput(session, 'run_button', value=TRUE);
updateCheckboxInput(session, 'step3_show', valu... |
# Copyright 2022 Observational Health Data Sciences and Informatics
#
# This file is part of PheValuator
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | /R/PheValuator.R | permissive | gowthamrao/PheValuator | R | false | false | 961 | r | # Copyright 2022 Observational Health Data Sciences and Informatics
#
# This file is part of PheValuator
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... |
\name{loadAgilentDataFlux}
\alias{loadAgilentDataFlux}
\title{Load Agilent data text files}
\description{Load Agilent data text files}
\usage{
loadAgilentDataFlux(ifile, ofile = NULL, params = list())
}
\arguments{
\item{ifile}{Tab separeted files}
\item{ofile}{Optional .Rdata file to store the object}
\item{par... | /man/loadAgilentDataFlux.Rd | no_license | tonedivad/GRMeta | R | false | false | 697 | rd | \name{loadAgilentDataFlux}
\alias{loadAgilentDataFlux}
\title{Load Agilent data text files}
\description{Load Agilent data text files}
\usage{
loadAgilentDataFlux(ifile, ofile = NULL, params = list())
}
\arguments{
\item{ifile}{Tab separeted files}
\item{ofile}{Optional .Rdata file to store the object}
\item{par... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aiplatform_objects.R
\name{GoogleCloudAiplatformV1TrialParameter}
\alias{GoogleCloudAiplatformV1TrialParameter}
\title{GoogleCloudAiplatformV1TrialParameter Object}
\usage{
GoogleCloudAiplatformV1TrialParameter()
}
\value{
GoogleCloudAiplatfo... | /googleaiplatformv1.auto/man/GoogleCloudAiplatformV1TrialParameter.Rd | no_license | justinjm/autoGoogleAPI | R | false | true | 595 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aiplatform_objects.R
\name{GoogleCloudAiplatformV1TrialParameter}
\alias{GoogleCloudAiplatformV1TrialParameter}
\title{GoogleCloudAiplatformV1TrialParameter Object}
\usage{
GoogleCloudAiplatformV1TrialParameter()
}
\value{
GoogleCloudAiplatfo... |
rankall <- function(outcome, num = "best") {
## Read outcome data
outcome_data <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
## Check that state and outcome are valid
# if (!any(outcome == c("heart attack" , "heart failure" ,"pneumonia" ) )){
# ... | /rankall.R | no_license | basmaNasser/Programming-Assignment-3--Hospital-Quality | R | false | false | 1,808 | r | rankall <- function(outcome, num = "best") {
## Read outcome data
outcome_data <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
## Check that state and outcome are valid
# if (!any(outcome == c("heart attack" , "heart failure" ,"pneumonia" ) )){
# ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dasl.R
\docType{data}
\name{dasl.craters}
\alias{dasl.craters}
\title{Craters}
\format{168 observations}
\source{
DASL – The Data And Story Library: \href{https://dasl.datadescription.com/datafile/craters/?sf_paged=9}{Craters}
}
\description{... | /man/dasl.craters.Rd | no_license | sigbertklinke/mmstat.data | R | false | true | 1,238 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dasl.R
\docType{data}
\name{dasl.craters}
\alias{dasl.craters}
\title{Craters}
\format{168 observations}
\source{
DASL – The Data And Story Library: \href{https://dasl.datadescription.com/datafile/craters/?sf_paged=9}{Craters}
}
\description{... |
\name{as.data.frame.H2OParsedData}
\alias{as.data.frame.H2OParsedData}
\title{Converts a parsed H2O object to a data frame.}
\description{Convert an \code{\linkS4class{H2OParsedData}} object to a data frame, which allows subsequent data frame operations within the R environment.}
\usage{\method{as.data.frame}{H2OParsed... | /R/h2oRClient-package/man/as.data.frame.Rd | permissive | svaithianatha/h2o | R | false | false | 1,114 | rd | \name{as.data.frame.H2OParsedData}
\alias{as.data.frame.H2OParsedData}
\title{Converts a parsed H2O object to a data frame.}
\description{Convert an \code{\linkS4class{H2OParsedData}} object to a data frame, which allows subsequent data frame operations within the R environment.}
\usage{\method{as.data.frame}{H2OParsed... |
#' @title Document Distances
#' @description Calculate distances between pairs of documents.
#'
#' @param document_term_matrix A sparse matrix object of class
#' "simple_triplet_matrix", or a dense matrix object, with documents as rows and
#' vocabulary entries as columns.
#' @param document_indicies A numeric vector o... | /R/calculate_document_pair_distances.R | no_license | bethanyleap/SpeedReader | R | false | false | 2,368 | r | #' @title Document Distances
#' @description Calculate distances between pairs of documents.
#'
#' @param document_term_matrix A sparse matrix object of class
#' "simple_triplet_matrix", or a dense matrix object, with documents as rows and
#' vocabulary entries as columns.
#' @param document_indicies A numeric vector o... |
library(xgboost)
library(boot)
ExpYParam_xg = function(allpossible,DATA){
inVar = data.matrix(DATA[,c(1:(ncol(DATA)-1))])
predInVar = data.matrix(allpossible[,c(1:(ncol(allpossible)))])
outVar = DATA$Y
model_xgboost = xgboost(verbose = 0, data = data.matrix(inVar), label = outVar, nrounds = 20,max.depth=10,la... | /demonstration/Example_2-mediator/mediator-plugin.R | no_license | CMLennon/WERM | R | false | false | 5,384 | r | library(xgboost)
library(boot)
ExpYParam_xg = function(allpossible,DATA){
inVar = data.matrix(DATA[,c(1:(ncol(DATA)-1))])
predInVar = data.matrix(allpossible[,c(1:(ncol(allpossible)))])
outVar = DATA$Y
model_xgboost = xgboost(verbose = 0, data = data.matrix(inVar), label = outVar, nrounds = 20,max.depth=10,la... |
\name{microplot-internal}
\title{Internal microplot functions}
\alias{optionsCmds}
\alias{sys}
\alias{plot_grid}
\alias{get_legend}
\alias{latex}
\alias{dvi}
\description{Internal microplot functions.}
\details{\code{optionsCmds} and \code{sys} and
\code{latex} and \code{dvi} are imported from \pkg{Hmisc}. See
\co... | /man/microplot-internal.Rd | no_license | cran/microplot | R | false | false | 566 | rd | \name{microplot-internal}
\title{Internal microplot functions}
\alias{optionsCmds}
\alias{sys}
\alias{plot_grid}
\alias{get_legend}
\alias{latex}
\alias{dvi}
\description{Internal microplot functions.}
\details{\code{optionsCmds} and \code{sys} and
\code{latex} and \code{dvi} are imported from \pkg{Hmisc}. See
\co... |
#' Load and check a frequency file
#'
#' Loads a frequency database file and compares it against mixture data to check for common errors.
#'
#' @param filename Path of the frecuency database file
#' @param mix Data frame with mixture data. See relMix vignette for description of the format
#' @return A list containing
#... | /R/checkFrequenciesFile.R | no_license | gdorum/relMix | R | false | false | 4,121 | r | #' Load and check a frequency file
#'
#' Loads a frequency database file and compares it against mixture data to check for common errors.
#'
#' @param filename Path of the frecuency database file
#' @param mix Data frame with mixture data. See relMix vignette for description of the format
#' @return A list containing
#... |
#-----------------#
# Function for S1 #
#-----------------#
#Parameters for group-sequential design
NF1 <- 60 #NSN of fix design
alpha <- 0.025
beta <- 0.1
z1<- -qnorm(alpha,0,1)
z2<- -qnorm(beta,0,1)
theta.nc<-log( (0.7*(1-0.5)) / ((0.5*(1-0.7))) )
theta<-log( (0.7*(1-0.5)) / ((0.5*(1-0.7))) ) * ... | /Code/S1_design/script_S1_fct.R | no_license | PMN-BCH/simu-VHF | R | false | false | 4,263 | r | #-----------------#
# Function for S1 #
#-----------------#
#Parameters for group-sequential design
NF1 <- 60 #NSN of fix design
alpha <- 0.025
beta <- 0.1
z1<- -qnorm(alpha,0,1)
z2<- -qnorm(beta,0,1)
theta.nc<-log( (0.7*(1-0.5)) / ((0.5*(1-0.7))) )
theta<-log( (0.7*(1-0.5)) / ((0.5*(1-0.7))) ) * ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/update_deps.R
\name{update_deps}
\alias{update_deps}
\title{Update Dependencies for a Package Directory}
\usage{
update_deps(path)
}
\arguments{
\item{path}{the package's root directory.}
}
\description{
\pkg{cyclocomp} updates the dependenci... | /man/update_deps.Rd | permissive | cran/packager | R | false | true | 695 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/update_deps.R
\name{update_deps}
\alias{update_deps}
\title{Update Dependencies for a Package Directory}
\usage{
update_deps(path)
}
\arguments{
\item{path}{the package's root directory.}
}
\description{
\pkg{cyclocomp} updates the dependenci... |
# Tests queryExhaustive().
# library(BiocNeighbors); library(testthat); source("setup.R"); source("test-query-exhaustive.R")
set.seed(1001)
test_that("queryExhaustive() behaves correctly with queries", {
ndata <- 1000
nquery <- 100
for (ndim in c(1, 5, 10, 20)) {
for (k in c(1, 5, 20)) {
... | /tests/testthat/test-query-exhaustive.R | no_license | yzizhen/BiocNeighbors | R | false | false | 7,576 | r | # Tests queryExhaustive().
# library(BiocNeighbors); library(testthat); source("setup.R"); source("test-query-exhaustive.R")
set.seed(1001)
test_that("queryExhaustive() behaves correctly with queries", {
ndata <- 1000
nquery <- 100
for (ndim in c(1, 5, 10, 20)) {
for (k in c(1, 5, 20)) {
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{pad_frames}
\alias{pad_frames}
\title{Pad the end of list of data frames}
\usage{
pad_frames(x, id, n.period = 360, rotation = "add", force = TRUE)
}
\arguments{
\item{x}{list of data frames.}
\item{id}{character, column na... | /man/pad_frames.Rd | no_license | cassljx/mapmate | R | false | true | 2,378 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{pad_frames}
\alias{pad_frames}
\title{Pad the end of list of data frames}
\usage{
pad_frames(x, id, n.period = 360, rotation = "add", force = TRUE)
}
\arguments{
\item{x}{list of data frames.}
\item{id}{character, column na... |
png (file = 'plot4.png')
par(mfrow = c(2,2))
#first one
plot(jmfinaldata$DT1,jmintdataset$Global_active_power, type = 'b', ann = FALSE, cex = 0.5)
title (ylab = 'Global Active Power (kilowatts)')
#2nd one
plot(jmfinaldata$DT1,jmfinaldata$Voltage, type = 'b', ylab = 'Voltage', xlab = 'date/time')
#third one
plot(jmfinal... | /plot4.r | no_license | boxcarrovers/Exploratory-Data-Analysis | R | false | false | 784 | r | png (file = 'plot4.png')
par(mfrow = c(2,2))
#first one
plot(jmfinaldata$DT1,jmintdataset$Global_active_power, type = 'b', ann = FALSE, cex = 0.5)
title (ylab = 'Global Active Power (kilowatts)')
#2nd one
plot(jmfinaldata$DT1,jmfinaldata$Voltage, type = 'b', ylab = 'Voltage', xlab = 'date/time')
#third one
plot(jmfinal... |
rankhospital <- function(state, outcome, num = "best") {
## Read outcome data
data <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
state <- state
outcome <- outcome
rank <- num
## Check that state and outcome are valid
stat... | /r-programming/assignment3/rankHospital.R | permissive | gdtm86/datasciencecoursera | R | false | false | 1,516 | r |
rankhospital <- function(state, outcome, num = "best") {
## Read outcome data
data <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
state <- state
outcome <- outcome
rank <- num
## Check that state and outcome are valid
stat... |
#' Adjust Dose-Response Table when Futility Rule Invoked
#'
#' @description Adjust dose availabilities given that the futility rule was invoked, if dose sample size >= 6 (if sample size < 6, choose to stay and explore dose further, so no availabilities are changed).
#' The dose that invoked the futility rule and any hi... | /R/adjust_for_futility_rule.R | no_license | jiyingz/clinicalMPI | R | false | false | 1,184 | r | #' Adjust Dose-Response Table when Futility Rule Invoked
#'
#' @description Adjust dose availabilities given that the futility rule was invoked, if dose sample size >= 6 (if sample size < 6, choose to stay and explore dose further, so no availabilities are changed).
#' The dose that invoked the futility rule and any hi... |
# Perceptron Algorithm Implementation
s <- array(c(1, 1, 1,-1,1,1,-1,1,1,-1,1,1),dim=c(4,3))
t <- array(c(1, -1, -1,-1),dim=c(4,1))
print(s)
print(t)
w = t(c(0,0,0))
b = 0
pattern_match <- 0
k<-1 # To Count Iteration
n<-0 #
step <- 0
alpha = 1
theta = 0.2
Y <- 0
print(-theta)
while (n < 4){
for (i in 1:4)
{
... | /NN_prog2_Perceptron.R | no_license | Bhaumik10/CS6673-Neural-Network | R | false | false | 2,206 | r | # Perceptron Algorithm Implementation
s <- array(c(1, 1, 1,-1,1,1,-1,1,1,-1,1,1),dim=c(4,3))
t <- array(c(1, -1, -1,-1),dim=c(4,1))
print(s)
print(t)
w = t(c(0,0,0))
b = 0
pattern_match <- 0
k<-1 # To Count Iteration
n<-0 #
step <- 0
alpha = 1
theta = 0.2
Y <- 0
print(-theta)
while (n < 4){
for (i in 1:4)
{
... |
#This is the verification test with Informationstrategy increasevalue is 5
options(stringsAsFactors = FALSE)
#Note that plot() is not the same as ggplot()
#these are from two separate packages
library(ggplot2)
# needed for reshaping data frames
library(reshape2)
#used for querying data, performing aggregations, fil... | /r-script_verificationtest2.R | no_license | KMeeuw/AgentBasedJRC | R | false | false | 2,850 | r | #This is the verification test with Informationstrategy increasevalue is 5
options(stringsAsFactors = FALSE)
#Note that plot() is not the same as ggplot()
#these are from two separate packages
library(ggplot2)
# needed for reshaping data frames
library(reshape2)
#used for querying data, performing aggregations, fil... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 8895
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 8400
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 8400
c
c Input Parameter (command line, fil... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Kronegger-Pfandler-Pichler/bomb/p5-5.pddl_planlen=15/p5-5.pddl_planlen=15.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 2,705 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 8895
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 8400
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 8400
c
c Input Parameter (command line, fil... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-in-reference.R
\name{GROUPS.GOVT}
\alias{GROUPS.GOVT}
\title{Dataset that should probably be removed or outsourced to data store}
\usage{
GROUPS.GOVT()
}
\description{
Dataset that should probably be removed or outsourced to data store
}... | /man/GROUPS.GOVT.Rd | no_license | andybue/r2dii.dataraw | R | false | true | 1,766 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-in-reference.R
\name{GROUPS.GOVT}
\alias{GROUPS.GOVT}
\title{Dataset that should probably be removed or outsourced to data store}
\usage{
GROUPS.GOVT()
}
\description{
Dataset that should probably be removed or outsourced to data store
}... |
\name{xmp15.04}
\alias{xmp15.04}
\docType{data}
\title{data from Example 15.4}
\description{
The \code{xmp15.04} data frame has 12 rows and 2 columns.
}
\format{
This data frame contains the following columns:
\describe{
\item{conc}{
a numeric vector
}
\item{Area}{
a factor with levels
... | /man/xmp15.04.Rd | no_license | dmbates/Devore6 | R | false | false | 542 | rd | \name{xmp15.04}
\alias{xmp15.04}
\docType{data}
\title{data from Example 15.4}
\description{
The \code{xmp15.04} data frame has 12 rows and 2 columns.
}
\format{
This data frame contains the following columns:
\describe{
\item{conc}{
a numeric vector
}
\item{Area}{
a factor with levels
... |
# Load the data from the file
# Label missing data using "?" symbol
# Set the column names
#
data <- read.table(file = "household_power_consumption.txt",sep = ";",colClasses = "character",
col.names = colnames(read.table("household_power_consumption.txt", nrow = 1, header = TRUE, sep=";")),
... | /plot1.R | no_license | Sidney-Bishop/ExData_Plotting1 | R | false | false | 662 | r |
# Load the data from the file
# Label missing data using "?" symbol
# Set the column names
#
data <- read.table(file = "household_power_consumption.txt",sep = ";",colClasses = "character",
col.names = colnames(read.table("household_power_consumption.txt", nrow = 1, header = TRUE, sep=";")),
... |
context("dplyr")
sc <- testthat_spark_connection()
iris_tbl <- testthat_tbl("iris")
test_requires("dplyr")
df1 <- data_frame(a = 1:3, b = letters[1:3])
df2 <- data_frame(b = letters[1:3], c = letters[24:26])
df1_tbl <- testthat_tbl("df1")
df2_tbl <- testthat_tbl("df2")
test_that("the implementation of 'mutate' fun... | /tests/testthat/test-dplyr.R | permissive | Loquats/sparklyr | R | false | false | 3,443 | r | context("dplyr")
sc <- testthat_spark_connection()
iris_tbl <- testthat_tbl("iris")
test_requires("dplyr")
df1 <- data_frame(a = 1:3, b = letters[1:3])
df2 <- data_frame(b = letters[1:3], c = letters[24:26])
df1_tbl <- testthat_tbl("df1")
df2_tbl <- testthat_tbl("df2")
test_that("the implementation of 'mutate' fun... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cloudwatchlogs_operations.R
\name{cloudwatchlogs_put_data_protection_policy}
\alias{cloudwatchlogs_put_data_protection_policy}
\title{Creates a data protection policy for the specified log group}
\usage{
cloudwatchlogs_put_data_protection_pol... | /cran/paws.management/man/cloudwatchlogs_put_data_protection_policy.Rd | permissive | paws-r/paws | R | false | true | 2,684 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cloudwatchlogs_operations.R
\name{cloudwatchlogs_put_data_protection_policy}
\alias{cloudwatchlogs_put_data_protection_policy}
\title{Creates a data protection policy for the specified log group}
\usage{
cloudwatchlogs_put_data_protection_pol... |
#' Dissonance Method function
#'
#' Function allows to do linear ordering by MD parameter. MD is higher is better.
#'
#' @param data data to order. Must be numeric.
#' @param impact string of "+" and "-". If column is a booster then impact must be "+". For inhibitor "-".
#'
#' @export
Dissonance <- function(d... | /dissonance.R | no_license | blenartowicz/taxonomy | R | false | false | 892 | r | #' Dissonance Method function
#'
#' Function allows to do linear ordering by MD parameter. MD is higher is better.
#'
#' @param data data to order. Must be numeric.
#' @param impact string of "+" and "-". If column is a booster then impact must be "+". For inhibitor "-".
#'
#' @export
Dissonance <- function(d... |
\name{brownie.lite}
\alias{brownie.lite}
\title{Likelihood test for rate variation in a continuous trait}
\usage{
brownie.lite(tree, x, maxit=2000, test="chisq", nsim=100, se=NULL, ...)
}
\arguments{
\item{tree}{a phylogenetic tree either as an object of class \code{"phylo"} or \code{"simmap"}. (See \code{\link{read.s... | /man/brownie.lite.Rd | no_license | schnappi-wkl/phytools | R | false | false | 3,492 | rd | \name{brownie.lite}
\alias{brownie.lite}
\title{Likelihood test for rate variation in a continuous trait}
\usage{
brownie.lite(tree, x, maxit=2000, test="chisq", nsim=100, se=NULL, ...)
}
\arguments{
\item{tree}{a phylogenetic tree either as an object of class \code{"phylo"} or \code{"simmap"}. (See \code{\link{read.s... |
query_mvdata<-function(a_lot,a_var){
data_con <- adminKraken::con_mysql()
str<-'Select xvar,sn from mvdata where Lot = "xlot";'
gsub1<-gsub("xvar",a_var,str)
data_query_string<-gsub("xlot",a_lot,gsub1)
data_query<-RMySQL::dbSendQuery(data_con,data_query_string)
fetched_data<-RMySQL::dbFetch(data_query,n=-1)
clean<-RM... | /R/query_mvdata.R | no_license | JARS3N/LLP | R | false | false | 408 | r | query_mvdata<-function(a_lot,a_var){
data_con <- adminKraken::con_mysql()
str<-'Select xvar,sn from mvdata where Lot = "xlot";'
gsub1<-gsub("xvar",a_var,str)
data_query_string<-gsub("xlot",a_lot,gsub1)
data_query<-RMySQL::dbSendQuery(data_con,data_query_string)
fetched_data<-RMySQL::dbFetch(data_query,n=-1)
clean<-RM... |
library(tidyverse)
library(janitor)
library(purrr)
library(cowplot)
growth_raw <- read_csv("Tetraselmis_experiment/data-processed/growth_data_20140606.csv")
all_thermal_data <- read_csv("Tetraselmis_experiment/data-processed/all_thermal_data.csv") %>%
clean_names
curve_data <- read_csv("Tetraselmis_experiment/data-p... | /Tetraselmis_experiment/R/12_curve_exploration.R | permissive | JoeyBernhardt/thermal-variability | R | false | false | 6,953 | r | library(tidyverse)
library(janitor)
library(purrr)
library(cowplot)
growth_raw <- read_csv("Tetraselmis_experiment/data-processed/growth_data_20140606.csv")
all_thermal_data <- read_csv("Tetraselmis_experiment/data-processed/all_thermal_data.csv") %>%
clean_names
curve_data <- read_csv("Tetraselmis_experiment/data-p... |
if(RUN_TESTS)
{
set.seed(20200213)
test <- data.frame(
x = rpois(1e6, 400),
s = sample(paste0("species", 1:100), 1e6, replace = TRUE)
)
test <- test[order(test$s, -test$x), ]
test_that("Rcpp implementation is right", {
expect_equal(crown_helper(test$x, test$s), crown_helper_cpp(test$x, test$s))
... | /tests/testthat/test-R-vs-cpp.R | no_license | eheinzen/championtrees | R | false | false | 577 | r |
if(RUN_TESTS)
{
set.seed(20200213)
test <- data.frame(
x = rpois(1e6, 400),
s = sample(paste0("species", 1:100), 1e6, replace = TRUE)
)
test <- test[order(test$s, -test$x), ]
test_that("Rcpp implementation is right", {
expect_equal(crown_helper(test$x, test$s), crown_helper_cpp(test$x, test$s))
... |
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.20685850817761e+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/1613099315-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 343 | r | testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.20685850817761e+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... |
plot_idle_time <- function(x, ...) {
mapping <- attr(x, "mapping")
level <- attr(x, "level")
units <- attr(x, "units")
y_lab <- glue("Idle time (in {units})")
if(level == "log") {
attr(x, "raw") %>%
ggplot(aes("", idle_time)) +
geom_boxplot() +
scale_y_continuous() +
theme_light()... | /R/plot.idle_time.R | no_license | cran/edeaR | R | false | false | 1,404 | r |
plot_idle_time <- function(x, ...) {
mapping <- attr(x, "mapping")
level <- attr(x, "level")
units <- attr(x, "units")
y_lab <- glue("Idle time (in {units})")
if(level == "log") {
attr(x, "raw") %>%
ggplot(aes("", idle_time)) +
geom_boxplot() +
scale_y_continuous() +
theme_light()... |
### Clipping GCM Historical information
### C. Navarro - H. Achicanoy
### CIAT, 2016
### =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ###
### Processing GCMs information
### =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ##... | /kenya-county-profiles/00_KACCAL_processing_gcm_information.R | no_license | CIAT-DAPA/dapa-climate-change | R | false | false | 22,364 | r | ### Clipping GCM Historical information
### C. Navarro - H. Achicanoy
### CIAT, 2016
### =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ###
### Processing GCMs information
### =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ##... |
##create a script to parse cBIOportal data
#perhaps this will facilitate analysis across the different datasets...
library(cgdsr)
library(tidyverse)
library(data.table)
script.dir <- dirname(sys.frame(1)$ofile)
all.genes<<-unique(fread('../data/ucsc_kgXref_hg19_2015_10_29.csv')$geneSymbol)
#'getSamplesForDisease cre... | /bin/cBioPortalData.R | no_license | sgosline/RASPathwaySig | R | false | false | 11,090 | r | ##create a script to parse cBIOportal data
#perhaps this will facilitate analysis across the different datasets...
library(cgdsr)
library(tidyverse)
library(data.table)
script.dir <- dirname(sys.frame(1)$ofile)
all.genes<<-unique(fread('../data/ucsc_kgXref_hg19_2015_10_29.csv')$geneSymbol)
#'getSamplesForDisease cre... |
#!/applications/R/R-3.5.0/bin/Rscript
# Compile DMC1 gene quantile hypergeometric test results into one supplemental table
library(parallel)
inDir <- "/home/ajt200/analysis/wheat/ASY1_CS/snakemake_ChIPseq/mapped/geneProfiles_subgenomes/quantiles/quantiles_by_DMC1_in_genes/"
inDir1 <- paste0(inDir, "hypergeometricTes... | /manuscript_DMC1_ASY1/GenomeResearch/SuppTables/SuppTableS17_DMC1_gene_quantiles_hypergeomTests_homoeologExpVar.R | no_license | ajtock/wheat | R | false | false | 4,113 | r | #!/applications/R/R-3.5.0/bin/Rscript
# Compile DMC1 gene quantile hypergeometric test results into one supplemental table
library(parallel)
inDir <- "/home/ajt200/analysis/wheat/ASY1_CS/snakemake_ChIPseq/mapped/geneProfiles_subgenomes/quantiles/quantiles_by_DMC1_in_genes/"
inDir1 <- paste0(inDir, "hypergeometricTes... |
library(Rcplex)
solve_classification_svm <- function(K, y, C, epsilon) {
N <- length(y)
yyK <- (y %*% t(y)) * K
opts <- list()
opts$trace <- 0
opts$maxcalls <- 41 * 200
result <- Rcplex(cvec = rep(-1, N),
Amat = matrix(y, nrow = 1, byrow = TRUE),
bv... | /solve_classification_models_cplex.R | no_license | arezourahimi/mtgsbc | R | false | false | 2,695 | r | library(Rcplex)
solve_classification_svm <- function(K, y, C, epsilon) {
N <- length(y)
yyK <- (y %*% t(y)) * K
opts <- list()
opts$trace <- 0
opts$maxcalls <- 41 * 200
result <- Rcplex(cvec = rep(-1, N),
Amat = matrix(y, nrow = 1, byrow = TRUE),
bv... |
#Code to find the months of attack
SHARKATTACK<- read.csv('sharkattack.csv', header = T, stringsAsFactors = F)
install.packages("lubridate")
SHARKATTACK $Date <- gsub('', '', MDEHBFile $TEHBDedInnTier1Individual)
library(lubridate)
SHARKATTACK $Month <- month(SHARKATTACK $Date)
SHARKATTACK $Area <- as.factor(SHARKATT... | /DataMining/RCode/monthsbysharkattacks.R | no_license | AKDDResearch/Shark-Attack | R | false | false | 1,054 | r |
#Code to find the months of attack
SHARKATTACK<- read.csv('sharkattack.csv', header = T, stringsAsFactors = F)
install.packages("lubridate")
SHARKATTACK $Date <- gsub('', '', MDEHBFile $TEHBDedInnTier1Individual)
library(lubridate)
SHARKATTACK $Month <- month(SHARKATTACK $Date)
SHARKATTACK $Area <- as.factor(SHARKATT... |
context("checks shrub transect data")
data <- read.csv("../Plants/Portal_plant_transects_2015_present.csv")
old_transects <- read.csv("../Plants/Portal_plant_transects_1989_2009.csv")
species <- read.csv('../Plants/Portal_plant_species.csv')
test_that("valid year", {
expect_true(all(data$year %in% 1981:max(data... | /testthat/test-shrub_transects.R | permissive | weecology/PortalData | R | false | false | 1,544 | r | context("checks shrub transect data")
data <- read.csv("../Plants/Portal_plant_transects_2015_present.csv")
old_transects <- read.csv("../Plants/Portal_plant_transects_1989_2009.csv")
species <- read.csv('../Plants/Portal_plant_species.csv')
test_that("valid year", {
expect_true(all(data$year %in% 1981:max(data... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dynamodb_operations.R
\name{dynamodb_restore_table_to_point_in_time}
\alias{dynamodb_restore_table_to_point_in_time}
\title{Restores the specified table to the specified point in time within
EarliestRestorableDateTime and LatestRestorableDate... | /paws/man/dynamodb_restore_table_to_point_in_time.Rd | permissive | sanchezvivi/paws | R | false | true | 4,398 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dynamodb_operations.R
\name{dynamodb_restore_table_to_point_in_time}
\alias{dynamodb_restore_table_to_point_in_time}
\title{Restores the specified table to the specified point in time within
EarliestRestorableDateTime and LatestRestorableDate... |
setwd('/Users/jmrt/Documents/Internship/Embassy_HateCrimes/hate_groups')
library(leaflet)
library(rgdal)
library(dplyr)
library(colorspace)
library(htmltools)
library(tidyverse)
## Download Shapes and Data ##
shapes <- readOGR( "data/shapes/tl_2017_us_state.shp")
hg <-read.csv('data/splc-hate-groups.csv')
agg_hc <-re... | /handle_data.R | no_license | jramtos/hate_groups | R | false | false | 3,679 | r | setwd('/Users/jmrt/Documents/Internship/Embassy_HateCrimes/hate_groups')
library(leaflet)
library(rgdal)
library(dplyr)
library(colorspace)
library(htmltools)
library(tidyverse)
## Download Shapes and Data ##
shapes <- readOGR( "data/shapes/tl_2017_us_state.shp")
hg <-read.csv('data/splc-hate-groups.csv')
agg_hc <-re... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/set_coverage.R
\name{set_coverage}
\alias{set_coverage}
\title{set_coverage}
\usage{
set_coverage(beginDate = character(), endDate = character(),
date = character(), sci_names = character(),
geographicDescription = character(), westBoundi... | /man/set_coverage.Rd | no_license | nicolasfstgelais/EML | R | false | true | 2,616 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/set_coverage.R
\name{set_coverage}
\alias{set_coverage}
\title{set_coverage}
\usage{
set_coverage(beginDate = character(), endDate = character(),
date = character(), sci_names = character(),
geographicDescription = character(), westBoundi... |
library(methods)
library(foreach)
library(Matrix)
library(caret)
library(crisp)
mse = function(y, y.hat) {
sum((y - y.hat)^2)/length(y)
}
loadGapStatistic = function(city, trial) {
as.integer(read.csv(sprintf('../../data/crime/%s/results/gfl/%d.csv', city, trial), header=FALSE)$V1[3])
}
args = commandArgs(tr... | /R/crime/run_gap_crisp.R | no_license | tansey/mvtv | R | false | false | 2,505 | r | library(methods)
library(foreach)
library(Matrix)
library(caret)
library(crisp)
mse = function(y, y.hat) {
sum((y - y.hat)^2)/length(y)
}
loadGapStatistic = function(city, trial) {
as.integer(read.csv(sprintf('../../data/crime/%s/results/gfl/%d.csv', city, trial), header=FALSE)$V1[3])
}
args = commandArgs(tr... |
library(EMtree)
library(PLNmodels)
library(LITree)
library(ggraph)
library(tidygraph)
library(tidyverse)
library(mvtnorm)
library(useful)
library(mclust)
library(MASS)
library(parallel)
library(ROCR)
library(reshape2)#for ggimage
library(gridExtra)
library(harrypotter)
library(sparsepca)
source("/Users/raphaellemomal/t... | /R/codes/missingActor/J_AUC.R | no_license | Rmomal/these | R | false | false | 8,864 | r | library(EMtree)
library(PLNmodels)
library(LITree)
library(ggraph)
library(tidygraph)
library(tidyverse)
library(mvtnorm)
library(useful)
library(mclust)
library(MASS)
library(parallel)
library(ROCR)
library(reshape2)#for ggimage
library(gridExtra)
library(harrypotter)
library(sparsepca)
source("/Users/raphaellemomal/t... |
# Need some data to play with
df1 <- data.frame(LETTERS, dfindex = 1:26)
df2 <- data.frame(letters, dfindex = c(1:10, 15, 20, 22:35))
# INNER JOIN: returns rows when there is a match in both tables.
merge(df1, df2)
merge(df1, df2, by="dfindex")
# FULL (outer) JOIN: all records from both the tables and fill in NULLs f... | /r/learning/data_type/dataframe/merge.r | no_license | jk983294/math | R | false | false | 844 | r | # Need some data to play with
df1 <- data.frame(LETTERS, dfindex = 1:26)
df2 <- data.frame(letters, dfindex = c(1:10, 15, 20, 22:35))
# INNER JOIN: returns rows when there is a match in both tables.
merge(df1, df2)
merge(df1, df2, by="dfindex")
# FULL (outer) JOIN: all records from both the tables and fill in NULLs f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.