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
#Week 2 Assignment #Nathan Groom #1a queue<- c("James","Mary","Steve","Alex","Patricia") #1b queue<-append(queue, "Harold") #1c queue<-queue[-1] #1d queue<-append(queue,"Pam",after=1) #1e queue<-queue[-5] #1f queue<-queue[-which(queue=="Alex")] #1g match("Patricia",queue) #1h length(queue) #2 quad<-function(a,b,c){ ...
/607assignment2.R
no_license
nathanmgroom/NathansRepository
R
false
false
1,393
r
#Week 2 Assignment #Nathan Groom #1a queue<- c("James","Mary","Steve","Alex","Patricia") #1b queue<-append(queue, "Harold") #1c queue<-queue[-1] #1d queue<-append(queue,"Pam",after=1) #1e queue<-queue[-5] #1f queue<-queue[-which(queue=="Alex")] #1g match("Patricia",queue) #1h length(queue) #2 quad<-function(a,b,c){ ...
#' Add distance columns to injury tables #' #' Add distance columns to injury tables, matching on information in the injury contingency table #' #' @param injury_table (list of) data frame(s) to be edited #' @param mode_names which modes to take distances for #' @param true_distances_0 distances to add to injury tabl...
/R/add_distance_columns.R
no_license
danielgils/ITHIM-R
R
false
false
5,971
r
#' Add distance columns to injury tables #' #' Add distance columns to injury tables, matching on information in the injury contingency table #' #' @param injury_table (list of) data frame(s) to be edited #' @param mode_names which modes to take distances for #' @param true_distances_0 distances to add to injury tabl...
## Put comments here that give an overall description of what your ## functions do #This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = numeric()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x ...
/cachematrix.R
no_license
tyler-b/ProgrammingAssignment2
R
false
false
980
r
## Put comments here that give an overall description of what your ## functions do #This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = numeric()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x ...
# adding tidyselect where utils::globalVariables("where")
/R/globals.R
permissive
nikdata/RClimacell
R
false
false
58
r
# adding tidyselect where utils::globalVariables("where")
"llogistic" <- function( fixed = c(NA, NA, NA, NA, NA), names = c("b", "c", "d", "e", "f"), method = c("1", "2", "3", "4"), ssfct = NULL, fctName, fctText) { ## Matching 'adjust' argument method <- match.arg(method) ## Checking arguments numParm <- 5 if (!is.character(names) | !(len...
/R/llogistic.R
no_license
csetraynor/drc
R
false
false
22,240
r
"llogistic" <- function( fixed = c(NA, NA, NA, NA, NA), names = c("b", "c", "d", "e", "f"), method = c("1", "2", "3", "4"), ssfct = NULL, fctName, fctText) { ## Matching 'adjust' argument method <- match.arg(method) ## Checking arguments numParm <- 5 if (!is.character(names) | !(len...
if (!require(sqldf)) install.packages("sqldf") library(sqldf) ## Load Data NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") ## Extract total PM2.5 for each year for Baltimore for each source EmissionDataByYearAndType <-sqldf('select year, type, sum(Emissions) as cumulativeEmis...
/plot3.R
no_license
ranata/ExData_Plotting2
R
false
false
945
r
if (!require(sqldf)) install.packages("sqldf") library(sqldf) ## Load Data NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") ## Extract total PM2.5 for each year for Baltimore for each source EmissionDataByYearAndType <-sqldf('select year, type, sum(Emissions) as cumulativeEmis...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/general_small_functions.R \name{pairs2} \alias{pairs2} \title{Scatterplot Matrices} \usage{ pairs2(x, labels, panel = points, ..., horInd = 1:nc, verInd = 1:nc, lower.panel = panel, upper.panel = panel, diag.panel = NULL, text.panel = tex...
/man/pairs2.Rd
no_license
jernbom/rappp
R
false
true
2,789
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/general_small_functions.R \name{pairs2} \alias{pairs2} \title{Scatterplot Matrices} \usage{ pairs2(x, labels, panel = points, ..., horInd = 1:nc, verInd = 1:nc, lower.panel = panel, upper.panel = panel, diag.panel = NULL, text.panel = tex...
#' Tools to Query Data from the Australian Institute of Health and Welfare 'MyHospitals' Portal #' #' More than 1,000 public and private hospitals across Australia have #' performance data available on 'MyHospitals' (<www.myhospitals.gov.au/>). Methods #' are provides to query indicators for available hospitals over ti...
/R/hosperf-package.R
no_license
hrbrmstr/hosperf
R
false
false
604
r
#' Tools to Query Data from the Australian Institute of Health and Welfare 'MyHospitals' Portal #' #' More than 1,000 public and private hospitals across Australia have #' performance data available on 'MyHospitals' (<www.myhospitals.gov.au/>). Methods #' are provides to query indicators for available hospitals over ti...
# R Programming (JHU) Coursera ## Written by Jack Zhan ## 01/22/2018 # The first function, makeMaxtrix creates a special "matrix", which is really a list containing a function to # set the value of the matrix # get the value of the matrix # set the value of the inverse matrix # get the inverse matrix makeMatrix <- fu...
/02_R_Programming/Programming_Assignment/Assignment2/cache.R
no_license
jackjzhan/datasciencecoursera
R
false
false
1,184
r
# R Programming (JHU) Coursera ## Written by Jack Zhan ## 01/22/2018 # The first function, makeMaxtrix creates a special "matrix", which is really a list containing a function to # set the value of the matrix # get the value of the matrix # set the value of the inverse matrix # get the inverse matrix makeMatrix <- fu...
library(tidyverse) HRvsSB <- read_csv(file = "HRvsSB.csv") HRvsSB <- HRvsSB %>% select(Name, HR, SB) regression <- lm(data = HRvsSB, SB ~ HR) regression plot<- ggplot(data=HRvsSB)+ geom_point(mapping = aes(x = HR , y = SB), col = "blue") + geom_abline(intercept = 12.5449, slope = -0.1557, col = "red") + ...
/HRvsSB.R
no_license
dailysaviz/daily_viz
R
false
false
550
r
library(tidyverse) HRvsSB <- read_csv(file = "HRvsSB.csv") HRvsSB <- HRvsSB %>% select(Name, HR, SB) regression <- lm(data = HRvsSB, SB ~ HR) regression plot<- ggplot(data=HRvsSB)+ geom_point(mapping = aes(x = HR , y = SB), col = "blue") + geom_abline(intercept = 12.5449, slope = -0.1557, col = "red") + ...
setwd("~/Analyses/TrumpClinton1") library(plyr) library(dplyr) library(ggplot2) library(tidyr) library(tidytext) library(cognizer) library(reshape2) library(scales) library(labeling) dat <- read.csv("debate.csv", stringsAsFactors = FALSE) ## Cognizer ---------------- dat <- filter(dat, Speaker != "Audience", Spea...
/TrumpClinton1.R
no_license
amiles2233/TrumpClinton1
R
false
false
4,740
r
setwd("~/Analyses/TrumpClinton1") library(plyr) library(dplyr) library(ggplot2) library(tidyr) library(tidytext) library(cognizer) library(reshape2) library(scales) library(labeling) dat <- read.csv("debate.csv", stringsAsFactors = FALSE) ## Cognizer ---------------- dat <- filter(dat, Speaker != "Audience", Spea...
#' Lolliplots #' @description Plot variants and somatic mutations #' @param SNP.gr A object of \link[GenomicRanges:GRanges-class]{GRanges}, #' \link[GenomicRanges:GRangesList-class]{GRangesList} #' or a list of \link[GenomicRanges:GRanges-class]{GRanges}. #' All the width of GRanges must be 1. #' @param features A obj...
/R/lollipop.plot.R
no_license
pang-hd/trackViewer
R
false
false
19,224
r
#' Lolliplots #' @description Plot variants and somatic mutations #' @param SNP.gr A object of \link[GenomicRanges:GRanges-class]{GRanges}, #' \link[GenomicRanges:GRangesList-class]{GRangesList} #' or a list of \link[GenomicRanges:GRanges-class]{GRanges}. #' All the width of GRanges must be 1. #' @param features A obj...
#' Generates a list of simulated functional data sets #' #' Generates a collection of indepedednt data sets generated under the scenario specified by the given parameters, and returns them as a list. #' #' @param n number of data sets to generate #' @param params parameter values specifying the data generating proc...
/R/sim_data2.R
no_license
dan410/SimStudy_eigenfunction_estimation
R
false
false
1,724
r
#' Generates a list of simulated functional data sets #' #' Generates a collection of indepedednt data sets generated under the scenario specified by the given parameters, and returns them as a list. #' #' @param n number of data sets to generate #' @param params parameter values specifying the data generating proc...
library(sleekts) ### Name: tsData ### Title: Time series data ### Aliases: tsData ### Keywords: datasets ### ** Examples data(tsData) plot(tsData)
/data/genthat_extracted_code/sleekts/examples/tsData.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
154
r
library(sleekts) ### Name: tsData ### Title: Time series data ### Aliases: tsData ### Keywords: datasets ### ** Examples data(tsData) plot(tsData)
# Dimairport # city AIRPORT_ID ORIGIN AIRPORT_CODE COUNTRY_CODE COUNTRY_NAME CITY_NAME # DIMairline # AIRLINE_ID UNIQUE_CARRIER_NAME CARRIER_NAME OVERALL RATING LEGROOM SEAT COMFORT CUSTOMER SERVICE VALUE FOR MONEY CHECK-IN AND BOARDING FOOD AND BEVERAGE IN-FLIGHT ENTERTAINMENT (WIFI, TV, FILMS) # DIMYEAR # AVE...
/SSIS Automation With_R_Code/RAW_DATA_AVIATION.R
permissive
lalitpathak/Data-Warehousing-and-Business-Intelligence-with-SSIS-SSAS-R-Tableau
R
false
false
2,269
r
# Dimairport # city AIRPORT_ID ORIGIN AIRPORT_CODE COUNTRY_CODE COUNTRY_NAME CITY_NAME # DIMairline # AIRLINE_ID UNIQUE_CARRIER_NAME CARRIER_NAME OVERALL RATING LEGROOM SEAT COMFORT CUSTOMER SERVICE VALUE FOR MONEY CHECK-IN AND BOARDING FOOD AND BEVERAGE IN-FLIGHT ENTERTAINMENT (WIFI, TV, FILMS) # DIMYEAR # AVE...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.32784507357645e-308, 9.53818252170339e+295, 1.22810576854792e+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))) result <- do.call(CNull:::communities_individual...
/CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615832398-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
362
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.32784507357645e-308, 9.53818252170339e+295, 1.22810576854792e+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))) result <- do.call(CNull:::communities_individual...
source("final_opportunity_metrics.Rmd") library(vegan) test<-dat.norm %>% select(contains("_norm")) test <- test[complete.cases(test),] trial_pca <- rda(test,scale=F) summary(trial_pca) vegan:::biplot.rda(trial_pca,type=c("text","points"))
/pca test.R
no_license
KUNI-Mariculture/Mariculture-data-analysis
R
false
false
241
r
source("final_opportunity_metrics.Rmd") library(vegan) test<-dat.norm %>% select(contains("_norm")) test <- test[complete.cases(test),] trial_pca <- rda(test,scale=F) summary(trial_pca) vegan:::biplot.rda(trial_pca,type=c("text","points"))
# wps.des: timeSeriesGapFiller, title = Fills in gaps in a time series, # abstract = Fills data gaps in time series; # wps.in: url, string; # wps.out: output, text; library(WaterML) library(xts) #url <- 'http://hydrodata.info/chmi-h/cuahsi_1_1.asmx/GetValuesObject?location=CHMI-H:140&variable=CHMI-H:TEPLOTA&startDate...
/timeSeriesGapFiller.R
no_license
mmbayles/TimeSeries-Converter
R
false
false
1,110
r
# wps.des: timeSeriesGapFiller, title = Fills in gaps in a time series, # abstract = Fills data gaps in time series; # wps.in: url, string; # wps.out: output, text; library(WaterML) library(xts) #url <- 'http://hydrodata.info/chmi-h/cuahsi_1_1.asmx/GetValuesObject?location=CHMI-H:140&variable=CHMI-H:TEPLOTA&startDate...
load('youtube.RData') full.model = lm(views~.,data=youtube) # reduced.model = lm(views~subscribers+dislikes+like.ratio+comments+engagement.ratio+title.length+description.length+trend.pub.diff+trend_tag_highest+trend_tag_total+weekday,data=youtube.transf) plot.outliers = function(fit,index,rownums,title){ len.rownums...
/Statistics projects/Regression analysis/Detecting outliers.r
no_license
jung-akim/statistics
R
false
false
4,816
r
load('youtube.RData') full.model = lm(views~.,data=youtube) # reduced.model = lm(views~subscribers+dislikes+like.ratio+comments+engagement.ratio+title.length+description.length+trend.pub.diff+trend_tag_highest+trend_tag_total+weekday,data=youtube.transf) plot.outliers = function(fit,index,rownums,title){ len.rownums...
\name{extract} \alias{extract} \alias{extract.stride} \title{Extract A Specific Cluster Solution From A Stride} \description{Extracts a specified cluster solution from an object of class \sQuote{stride}. The desired solution is specified by the number of clusters. } \usage{ \method{extract}{stride}(stride,k) } \argu...
/man/extract.Rd
no_license
cran/optpart
R
false
false
1,302
rd
\name{extract} \alias{extract} \alias{extract.stride} \title{Extract A Specific Cluster Solution From A Stride} \description{Extracts a specified cluster solution from an object of class \sQuote{stride}. The desired solution is specified by the number of clusters. } \usage{ \method{extract}{stride}(stride,k) } \argu...
set.seed(101) # Generate Data N = 100 # 100 data points Int = 20 xCoef = 2 X1 = rnorm(N, 20, 10) hist(X1) numIt = 1:1000 Yit = rep(0, 1000) for(var in numIt) { Y = Int + X1*xCoef + rnorm(N, 0, 20) #plot(X1, Y) #abline(20, 2, col="red") #fit a linear regression fit = lm(Y~X1) summary(fit) #abline(fi...
/datasciefy/R_practice/linreg.R
no_license
argoel/coding
R
false
false
441
r
set.seed(101) # Generate Data N = 100 # 100 data points Int = 20 xCoef = 2 X1 = rnorm(N, 20, 10) hist(X1) numIt = 1:1000 Yit = rep(0, 1000) for(var in numIt) { Y = Int + X1*xCoef + rnorm(N, 0, 20) #plot(X1, Y) #abline(20, 2, col="red") #fit a linear regression fit = lm(Y~X1) summary(fit) #abline(fi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/models.R \name{pred_quantile} \alias{pred_quantile} \title{Predict quantile predictions using lightgbm} \usage{ pred_quantile(data, train_idx, test_idx, response_idx, alpha, ...) } \arguments{ \item{data}{} \item{train_idx}{} \item{test_idx...
/man/pred_quantile.Rd
permissive
julioolvera1/pod-energy-comp
R
false
true
423
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/models.R \name{pred_quantile} \alias{pred_quantile} \title{Predict quantile predictions using lightgbm} \usage{ pred_quantile(data, train_idx, test_idx, response_idx, alpha, ...) } \arguments{ \item{data}{} \item{train_idx}{} \item{test_idx...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{genes} \alias{genes} \title{genes data for sequencing annotion} \format{ a data frame, tibble } \description{ genes data for sequencing annotion }
/man/genes.Rd
no_license
soulong/bioTools
R
false
true
253
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{genes} \alias{genes} \title{genes data for sequencing annotion} \format{ a data frame, tibble } \description{ genes data for sequencing annotion }
NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") #head(NEI) #head(SCC) library(ggplot2) library(plyr) ## Converting "year", "type", "Pollutant", "SCC", "fips" to factor colToFactor <- c("year", "type", "Pollutant","SCC","fips") NEI[,colToFactor] <- lapply(NEI[,colToFactor], fac...
/plot2.R
no_license
shreyachaudhari99/Coursera-Project-2
R
false
false
1,033
r
NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") #head(NEI) #head(SCC) library(ggplot2) library(plyr) ## Converting "year", "type", "Pollutant", "SCC", "fips" to factor colToFactor <- c("year", "type", "Pollutant","SCC","fips") NEI[,colToFactor] <- lapply(NEI[,colToFactor], fac...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pnpp_experiment-reclassify.R \name{reclassify_droplets_single.pnpp_experiment} \alias{reclassify_droplets_single.pnpp_experiment} \title{Reclassify droplets in a well} \usage{ \method{reclassify_droplets_single}{pnpp_experiment}(plate, well_i...
/man/reclassify_droplets_single.pnpp_experiment.Rd
permissive
ringbellw/ddpcr
R
false
true
494
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pnpp_experiment-reclassify.R \name{reclassify_droplets_single.pnpp_experiment} \alias{reclassify_droplets_single.pnpp_experiment} \title{Reclassify droplets in a well} \usage{ \method{reclassify_droplets_single}{pnpp_experiment}(plate, well_i...
library(ctmm) ### Name: summary.ctmm ### Title: Summarize a continuous-time movement model ### Aliases: summary.ctmm ### ** Examples ## No test: # Load package and data library(ctmm) data(buffalo) # Extract movement data for a single animal Cilla <- buffalo$Cilla # fit model GUESS <- ctmm.guess(Cilla,interactive=...
/data/genthat_extracted_code/ctmm/examples/summary.ctmm.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
422
r
library(ctmm) ### Name: summary.ctmm ### Title: Summarize a continuous-time movement model ### Aliases: summary.ctmm ### ** Examples ## No test: # Load package and data library(ctmm) data(buffalo) # Extract movement data for a single animal Cilla <- buffalo$Cilla # fit model GUESS <- ctmm.guess(Cilla,interactive=...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/p_stars-function.R \name{p_stars} \alias{p_stars} \title{Return p-value significance star(s) from a number.} \usage{ p_stars(p, show_ns = TRUE) } \arguments{ \item{p}{A number for which a p-value star should be returned: \describe{ \item{...
/man/p_stars.Rd
no_license
darrellpenta/APAstyler
R
false
true
672
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/p_stars-function.R \name{p_stars} \alias{p_stars} \title{Return p-value significance star(s) from a number.} \usage{ p_stars(p, show_ns = TRUE) } \arguments{ \item{p}{A number for which a p-value star should be returned: \describe{ \item{...
## The following functions show an example of how to cache a matrix and its inverse ## This function creates a special "matrix" object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { inverseMatrix <- NULL set <- function(y) { x <<- y inverseMatrix <<- NULL } get...
/cachematrix.R
no_license
AndyLiu0429/ProgrammingAssignment2
R
false
false
947
r
## The following functions show an example of how to cache a matrix and its inverse ## This function creates a special "matrix" object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { inverseMatrix <- NULL set <- function(y) { x <<- y inverseMatrix <<- NULL } get...
require(spatialEco) require(sp) require(usedist) require(rgeos) require(raster) require(spatstat) require(igraph) require(sf) require(rgdal) require(gdistance) require(otuSummary) require(gdata) require(maptools) require(tidyverse) require(reshape2) require(data.table) #setwd("E:/LCP sensitivity test/ConnectivityHPC_in...
/Code/HPC_1000econspgyr40Rep5.R
no_license
ZacharyRobbins/TransferHPC
R
false
false
14,783
r
require(spatialEco) require(sp) require(usedist) require(rgeos) require(raster) require(spatstat) require(igraph) require(sf) require(rgdal) require(gdistance) require(otuSummary) require(gdata) require(maptools) require(tidyverse) require(reshape2) require(data.table) #setwd("E:/LCP sensitivity test/ConnectivityHPC_in...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/read_highways_bg.R \name{read_highways_bg} \alias{read_highways_bg} \title{Highways} \usage{ read_highways_bg() } \description{ Function returns some highways in the municipality of Bage } \examples{ \dontrun{ library(geobage) c <- read_h...
/man/read_highways_bg.Rd
no_license
Prof-Rodrigo-Silva/geobage
R
false
true
2,361
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/read_highways_bg.R \name{read_highways_bg} \alias{read_highways_bg} \title{Highways} \usage{ read_highways_bg() } \description{ Function returns some highways in the municipality of Bage } \examples{ \dontrun{ library(geobage) c <- read_h...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/modify_columns.R \name{cols_move_to_start} \alias{cols_move_to_start} \title{Move one or more columns to the start} \usage{ cols_move_to_start(data, columns) } \arguments{ \item{data}{A table object that is created using the \code{\link[=gt]{...
/man/cols_move_to_start.Rd
permissive
elmstedt/gt
R
false
true
2,572
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/modify_columns.R \name{cols_move_to_start} \alias{cols_move_to_start} \title{Move one or more columns to the start} \usage{ cols_move_to_start(data, columns) } \arguments{ \item{data}{A table object that is created using the \code{\link[=gt]{...
downConfig <- function(N) { matrix(-1,N,N) } # 1 of 2 lowest energy configs upConfig <- function(N) { matrix(1,N,N) } # other lowest energy configs randomConfig <- function(N) { config <- matrix(2*sample(0:1, N*N, replace=TRUE)-1, N,N) } randomSite <- function(N) { rns <- runif(2) i <- floor( N* rns[1]...
/ising.R
no_license
sdunbarne/ApplicationsMetropolis
R
false
false
2,659
r
downConfig <- function(N) { matrix(-1,N,N) } # 1 of 2 lowest energy configs upConfig <- function(N) { matrix(1,N,N) } # other lowest energy configs randomConfig <- function(N) { config <- matrix(2*sample(0:1, N*N, replace=TRUE)-1, N,N) } randomSite <- function(N) { rns <- runif(2) i <- floor( N* rns[1]...
#' Get project progress #' #' Fetch the progress of a ClimMob project #' #' @author Kauê de Sousa #' @family GET functions #' @inheritParams getDataCM #' @return A list with number of submissions per assessment and #' submissions per assessment per enumerator #' @details #' \code{server}: the default server is "clim...
/R/getProjectProgress.R
permissive
AgrDataSci/ClimMobTools
R
false
false
3,606
r
#' Get project progress #' #' Fetch the progress of a ClimMob project #' #' @author Kauê de Sousa #' @family GET functions #' @inheritParams getDataCM #' @return A list with number of submissions per assessment and #' submissions per assessment per enumerator #' @details #' \code{server}: the default server is "clim...
#load the package library(dplyr) #Assign all the data frames ,training and test data sets features <- read.table("UCI HAR Dataset/features.txt", col.names = c("n","functions")) activities <- read.table("UCI HAR Dataset/activity_labels.txt", col.names = c("code", "activity")) subject_test <- read.table("UCI HAR Dat...
/run_analysis.R
no_license
patnaiksamit/Assignments_DataScience
R
false
false
2,740
r
#load the package library(dplyr) #Assign all the data frames ,training and test data sets features <- read.table("UCI HAR Dataset/features.txt", col.names = c("n","functions")) activities <- read.table("UCI HAR Dataset/activity_labels.txt", col.names = c("code", "activity")) subject_test <- read.table("UCI HAR Dat...
library(shiny) shinyUI(pageWithSidebar( headerPanel("Developing Data Products Project"), sidebarPanel( p('This is a simple application to assist in analyzing a dataset to determine the best features to use for prediction.'), p('I am basing this on the content from the Practical Machine Learning course, ...
/ui.R
no_license
eugenefallon/DataProductsProject
R
false
false
1,263
r
library(shiny) shinyUI(pageWithSidebar( headerPanel("Developing Data Products Project"), sidebarPanel( p('This is a simple application to assist in analyzing a dataset to determine the best features to use for prediction.'), p('I am basing this on the content from the Practical Machine Learning course, ...
# # Data cleaning from Tanner Carbonati Data Cleaning # library(tidyverse) require(ggplot2) # for data visualization require(stringr) #extracting string patterns require(Matrix) # matrix transformations require(glmnet) # ridge, lasso & elastinet require(xgboost) # gbm require(randomForest) require(Metrics...
/r/Carbonati_Cleaned.R
no_license
thanhnguyen12/AHPP
R
false
false
4,922
r
# # Data cleaning from Tanner Carbonati Data Cleaning # library(tidyverse) require(ggplot2) # for data visualization require(stringr) #extracting string patterns require(Matrix) # matrix transformations require(glmnet) # ridge, lasso & elastinet require(xgboost) # gbm require(randomForest) require(Metrics...
# preprocessing.R # loads linked infant death data from 2012 from NVSS of NCHS # https://www.nber.org/data/lbid.html # preprocesses for outcome variable and features of interest library(data.table) library(tidyverse) ### # load data ddat2012 <- fread("~/Downloads/linkco2012us_den.csv", integer64="character") ddat201...
/preprocessing-death.R
no_license
npho/family-health
R
false
false
9,543
r
# preprocessing.R # loads linked infant death data from 2012 from NVSS of NCHS # https://www.nber.org/data/lbid.html # preprocesses for outcome variable and features of interest library(data.table) library(tidyverse) ### # load data ddat2012 <- fread("~/Downloads/linkco2012us_den.csv", integer64="character") ddat201...
gp_globals = new.env() gp_globals$version = tryCatch( installed.packages()["gProfileR", "Version"], error = function(e) { return("unknown_version") } ); # Set SSL vertion to TLSv1_2 with fallback to TLSv1_1 # CURL_SSLVERSION_SSLv3 is not used due to the SSLv3 vulnerability <https://access.redhat.com/articles/1...
/R/gProfileR.R
no_license
p1g17/gProfileR
R
false
false
18,113
r
gp_globals = new.env() gp_globals$version = tryCatch( installed.packages()["gProfileR", "Version"], error = function(e) { return("unknown_version") } ); # Set SSL vertion to TLSv1_2 with fallback to TLSv1_1 # CURL_SSLVERSION_SSLv3 is not used due to the SSLv3 vulnerability <https://access.redhat.com/articles/1...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/sgp_small_multiples_cleanup.R \name{sgp_small_multiples_cleanup} \alias{sgp_small_multiples_cleanup} \title{SGP small multiples cleanup} \usage{ sgp_small_multiples_cleanup(plot) } \arguments{ \item{plot}{a ggplot created by sgp_small...
/man/sgp_small_multiples_cleanup.Rd
no_license
almartin82/MAP-visuals
R
false
false
506
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/sgp_small_multiples_cleanup.R \name{sgp_small_multiples_cleanup} \alias{sgp_small_multiples_cleanup} \title{SGP small multiples cleanup} \usage{ sgp_small_multiples_cleanup(plot) } \arguments{ \item{plot}{a ggplot created by sgp_small...
library(unifiedDBI) gen.test.data <- function() { test.dates.POSIXct <- as.POSIXct(seq.POSIXt(as.POSIXct("2000-01-01"),as.POSIXct("2050-01-01"),by="DSTday")) ans.nrow <- length(test.dates.POSIXct) test.dates.POSIXlt <- as.POSIXlt(test.dates.POSIXct) test.double <- rnorm(ans.nrow) test.int <- as.integer(test...
/tests/simple.unifiedDBI.test.r
no_license
johnlaing/unifieddbi
R
false
false
1,921
r
library(unifiedDBI) gen.test.data <- function() { test.dates.POSIXct <- as.POSIXct(seq.POSIXt(as.POSIXct("2000-01-01"),as.POSIXct("2050-01-01"),by="DSTday")) ans.nrow <- length(test.dates.POSIXct) test.dates.POSIXlt <- as.POSIXlt(test.dates.POSIXct) test.double <- rnorm(ans.nrow) test.int <- as.integer(test...
\name{panelView-package} \alias{panelView-package} \docType{package} \title{Panel Data Visualizations} \description{Visualizes panel data with (dichotomous) treatments} \details{ panelView has two main functionalities: (1) it visualizes the treatment and missing-value statuses of each observation in a panel/time-ser...
/man/panelView-package.Rd
no_license
JiaziChen111/panelView
R
false
false
692
rd
\name{panelView-package} \alias{panelView-package} \docType{package} \title{Panel Data Visualizations} \description{Visualizes panel data with (dichotomous) treatments} \details{ panelView has two main functionalities: (1) it visualizes the treatment and missing-value statuses of each observation in a panel/time-ser...
# Launch script that is basis for creating each individual launch script #library(L1pack) library(L1pack, lib = "~/R/x86_64-redhat-linux-gnu-library/3.3/") load("X.RData") load("WLlist_fullLen.RData") load("noise.RData") load("true-table.RData") load("epsMod.RData") # set object WLidx with vector from if(FALSE){ W...
/tests/sim/20221105-sim/launch-script.R
no_license
jlivsey/Dvar
R
false
false
1,302
r
# Launch script that is basis for creating each individual launch script #library(L1pack) library(L1pack, lib = "~/R/x86_64-redhat-linux-gnu-library/3.3/") load("X.RData") load("WLlist_fullLen.RData") load("noise.RData") load("true-table.RData") load("epsMod.RData") # set object WLidx with vector from if(FALSE){ W...
#' Huxtable: simply create LaTeX and HTML tables #' #' Huxtable is a package for creating HTML and LaTeX tables. It provides similar #' functionality to xtable, with a simpler interface. #' #' @details #' #' To create a huxtable object, use \code{\link{huxtable}} or \code{\link{as_huxtable}}. #' #' For more informatio...
/R/huxtable.R
no_license
applied-statistic-using-r/huxtable
R
false
false
18,377
r
#' Huxtable: simply create LaTeX and HTML tables #' #' Huxtable is a package for creating HTML and LaTeX tables. It provides similar #' functionality to xtable, with a simpler interface. #' #' @details #' #' To create a huxtable object, use \code{\link{huxtable}} or \code{\link{as_huxtable}}. #' #' For more informatio...
#################################################### ## Title: Spatial-temporal kriging for SST data ## Date: 22 October 2019 ## Author: Andrew Zammit-Mangion #################################################### library("dplyr") library("ggplot2") library("tensorflow") library("tidyr") library("R.utils") sourceDirecto...
/4_Analyse_Data_Other/4_2_spatiotemporal_kriging_SST.R
no_license
rishirelan/deepIDE
R
false
false
5,349
r
#################################################### ## Title: Spatial-temporal kriging for SST data ## Date: 22 October 2019 ## Author: Andrew Zammit-Mangion #################################################### library("dplyr") library("ggplot2") library("tensorflow") library("tidyr") library("R.utils") sourceDirecto...
# clear memory rm(list=ls()) gc() # required packages library(lfe) library(ggplot2) library(Cairo) library(stringr) # inputs ---------------------------------------------------------------------- AD.p <- "data/accidents/accidents.rds" VI.p <- "data/accidents/victims_cost.rds" VE.p <- "data/accidents/vehicles_cost.rds...
/appendix/figures/F2_tickets_distributive/tickets_distributive.R
permissive
uiuc-bdeep/speed_change
R
false
false
12,424
r
# clear memory rm(list=ls()) gc() # required packages library(lfe) library(ggplot2) library(Cairo) library(stringr) # inputs ---------------------------------------------------------------------- AD.p <- "data/accidents/accidents.rds" VI.p <- "data/accidents/victims_cost.rds" VE.p <- "data/accidents/vehicles_cost.rds...
##install.packages("sqldf") require(sqldf) file<-c("~/Exploratory/household_power_consumption.txt") data<-read.csv.sql(file,sql="select * from file where (Date=='1/2/2007' OR Date=='2/2/2007')",sep=";") data[["Date"]]<- strptime(paste(data[["Date"]],data[["Time"]]),format="%d/%m/%Y %X") ...
/plot4.R
no_license
dakshsingh/ExData_Plotting1
R
false
false
1,079
r
##install.packages("sqldf") require(sqldf) file<-c("~/Exploratory/household_power_consumption.txt") data<-read.csv.sql(file,sql="select * from file where (Date=='1/2/2007' OR Date=='2/2/2007')",sep=";") data[["Date"]]<- strptime(paste(data[["Date"]],data[["Time"]]),format="%d/%m/%Y %X") ...
/* Apparently Firefox ignores the Info.plist file, and looks only in the .rsrc file within the bundle, which is compiled from the following source file. */ #include <Carbon/Carbon.r> resource 'STR#' (126) { { "Runs 3-D games and interactive applets", "Panda3D Game Engine Plug-In" } }; resource 'STR...
/direct/src/plugin_npapi/nppanda3d.r
permissive
ArsThaumaturgis/panda3d
R
false
false
421
r
/* Apparently Firefox ignores the Info.plist file, and looks only in the .rsrc file within the bundle, which is compiled from the following source file. */ #include <Carbon/Carbon.r> resource 'STR#' (126) { { "Runs 3-D games and interactive applets", "Panda3D Game Engine Plug-In" } }; resource 'STR...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/oulad.R \docType{data} \name{student} \alias{student} \title{Student data from OULAD dataset} \format{A data frame with 32593 rows and 12 variables: \describe{ \item{code_module}{Name of course, for which student registered} \item{code_pr...
/man/student.Rd
no_license
Joshuahii0521/oulad-1
R
false
true
2,630
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/oulad.R \docType{data} \name{student} \alias{student} \title{Student data from OULAD dataset} \format{A data frame with 32593 rows and 12 variables: \describe{ \item{code_module}{Name of course, for which student registered} \item{code_pr...
\name{Unif} \alias{Unif} \title{ Uniform Random Distribution } \description{ Generates uniformly distributed random parameter sets. } \usage{ Unif(parRange, num) } \arguments{ \item{parRange }{the range (min, max) of the parameters, a matrix or a data.frame with one row for each parameter, and two columns ...
/man/Unif.Rd
no_license
cran/FME
R
false
false
1,502
rd
\name{Unif} \alias{Unif} \title{ Uniform Random Distribution } \description{ Generates uniformly distributed random parameter sets. } \usage{ Unif(parRange, num) } \arguments{ \item{parRange }{the range (min, max) of the parameters, a matrix or a data.frame with one row for each parameter, and two columns ...
library(tidyverse) library(lubridate) library(gganimate) library(scales) library(RColorBrewer) library(ggstance) library(ggtext) library(extrafont) grosses <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-04-28/grosses.csv') cpi <- readr::read_csv('https://raw.gi...
/2020/week18_broadway/broadway.R
no_license
AmitLevinson/TidyTuesday
R
false
false
4,805
r
library(tidyverse) library(lubridate) library(gganimate) library(scales) library(RColorBrewer) library(ggstance) library(ggtext) library(extrafont) grosses <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-04-28/grosses.csv') cpi <- readr::read_csv('https://raw.gi...
\name{driftBursts} \alias{driftBursts} \title{ Drift Bursts } \description{ Calculates the Test-Statistic for the Drift Burst Hypothesis. } \usage{ driftBursts(timestamps = NULL, logPrices, testTimes = seq(34260, 57600, 60), preAverage = 5, ACLag = -1L, meanBandwidth = ...
/DriftBurstHypothesis/man/driftBursts.Rd
no_license
akhikolla/InformationHouse
R
false
false
8,665
rd
\name{driftBursts} \alias{driftBursts} \title{ Drift Bursts } \description{ Calculates the Test-Statistic for the Drift Burst Hypothesis. } \usage{ driftBursts(timestamps = NULL, logPrices, testTimes = seq(34260, 57600, 60), preAverage = 5, ACLag = -1L, meanBandwidth = ...
##################Project Feature Selection########################### #Check/Import Libraries function DLP() GEOdata<-NULL #Downloads "GDSXXXX" and saves it in a global variable GEOdata GEOdata <- GDSdownload("GDS4057") #converting GDS to express set eset<-GDS2eSet(GEOdata,do.log2=TRUE) #we take only the sample...
/FinalProject.R
no_license
MrSud0/Project-FeatureSelection
R
false
false
3,747
r
##################Project Feature Selection########################### #Check/Import Libraries function DLP() GEOdata<-NULL #Downloads "GDSXXXX" and saves it in a global variable GEOdata GEOdata <- GDSdownload("GDS4057") #converting GDS to express set eset<-GDS2eSet(GEOdata,do.log2=TRUE) #we take only the sample...
/libc/stdio/setvbuf/modif.r
no_license
paulohrpinheiro/tropix-libs
R
false
false
578
r
#' GitHub API #' #' Minimal wrapper to access GitHub's API. #' #' @docType package #' @name gh "_PACKAGE" #' Query the GitHub API #' #' This is an extremely minimal client. You need to know the API #' to be able to use this client. All this function does is: #' * Try to substitute each listed parameter into `endpoint...
/R/package.R
permissive
smallperks/gh
R
false
false
7,477
r
#' GitHub API #' #' Minimal wrapper to access GitHub's API. #' #' @docType package #' @name gh "_PACKAGE" #' Query the GitHub API #' #' This is an extremely minimal client. You need to know the API #' to be able to use this client. All this function does is: #' * Try to substitute each listed parameter into `endpoint...
# Function(s) to perform the clustering over the samples # get_p_clust <- function(family_kl, mu, dis, nc=10, wobs=rep(1,dim(mu)[1]), wsample=rep(1,dim(mu)[2]), cl = NULL) { # cluster the samples in the latent space if no clustering provided if (is.null(cl)) { f <- family_kl$linkfun(mu) ou...
/R/clust.R
no_license
bgoodri/glmproj
R
false
false
2,084
r
# Function(s) to perform the clustering over the samples # get_p_clust <- function(family_kl, mu, dis, nc=10, wobs=rep(1,dim(mu)[1]), wsample=rep(1,dim(mu)[2]), cl = NULL) { # cluster the samples in the latent space if no clustering provided if (is.null(cl)) { f <- family_kl$linkfun(mu) ou...
%% %% WARNING! DO NOT EDIT! %% This file is automatically generated from set.default.arguments.R %% \name{control.family} \alias{control.family} \alias{inla.control.family} \alias{inla.set.control.family.default} \alias{set.control.family.default} \alias{control.family.default} \title{Control variables in control.famil...
/man/control.family.Rd
no_license
inbo/INLA
R
false
false
2,721
rd
%% %% WARNING! DO NOT EDIT! %% This file is automatically generated from set.default.arguments.R %% \name{control.family} \alias{control.family} \alias{inla.control.family} \alias{inla.set.control.family.default} \alias{set.control.family.default} \alias{control.family.default} \title{Control variables in control.famil...
################################################################ # udpipe-nlp-workflow - Group Assignment # # # # Group Members: # # Kiran Mahesh ND (11810010) ...
/server.R
no_license
kiranmahesh1/udpipe-nlp-workflow
R
false
false
2,998
r
################################################################ # udpipe-nlp-workflow - Group Assignment # # # # Group Members: # # Kiran Mahesh ND (11810010) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{stocks} \alias{stocks} \title{Stock data for three companies} \description{ A dataset containing stock prices for Amazon (AMZN), Microsoft (MSFT) and Apple (AAPL) for the period August 30st 2018 to August 30th 2019...
/man/stocks.Rd
no_license
jfontestad/rowpatternmatcher
R
false
true
802
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{stocks} \alias{stocks} \title{Stock data for three companies} \description{ A dataset containing stock prices for Amazon (AMZN), Microsoft (MSFT) and Apple (AAPL) for the period August 30st 2018 to August 30th 2019...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/VEMalgorithm.R \name{getBestQ} \alias{getBestQ} \title{optimal number of SBM blocks} \usage{ getBestQ(bestSolutionAtQ) } \arguments{ \item{bestSolutionAtQ}{output of \code{fitNSBM()}, i.e. a list of estimation results for varying number of la...
/man/getBestQ.Rd
no_license
cran/noisySBM
R
false
true
618
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/VEMalgorithm.R \name{getBestQ} \alias{getBestQ} \title{optimal number of SBM blocks} \usage{ getBestQ(bestSolutionAtQ) } \arguments{ \item{bestSolutionAtQ}{output of \code{fitNSBM()}, i.e. a list of estimation results for varying number of la...
testlist <- list(x = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), y = integer(0)) result <- do.call(diffrprojects:::dist_mat_absolute,testlist) str(result)
/diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609961719-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
190
r
testlist <- list(x = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), y = integer(0)) result <- do.call(diffrprojects:::dist_mat_absolute,testlist) str(result)
#Clear Yer Stuff rm(list=ls()) #Load Data TotalData<- read.csv("~/GitHub/Dal-Intertidal-2014/Intertidal_Master_Data_Sheet_2014.csv") ######### Make new data set with only salinities and abundances######### #Gives Salinities at high tide unique(TotalData$Salinity[TotalData$Strata=="H"]) #Bind salinity and abundance ...
/Team B Code/Salinity vs abundance species R codes/SalinityVsAbundance pc_Fucus_spiralis.R
permissive
ohara-patrick/Dal-Intertidal-2014
R
false
false
1,601
r
#Clear Yer Stuff rm(list=ls()) #Load Data TotalData<- read.csv("~/GitHub/Dal-Intertidal-2014/Intertidal_Master_Data_Sheet_2014.csv") ######### Make new data set with only salinities and abundances######### #Gives Salinities at high tide unique(TotalData$Salinity[TotalData$Strata=="H"]) #Bind salinity and abundance ...
library("data.table") library("ggplot2") setwd("C:/Users/tongo/Documents/R/John_Hopkins_assignment/4_Exploratory_Analysis/Project2") unzip(zipfile = "dataFiles.zip") # Load the NEI & SCC data frames. NEI <- data.table::as.data.table(x = readRDS("summarySCC_PM25.rds")) SCC <- data.table::as.data.table(x = ...
/4_Exploratory_Analysis/Project2/plot5.R
no_license
djtongol/JohnHopkins_Assignment4
R
false
false
1,020
r
library("data.table") library("ggplot2") setwd("C:/Users/tongo/Documents/R/John_Hopkins_assignment/4_Exploratory_Analysis/Project2") unzip(zipfile = "dataFiles.zip") # Load the NEI & SCC data frames. NEI <- data.table::as.data.table(x = readRDS("summarySCC_PM25.rds")) SCC <- data.table::as.data.table(x = ...
OGS.sump<-function(X,Y){ #requireNamespace("inflasso","metap") library("inflasso") library("metap") X<-as.matrix(X) Y<-as.matrix(Y) res1 <- df.model(X,Y) res1<-as.vector(res1) res1<-2*(1-pnorm(abs(res1))) res2 <- df.regpath(X,Y) res2<-as.vector(res2) res2<-2*(1-pnorm(abs(res2))) res3 <- df.cv...
/R/sump.R
no_license
BudhlakotiN/OGS
R
false
false
687
r
OGS.sump<-function(X,Y){ #requireNamespace("inflasso","metap") library("inflasso") library("metap") X<-as.matrix(X) Y<-as.matrix(Y) res1 <- df.model(X,Y) res1<-as.vector(res1) res1<-2*(1-pnorm(abs(res1))) res2 <- df.regpath(X,Y) res2<-as.vector(res2) res2<-2*(1-pnorm(abs(res2))) res3 <- df.cv...
# TidyTuesday Week 12: Video Games + Sliced # Challenge found at https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-03-16/readme.md library(tidyverse) library(wordcloud) library(wordcloud2) library(stringi) library(scales) # Get the data games <- readr::read_csv('https://raw.githubusercontent....
/Week12/week12.R
no_license
KCtt457/tidytuesday-challenges
R
false
false
3,334
r
# TidyTuesday Week 12: Video Games + Sliced # Challenge found at https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-03-16/readme.md library(tidyverse) library(wordcloud) library(wordcloud2) library(stringi) library(scales) # Get the data games <- readr::read_csv('https://raw.githubusercontent....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calibration.R \name{calibrate_telematics} \alias{calibrate_telematics} \title{Calibarate telematics data} \usage{ calibrate_telematics(file_path, sync_time = NULL) } \arguments{ \item{file_path}{file path of telematics data} \item{sync_time}...
/man/calibrate_telematics.Rd
permissive
issactoast/ikhyd
R
false
true
441
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calibration.R \name{calibrate_telematics} \alias{calibrate_telematics} \title{Calibarate telematics data} \usage{ calibrate_telematics(file_path, sync_time = NULL) } \arguments{ \item{file_path}{file path of telematics data} \item{sync_time}...
scaleBar <- function(lon, lat, distanceLon, distanceLat, distanceLegend, distanceUnit, dist.unit = "km", rec.fill = "white", rec.colour = "black", rec2.fill = "black", rec2.colour = "black", legend.colour = "black", legend.size = 3, orientation = TRUE, arrow.length = 500, arrow.distance = 300, arrow.colour = "black", a...
/folders/anRpackage/R/scaleBar.R
permissive
bwtian/Rtemplate
R
false
false
2,159
r
scaleBar <- function(lon, lat, distanceLon, distanceLat, distanceLegend, distanceUnit, dist.unit = "km", rec.fill = "white", rec.colour = "black", rec2.fill = "black", rec2.colour = "black", legend.colour = "black", legend.size = 3, orientation = TRUE, arrow.length = 500, arrow.distance = 300, arrow.colour = "black", a...
runPermut <- function(data, addit=FALSE, covariable=NULL, family=binomial) { TraitR <- sample(data[,1]) dataR <- data.frame(TraitR, data[,2:ncol(data)]) return(runPvalues(dataR, addit, covariable, family)) }
/globalGSA/R/runPermut.R
no_license
ingted/R-Examples
R
false
false
226
r
runPermut <- function(data, addit=FALSE, covariable=NULL, family=binomial) { TraitR <- sample(data[,1]) dataR <- data.frame(TraitR, data[,2:ncol(data)]) return(runPvalues(dataR, addit, covariable, family)) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/timewriter.R \name{timewriter} \alias{timewriter} \title{Time protocol writer} \usage{ timewriter(lit, prot, sec3 = 0) } \arguments{ \item{lit}{a boolean or 0-1 integer vector indicating frames with lights on or off} \item{prot}{a list of pr...
/man/timewriter.Rd
no_license
PaolaCognigni/CTraxHelper
R
false
true
1,639
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/timewriter.R \name{timewriter} \alias{timewriter} \title{Time protocol writer} \usage{ timewriter(lit, prot, sec3 = 0) } \arguments{ \item{lit}{a boolean or 0-1 integer vector indicating frames with lights on or off} \item{prot}{a list of pr...
#integrate seurat object는 99서버에서만 기능함.(batcholer가 99에만 정상적으로 설치됨) library(Seurat) library(SeuratWrappers) library(cowplot) library(dplyr) library(ggplot2) #################################################################### sample2_H_Epi.data <- Read10X(data.dir = "/node210data/project/mouse_NK_cell/cellranger_out/2-...
/integrate_fixed.R
no_license
Moonju411/Nkcell_mouse
R
false
false
5,309
r
#integrate seurat object는 99서버에서만 기능함.(batcholer가 99에만 정상적으로 설치됨) library(Seurat) library(SeuratWrappers) library(cowplot) library(dplyr) library(ggplot2) #################################################################### sample2_H_Epi.data <- Read10X(data.dir = "/node210data/project/mouse_NK_cell/cellranger_out/2-...
\name{Ramaswamy2001} \docType{data} \alias{Ramaswamy2001} \title{Multiclass cancer prediction involving 14 tumor types} \description{ The optimal treatment of cancer patients depends on establishing accurate diagnoses using clinical and histopathologic data. In some instances, particularly involving metastatic tumors,...
/man/Ramaswamy2001.Rd
no_license
pbreheny/hdrm
R
false
false
1,846
rd
\name{Ramaswamy2001} \docType{data} \alias{Ramaswamy2001} \title{Multiclass cancer prediction involving 14 tumor types} \description{ The optimal treatment of cancer patients depends on establishing accurate diagnoses using clinical and histopathologic data. In some instances, particularly involving metastatic tumors,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/util.R \name{week_to_maxdate} \alias{week_to_maxdate} \title{Week of year to date conversion} \usage{ week_to_maxdate(year, week) } \arguments{ \item{week}{a number between 1 and 53} } \value{ date } \description{ Convert a week of year strin...
/man/week_to_maxdate.Rd
no_license
annecori/mRIIDSprocessData
R
false
true
690
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/util.R \name{week_to_maxdate} \alias{week_to_maxdate} \title{Week of year to date conversion} \usage{ week_to_maxdate(year, week) } \arguments{ \item{week}{a number between 1 and 53} } \value{ date } \description{ Convert a week of year strin...
# Workspace setup ------------------------------------------------------------------------------------- # Check for installed packages and install missing ones packagesToLoad <- c("raster", "rsyncrosim", "dplyr") # Identify packages that are not already installed packagesToInstall <- packagesToLoad[!(packagesToLoad %in...
/src/circcon.R
permissive
ApexRMS/stconnect
R
false
false
12,057
r
# Workspace setup ------------------------------------------------------------------------------------- # Check for installed packages and install missing ones packagesToLoad <- c("raster", "rsyncrosim", "dplyr") # Identify packages that are not already installed packagesToInstall <- packagesToLoad[!(packagesToLoad %in...
# Packages #install.packages(c('xgboost','magrittr','dplyr','Matrix','ROSE')) #install.packages(c('lattice','ggplot2','caret','car')) library(xgboost) library(magrittr) library(dplyr) library(Matrix) library(ROSE) library(lattice) library(ggplot2) library(caret) library(car) library(e1071) #install.pac...
/final_xgb_over.R
no_license
akshit113/Capstone-Project
R
false
false
4,509
r
# Packages #install.packages(c('xgboost','magrittr','dplyr','Matrix','ROSE')) #install.packages(c('lattice','ggplot2','caret','car')) library(xgboost) library(magrittr) library(dplyr) library(Matrix) library(ROSE) library(lattice) library(ggplot2) library(caret) library(car) library(e1071) #install.pac...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/process.R \name{process} \alias{process} \alias{process.character} \alias{process.unzip} \title{Process raw or intermediate data products into intermediate or final data products} \usage{ process(viz) \method{process}{character}(viz) \metho...
/man/process.Rd
permissive
USGS-VIZLAB/vizlab
R
false
true
573
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/process.R \name{process} \alias{process} \alias{process.character} \alias{process.unzip} \title{Process raw or intermediate data products into intermediate or final data products} \usage{ process(viz) \method{process}{character}(viz) \metho...
# Functions for plotting networks with respect to binary phenotype # Function to create igraph object for case/control create_cc_igraph = function(w.adj0, w.adj1, col, lay=NULL, ...) { require(igraph) palette = categorical_pal(max(col)) control_graph = graph.adjacency(w.adj0, mode="undirected", weighted=T...
/plot_networks.R
no_license
kevinmcgregor/crohns_analysis
R
false
false
4,434
r
# Functions for plotting networks with respect to binary phenotype # Function to create igraph object for case/control create_cc_igraph = function(w.adj0, w.adj1, col, lay=NULL, ...) { require(igraph) palette = categorical_pal(max(col)) control_graph = graph.adjacency(w.adj0, mode="undirected", weighted=T...
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170334e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613114250-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
251
r
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170334e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
##import data mydata <- read.delim2("household_power_consumption.txt", header=TRUE, sep=";", dec=".", na.strings="?") ##convert Date to appropriate format mydata$Date <- as.Date(mydata$Date, "%d/%m/%Y") ##subset data mydata1 <- subset(mydata,Date >= '2007-02-01' & Date <= '2007-02-02') ##convert factor variable to ...
/plot3.R
no_license
ananyanaithani/datasciencecoursera
R
false
false
814
r
##import data mydata <- read.delim2("household_power_consumption.txt", header=TRUE, sep=";", dec=".", na.strings="?") ##convert Date to appropriate format mydata$Date <- as.Date(mydata$Date, "%d/%m/%Y") ##subset data mydata1 <- subset(mydata,Date >= '2007-02-01' & Date <= '2007-02-02') ##convert factor variable to ...
#' Calculates Covariates for EQPos and Risk Redux Calcs #' #'@param cov Covariance matrix from which covariates will be derived. #'@param spread Spread for which to get covariates. #'@param raw Optional parameter to return raw covarinputs for contracts with an non-one front beta. #' #'@author Nicholas Dregne #' #'@expo...
/R/CalcCovarInfo.R
no_license
helenristov/aCompiler
R
false
false
1,034
r
#' Calculates Covariates for EQPos and Risk Redux Calcs #' #'@param cov Covariance matrix from which covariates will be derived. #'@param spread Spread for which to get covariates. #'@param raw Optional parameter to return raw covarinputs for contracts with an non-one front beta. #' #'@author Nicholas Dregne #' #'@expo...
# sf::st_crs(3156) convert2utm <- function(df, coords = c("X", "Y"), out_crs = 3156) { x <- sf::st_as_sf(df, coords = coords, crs = 4326 ) %>% sf::st_transform(crs = out_crs) %>% sf::st_coordinates() %>% as.data.frame() x$X <- x$X / 100000 x$Y <- x$Y / 100000 dplyr::bind_cols(x, df[, which...
/analysis-survey/utils.R
no_license
pbs-assess/yelloweye-inside
R
false
false
1,284
r
# sf::st_crs(3156) convert2utm <- function(df, coords = c("X", "Y"), out_crs = 3156) { x <- sf::st_as_sf(df, coords = coords, crs = 4326 ) %>% sf::st_transform(crs = out_crs) %>% sf::st_coordinates() %>% as.data.frame() x$X <- x$X / 100000 x$Y <- x$Y / 100000 dplyr::bind_cols(x, df[, which...
countries <- as.data.frame(stringsAsFactors=FALSE, matrix(c( 1,"USA", 2,"UK", 3,"Russia" ), ncol=2, byrow=TRUE, dimnames=list(NULL, c("id","country")) ))
/data/countries.r
no_license
dkneis/tabular
R
false
false
164
r
countries <- as.data.frame(stringsAsFactors=FALSE, matrix(c( 1,"USA", 2,"UK", 3,"Russia" ), ncol=2, byrow=TRUE, dimnames=list(NULL, c("id","country")) ))
library(dplyr) library(tidyr) library(magrittr) library(ggplot2) library(stringr) setwd("/Users/sanjavickovic/Desktop/morphoSPOT/3dst_repo/3dst/go_analysis") merge.means.pvals <- function(f1, f2) { means <- read.table(file = f1, sep = "\t", header = TRUE) pvals <- read.table(file = f2, sep = "\t", header = TRUE) ...
/LR_analysis/cellphonedb.R
permissive
mssanjavickovic/3dst
R
false
false
3,268
r
library(dplyr) library(tidyr) library(magrittr) library(ggplot2) library(stringr) setwd("/Users/sanjavickovic/Desktop/morphoSPOT/3dst_repo/3dst/go_analysis") merge.means.pvals <- function(f1, f2) { means <- read.table(file = f1, sep = "\t", header = TRUE) pvals <- read.table(file = f2, sep = "\t", header = TRUE) ...
#' launches the shinyAppDemo app #' #' @export launchApp #' #' @return shiny application object #' # wrapper for shiny::shinyApp() launchApp <- function() { shinyApp(ui = shinyAppUi, server = shinyAppServer) }
/R/launchApp.R
no_license
gu-lab20/RNAseqCNV
R
false
false
214
r
#' launches the shinyAppDemo app #' #' @export launchApp #' #' @return shiny application object #' # wrapper for shiny::shinyApp() launchApp <- function() { shinyApp(ui = shinyAppUi, server = shinyAppServer) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/handlers.R \name{coef.straussR} \alias{coef.straussR} \title{Extract parameter estimates from a \code{straussR} object.} \usage{ \method{coef}{straussR}(object, summary = mean, show_effects = FALSE, unlist = TRUE) } \arguments{ \item{object...
/man/coef.straussR.Rd
permissive
JonasMoss/straussR
R
false
true
729
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/handlers.R \name{coef.straussR} \alias{coef.straussR} \title{Extract parameter estimates from a \code{straussR} object.} \usage{ \method{coef}{straussR}(object, summary = mean, show_effects = FALSE, unlist = TRUE) } \arguments{ \item{object...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/binomial_test.R \name{binomial_test} \alias{binomial_test} \title{Binomial significance test for ecological niche models.} \usage{ binomial_test(binary_model, validation_data) } \arguments{ \item{binary_model}{A binary prediction map of the g...
/man/binomial_test.Rd
no_license
luismurao/ntbox
R
false
true
2,143
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/binomial_test.R \name{binomial_test} \alias{binomial_test} \title{Binomial significance test for ecological niche models.} \usage{ binomial_test(binary_model, validation_data) } \arguments{ \item{binary_model}{A binary prediction map of the g...
#' Parallel execution. #' #' @export #' @importFrom parallel detectCores makeCluster stopCluster #' @importFrom parallel clusterExport clusterCall clusterSetRNGStream parLapply do.parallel <- function( FUN, x, # List or vector, analogous to the first argument to # 'lapply'. Each element of 'x' i...
/hooah/R/do.parallel.R
no_license
zpz/utilities.R
R
false
false
4,176
r
#' Parallel execution. #' #' @export #' @importFrom parallel detectCores makeCluster stopCluster #' @importFrom parallel clusterExport clusterCall clusterSetRNGStream parLapply do.parallel <- function( FUN, x, # List or vector, analogous to the first argument to # 'lapply'. Each element of 'x' i...
qry_fields <- function(con, from) { names(qry_fetch(con, paste0("SELECT TOP 0 * FROM ", from), 0L)) } table_fields <- function(con, table) { qry_fields(con, as.character(table)) } qry_fetch <- function(con, sql, n = -1L, show = getOption("dplyr.show_sql"), ...
/R/dbi-s3.R
no_license
agstudy/dplyr.sqlserver
R
false
false
2,040
r
qry_fields <- function(con, from) { names(qry_fetch(con, paste0("SELECT TOP 0 * FROM ", from), 0L)) } table_fields <- function(con, table) { qry_fields(con, as.character(table)) } qry_fetch <- function(con, sql, n = -1L, show = getOption("dplyr.show_sql"), ...
#' Data set on norovirus gastroenteritis in Bremen and Lower Saxony #' #' Case counts of norovirus gastroenteritis in the German states of Bremen and Lower Saxony, 2011-2017; stored as an sts object #' #' @name noroBL #' @docType data #' @author Johannes Bracher #' @source Surveillance counts retrieved from SurvStat@RK...
/R/auxiliary_functions.R
no_license
jbracher/hhh4addon
R
false
false
3,981
r
#' Data set on norovirus gastroenteritis in Bremen and Lower Saxony #' #' Case counts of norovirus gastroenteritis in the German states of Bremen and Lower Saxony, 2011-2017; stored as an sts object #' #' @name noroBL #' @docType data #' @author Johannes Bracher #' @source Surveillance counts retrieved from SurvStat@RK...
# source('functions.R') # # # model.tree = function(train, test, label, alpha=0.05, nFolds=5) { # cat('--------------- model tree -----------------\n') # col.names = colnames(train) # vars = col.names[! col.names %in% label] # # tree = data.frame(node=integer(0), # var=characte...
/modelTree_prediction2split.R
no_license
masais1205/CausalModelTree---R
R
false
false
5,557
r
# source('functions.R') # # # model.tree = function(train, test, label, alpha=0.05, nFolds=5) { # cat('--------------- model tree -----------------\n') # col.names = colnames(train) # vars = col.names[! col.names %in% label] # # tree = data.frame(node=integer(0), # var=characte...
############################################################################## # ui.R ############################################################################## library(shiny) library(shinydashboard) library(ShinyRatingInput) library(shinyjs) source('functions/helpers.R') shinyUI( dashboardPage( skin...
/ui.R
no_license
dubbs1515/PSL_Final
R
false
false
4,266
r
############################################################################## # ui.R ############################################################################## library(shiny) library(shinydashboard) library(ShinyRatingInput) library(shinyjs) source('functions/helpers.R') shinyUI( dashboardPage( skin...
#!/usr/bin/env Rscript #usage: Rscript --vanilla runVirFinder.R SRR5383888.fa 0.95 args = commandArgs(trailingOnly=TRUE) #args[1] should contain path points to the fasta file #args[2] is the significance cutoff library("tidyverse") library(VirFinder) # fasta.inputfile ="data/SRR5383888.fa" # threshold=0.95 fasta.in...
/runVirFinder.R
permissive
aningvi/VirusAlert
R
false
false
757
r
#!/usr/bin/env Rscript #usage: Rscript --vanilla runVirFinder.R SRR5383888.fa 0.95 args = commandArgs(trailingOnly=TRUE) #args[1] should contain path points to the fasta file #args[2] is the significance cutoff library("tidyverse") library(VirFinder) # fasta.inputfile ="data/SRR5383888.fa" # threshold=0.95 fasta.in...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Generic.R, R/Methods.R \docType{methods} \name{Overlap} \alias{Overlap} \alias{Overlap,OverLap,Clustering,Clustering-method} \alias{OverLap,} \alias{Clustering,} \alias{Clustering-method} \alias{Overlap,OverLap,ANY,ANY-method} \alias{OverLap,...
/man/Overlap-methods.Rd
no_license
cran/clusTransition
R
false
true
1,249
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Generic.R, R/Methods.R \docType{methods} \name{Overlap} \alias{Overlap} \alias{Overlap,OverLap,Clustering,Clustering-method} \alias{OverLap,} \alias{Clustering,} \alias{Clustering-method} \alias{Overlap,OverLap,ANY,ANY-method} \alias{OverLap,...
## Here are two functions defined. ## The first one creates a list a functions from a matrix. ## The second one computes the inverse of a mtrix if it has not been ## computed previously. ## This function takes a matrix and create a list of 4 functions. ## get function returns the matrix. ## set enables to assign a...
/cachematrix.R
no_license
SantiagoBiec/ProgrammingAssignment2
R
false
false
1,395
r
## Here are two functions defined. ## The first one creates a list a functions from a matrix. ## The second one computes the inverse of a mtrix if it has not been ## computed previously. ## This function takes a matrix and create a list of 4 functions. ## get function returns the matrix. ## set enables to assign a...
# Twitter Data # Read in the data tweets = read.csv("tweets.csv", stringsAsFactors=FALSE) str(tweets) # Create dependent variable tweets$Negative = as.factor(tweets$Avg <= -1) table(tweets$Negative) # Install new packages install.packages("tm") library(tm) install.packages("SnowballC") library(SnowballC) # ...
/tweets.r
no_license
ShabeerMohammad/Tweets
R
false
false
2,283
r
# Twitter Data # Read in the data tweets = read.csv("tweets.csv", stringsAsFactors=FALSE) str(tweets) # Create dependent variable tweets$Negative = as.factor(tweets$Avg <= -1) table(tweets$Negative) # Install new packages install.packages("tm") library(tm) install.packages("SnowballC") library(SnowballC) # ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/E4.extras.BinTemp.R \name{E4.Temp.part2.bin_temp} \alias{E4.Temp.part2.bin_temp} \title{Temperature part 2: Make temperature bins} \usage{ E4.Temp.part2.bin_temp(participant_list, rdslocation.temp, rdslocation.binnedtemp, BinLengthMin) } \a...
/man/E4.Temp.part2.bin_temp.Rd
no_license
cran/E4tools
R
false
true
1,087
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/E4.extras.BinTemp.R \name{E4.Temp.part2.bin_temp} \alias{E4.Temp.part2.bin_temp} \title{Temperature part 2: Make temperature bins} \usage{ E4.Temp.part2.bin_temp(participant_list, rdslocation.temp, rdslocation.binnedtemp, BinLengthMin) } \a...
####################################################################################################### # Compute WAIC and LOO from output of stan function # # Assumes the out of sample log likelihood is called "log_lik" #############################################################################################...
/waic.R
no_license
equinn1/MTH225_Spring2017
R
false
false
1,590
r
####################################################################################################### # Compute WAIC and LOO from output of stan function # # Assumes the out of sample log likelihood is called "log_lik" #############################################################################################...
\name{plot.stm.addunitcell} \alias{plot.stm.addunitcell} \title{Adds unitcell} \usage{ plot.stm.addunitcell(stm, atomnumber = NULL, col = "black", ...) } \arguments{ \item{stm}{object of class stm} \item{atomnumber}{(optional) number of the atom on which the bottom left corner of the unitcell will be pos...
/Rvasp/man/plot.stm.addunitcell.Rd
permissive
gokhansurucu/Rvasp
R
false
false
483
rd
\name{plot.stm.addunitcell} \alias{plot.stm.addunitcell} \title{Adds unitcell} \usage{ plot.stm.addunitcell(stm, atomnumber = NULL, col = "black", ...) } \arguments{ \item{stm}{object of class stm} \item{atomnumber}{(optional) number of the atom on which the bottom left corner of the unitcell will be pos...
load_difftime.covid19_tbl <- function(x, rows, cols = colnames(x), id_hint = id_vars(x), time_vars = ricu::time_vars(x), ...) { ricu:::warn_dots(...) ricu:::load_mihi(x, {{ rows }}, cols, id_hint, time_vars) } id_win_helper.covid19_env <- function(x) { merge_inter <- function(x, y) { merge(x, y...
/r/load-utils.R
permissive
eth-mds/recoils
R
false
false
930
r
load_difftime.covid19_tbl <- function(x, rows, cols = colnames(x), id_hint = id_vars(x), time_vars = ricu::time_vars(x), ...) { ricu:::warn_dots(...) ricu:::load_mihi(x, {{ rows }}, cols, id_hint, time_vars) } id_win_helper.covid19_env <- function(x) { merge_inter <- function(x, y) { merge(x, y...
test_that("202012272202", { f <- "x" x <- integral(f, bounds = list(x = c(0,1))) y <- 0.5 expect_equal(x$value, y) }) test_that("202012272203", { f <- "x" x <- integral(f, bounds = list(x = c(1,0))) y <- -0.5 expect_equal(x$value, y) }) test_that("202012272204", { f <- function(x) x x <- integral(...
/tests/testthat/test-integral.R
no_license
cran/calculus
R
false
false
11,575
r
test_that("202012272202", { f <- "x" x <- integral(f, bounds = list(x = c(0,1))) y <- 0.5 expect_equal(x$value, y) }) test_that("202012272203", { f <- "x" x <- integral(f, bounds = list(x = c(1,0))) y <- -0.5 expect_equal(x$value, y) }) test_that("202012272204", { f <- function(x) x x <- integral(...
library(pdR) ### Name: SeasComponent ### Title: Generate a data matrix of seasonal components ### Aliases: SeasComponent ### ** Examples data(inf_Q) y=inf_Q[,2] SeasComponent(y,type="dummyCycle") SeasComponent(y,type="trgCycle")
/data/genthat_extracted_code/pdR/examples/SeasComponent.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
236
r
library(pdR) ### Name: SeasComponent ### Title: Generate a data matrix of seasonal components ### Aliases: SeasComponent ### ** Examples data(inf_Q) y=inf_Q[,2] SeasComponent(y,type="dummyCycle") SeasComponent(y,type="trgCycle")
#Set working directory setwd("E:/My Study/Exploratory Data Analysis/Data") #Read 5 rows of Data myTable <- read.table("household_power_consumption.txt", header = TRUE, sep=";", na.strings = "?", nrows = 5) #Create classes so to use them read the whole data faster myClasses <- sapply(myTable, class) #Rea...
/plot2.R
no_license
NTath/ExData_Plotting1
R
false
false
1,129
r
#Set working directory setwd("E:/My Study/Exploratory Data Analysis/Data") #Read 5 rows of Data myTable <- read.table("household_power_consumption.txt", header = TRUE, sep=";", na.strings = "?", nrows = 5) #Create classes so to use them read the whole data faster myClasses <- sapply(myTable, class) #Rea...