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
# Description : Real life example of heuristics about local regression and kernel smoothing # Website : http://freakonometrics.hypotheses.org/9182 toInstall <- c("xml","downloader") if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} lapply(toInstall, library, character.only = TRUE) file =...
/heuristics-regression-kernel-smoothing-real-life-ex.R
no_license
vikasgupta1812/rsnippets
R
false
false
1,365
r
# Description : Real life example of heuristics about local regression and kernel smoothing # Website : http://freakonometrics.hypotheses.org/9182 toInstall <- c("xml","downloader") if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} lapply(toInstall, library, character.only = TRUE) file =...
\name{AAMetric} \Rdversion{1.1} \alias{AAMetric} \docType{data} \title{ Amino Acid Metric Solution using R (Atchley et al 2005) } \description{ Atchley et al 2005 performed factor analysis on a set of Amino Acid Indices (AA54) and inferred a 5 factor latent variable structure relating amino acid characteristic...
/man/AAMetric.Rd
no_license
cran/HDMD
R
false
false
2,017
rd
\name{AAMetric} \Rdversion{1.1} \alias{AAMetric} \docType{data} \title{ Amino Acid Metric Solution using R (Atchley et al 2005) } \description{ Atchley et al 2005 performed factor analysis on a set of Amino Acid Indices (AA54) and inferred a 5 factor latent variable structure relating amino acid characteristic...
`HDGENE.QQ` <- function(P.values, plot.type = "log_P_values", name.of.trait = "Trait",DPP=50000,plot.style="rainbow"){ #Object: Make a QQ-Plot of the P-values #Options for plot.type = "log_P_values" and "P_values" #Output: A pdf of the QQ-plot #Authors: Alex Lipka and Zhiwu Zhang # Last update: May ...
/R/HDGENE.QQ.R
no_license
YaoZhou89/HDGENE
R
false
false
3,813
r
`HDGENE.QQ` <- function(P.values, plot.type = "log_P_values", name.of.trait = "Trait",DPP=50000,plot.style="rainbow"){ #Object: Make a QQ-Plot of the P-values #Options for plot.type = "log_P_values" and "P_values" #Output: A pdf of the QQ-plot #Authors: Alex Lipka and Zhiwu Zhang # Last update: May ...
# AUTO GENERATED FILE - DO NOT EDIT htmlDialog <- function(children=NULL, id=NULL, n_clicks=NULL, n_clicks_timestamp=NULL, key=NULL, role=NULL, accessKey=NULL, className=NULL, contentEditable=NULL, contextMenu=NULL, dir=NULL, draggable=NULL, hidden=NULL, lang=NULL, spellCheck=NULL, style=NULL, tabIndex=NULL, title=NUL...
/R/htmlDialog.R
permissive
TannerSorensen/dash-html-components
R
false
false
1,320
r
# AUTO GENERATED FILE - DO NOT EDIT htmlDialog <- function(children=NULL, id=NULL, n_clicks=NULL, n_clicks_timestamp=NULL, key=NULL, role=NULL, accessKey=NULL, className=NULL, contentEditable=NULL, contextMenu=NULL, dir=NULL, draggable=NULL, hidden=NULL, lang=NULL, spellCheck=NULL, style=NULL, tabIndex=NULL, title=NUL...
# # Linux-logistic-fut.R, 23 Dec 15 # Data from: # The {Linux} Kernel as a Case Study in Software Evolution # Ayelet Israeli and Dror G. Feitelson # # Example from: # Empirical Software Engineering using R # Derek M. Jones source("ESEUR_config.r") pal_col=rainbow(4) ll=read.csv(paste0(ESEUR_dir, "regression/Linux-L...
/regression/linux-logistic-fut.R
no_license
gopinathsubbegowda/ESEUR-code-data
R
false
false
1,770
r
# # Linux-logistic-fut.R, 23 Dec 15 # Data from: # The {Linux} Kernel as a Case Study in Software Evolution # Ayelet Israeli and Dror G. Feitelson # # Example from: # Empirical Software Engineering using R # Derek M. Jones source("ESEUR_config.r") pal_col=rainbow(4) ll=read.csv(paste0(ESEUR_dir, "regression/Linux-L...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/taxmap--internal.R \name{print_item} \alias{print_item} \title{Print a table} \usage{ print_item(data, name = NULL, max_rows = 3, max_items = 3, max_width = getOption("width") - 10, prefix = "") } \arguments{ \item{data}{The item to be prin...
/man/print_item.Rd
permissive
lionel-/taxa
R
false
true
857
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/taxmap--internal.R \name{print_item} \alias{print_item} \title{Print a table} \usage{ print_item(data, name = NULL, max_rows = 3, max_items = 3, max_width = getOption("width") - 10, prefix = "") } \arguments{ \item{data}{The item to be prin...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{mm10_NcoI_10000} \alias{mm10_NcoI_10000} \title{Genomic features for mm10 genome and NcoI restriction enzyme at 10 Kbp} \format{A data frame with 272474 rows and 5 variables: \describe{ \item{chr:}{chromosome} ...
/man/mm10_NcoI_10000.Rd
no_license
4DGenome/hicfeatures
R
false
true
848
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{mm10_NcoI_10000} \alias{mm10_NcoI_10000} \title{Genomic features for mm10 genome and NcoI restriction enzyme at 10 Kbp} \format{A data frame with 272474 rows and 5 variables: \describe{ \item{chr:}{chromosome} ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/weatherData.R \name{getDetailedWeather} \alias{getDetailedWeather} \title{Gets weather data for a single date (All records)} \usage{ getDetailedWeather(station_id, date, station_type = "airportCode", opt_temperature_columns = TRUE, o...
/man/getDetailedWeather.Rd
no_license
cran/weatherData
R
false
true
2,762
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/weatherData.R \name{getDetailedWeather} \alias{getDetailedWeather} \title{Gets weather data for a single date (All records)} \usage{ getDetailedWeather(station_id, date, station_type = "airportCode", opt_temperature_columns = TRUE, o...
good_years <- read.csv("data/goodyears.csv")[,1]
/code/goodyears_stack.R
no_license
jsta/dataflowchl
R
false
false
50
r
good_years <- read.csv("data/goodyears.csv")[,1]
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## Cache inverse of a Matrix makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x ...
/cachematrix.R
no_license
caarthee/ProgrammingAssignment2
R
false
false
773
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## Cache inverse of a Matrix makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x ...
Sys.setlocale(category = "LC_ALL", locale = "english") rawData <- read.table("household_power_consumption.txt", sep = ";", header = TRUE) rawData$Date <- as.Date(as.character(rawData$Date), "%d/%m/%Y") electricData <- rawData[rawData$Date>=as.Date("2007-02-01") ...
/plot3.R
no_license
edwada/Exploratory-Data-Analysis-HW1
R
false
false
1,296
r
Sys.setlocale(category = "LC_ALL", locale = "english") rawData <- read.table("household_power_consumption.txt", sep = ";", header = TRUE) rawData$Date <- as.Date(as.character(rawData$Date), "%d/%m/%Y") electricData <- rawData[rawData$Date>=as.Date("2007-02-01") ...
library(reshape2) filename <- "getdata_dataset.zip" ## Download and unzip the dataset: if (!file.exists(filename)){ fileurl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip " download.file(fileurl, filename) } if (!file.exists("UCI HAR Dataset")) { unzip(filename) }...
/run_analysis.R
no_license
rikimaru1181/getting-and-cleaning-data-course-project
R
false
false
2,082
r
library(reshape2) filename <- "getdata_dataset.zip" ## Download and unzip the dataset: if (!file.exists(filename)){ fileurl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip " download.file(fileurl, filename) } if (!file.exists("UCI HAR Dataset")) { unzip(filename) }...
#' Create an example rmarkdown file report. #' #' This function has a template rmarkdown file. The file contains BEQR functions #' for plotting, NCA and ABE analyis. #' @param dir_path relative or absolute path to an existing file directory #' @param file_name a name to be given to the template rmarkdown file (include ...
/R/make_template_report.R
no_license
Eliford/BEQR
R
false
false
5,748
r
#' Create an example rmarkdown file report. #' #' This function has a template rmarkdown file. The file contains BEQR functions #' for plotting, NCA and ABE analyis. #' @param dir_path relative or absolute path to an existing file directory #' @param file_name a name to be given to the template rmarkdown file (include ...
library(ifultools) ### Name: rotateVector ### Title: Circularly vector rotation ### Aliases: rotateVector ### Keywords: utilities ### ** Examples rotateVector(1:5, 2) rotateVector(1:5, -2)
/data/genthat_extracted_code/ifultools/examples/rotateVector.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
196
r
library(ifultools) ### Name: rotateVector ### Title: Circularly vector rotation ### Aliases: rotateVector ### Keywords: utilities ### ** Examples rotateVector(1:5, 2) rotateVector(1:5, -2)
# # # Author: aagarwal ############################################################################### df1 = read.table(commandArgs()[3],header=TRUE,sep="\t") df2 = read.table(commandArgs()[4],header=TRUE,sep="\t") df3 = read.table(commandArgs()[5],header=TRUE,sep="\t") print("Subtracting pariwise x and y columns of...
/src/main/resources/R/writeFile/writeRowSumToFile.R
no_license
teg-iitr/matsim-iitr
R
false
false
703
r
# # # Author: aagarwal ############################################################################### df1 = read.table(commandArgs()[3],header=TRUE,sep="\t") df2 = read.table(commandArgs()[4],header=TRUE,sep="\t") df3 = read.table(commandArgs()[5],header=TRUE,sep="\t") print("Subtracting pariwise x and y columns of...
# ------------------------------------------------------------------------------ # 04-analyze.R: clean and visualize # ------------------------------------------------------------------------------ # load packages ---------------------------------------------------------------- library(tidyverse) library(scales) # l...
/08-cerse/code/opensecrets/04-analyze.R
no_license
mine-cetinkaya-rundel/eatcake
R
false
false
2,570
r
# ------------------------------------------------------------------------------ # 04-analyze.R: clean and visualize # ------------------------------------------------------------------------------ # load packages ---------------------------------------------------------------- library(tidyverse) library(scales) # l...
# Exercise-1: practice with basic syntax # Create a variable `hometown` that stores the city in which you were born hometown <- "Orlando, Florida" # Assign your name to the variable `my.name` my.name <- "James Lyou" # Assign your height (in inches) to a variable `my.height` my.height <- 70 # Create a variable `pupp...
/exercise-1/exercise.R
permissive
lyoujl/module5-r-intro
R
false
false
814
r
# Exercise-1: practice with basic syntax # Create a variable `hometown` that stores the city in which you were born hometown <- "Orlando, Florida" # Assign your name to the variable `my.name` my.name <- "James Lyou" # Assign your height (in inches) to a variable `my.height` my.height <- 70 # Create a variable `pupp...
#' Square grid over system area #' #' Creates a square grid with given cell size over the service area #' of the dockless bike sharing system. #' #' @param area object of class \code{sf} representing the system area. #' @param ... further arguments passed to \code{st_make_grid}. #' @return If \code{type} is set to \cod...
/R/cluster_loop.R
no_license
kezekwem/dockless
R
false
false
9,529
r
#' Square grid over system area #' #' Creates a square grid with given cell size over the service area #' of the dockless bike sharing system. #' #' @param area object of class \code{sf} representing the system area. #' @param ... further arguments passed to \code{st_make_grid}. #' @return If \code{type} is set to \cod...
#lecture 4 install.packages('hexbin') library(hexbin) library(tidyverse) genes <- read_tsv("data/data/gene_lengths.txt") genes ggplot(genes) + geom_density(aes(x=gene_length)) + facet_wrap((~chr)) #the plots show the data is not normally distributed at all, chr1 looks likeit has more small genes kruskal.test(gene_lengt...
/Class/lecture4.R
no_license
mahdi-robbani/high_throughput
R
false
false
1,575
r
#lecture 4 install.packages('hexbin') library(hexbin) library(tidyverse) genes <- read_tsv("data/data/gene_lengths.txt") genes ggplot(genes) + geom_density(aes(x=gene_length)) + facet_wrap((~chr)) #the plots show the data is not normally distributed at all, chr1 looks likeit has more small genes kruskal.test(gene_lengt...
library(gt) library(tidyverse) # Create a table where rows are formatted conditionally conditional_tbl <- readr::read_csv( system.file("extdata", "sp500.csv", package = "gt"), col_types = "cddddd" ) %>% gt() %>% fmt_number( columns = Open, rows = Open > 1900, decimals = 3, scale_by = 1/...
/tests/gt-examples/01-html-script/html-10-conditional_formatting.R
permissive
rstudio/gt
R
false
false
577
r
library(gt) library(tidyverse) # Create a table where rows are formatted conditionally conditional_tbl <- readr::read_csv( system.file("extdata", "sp500.csv", package = "gt"), col_types = "cddddd" ) %>% gt() %>% fmt_number( columns = Open, rows = Open > 1900, decimals = 3, scale_by = 1/...
library(DLMtool) ### Name: MRreal ### Title: Spatial closure and allocation management procedures ### Aliases: MRreal MRnoreal ### ** Examples MRreal(1, DLMtool::Atlantic_mackerel, plot=TRUE) MRnoreal(1, DLMtool::Atlantic_mackerel, plot=TRUE)
/data/genthat_extracted_code/DLMtool/examples/MRreal.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
250
r
library(DLMtool) ### Name: MRreal ### Title: Spatial closure and allocation management procedures ### Aliases: MRreal MRnoreal ### ** Examples MRreal(1, DLMtool::Atlantic_mackerel, plot=TRUE) MRnoreal(1, DLMtool::Atlantic_mackerel, plot=TRUE)
.dashEditableDiv_js_metadata <- function() { deps_metadata <- list(`dash_editable_div` = structure(list(name = "dash_editable_div", version = "0.0.1", src = list(href = NULL, file = "deps"), meta = NULL, script = 'dash_editable_div.min.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashEditableDiv",...
/R/internal.R
no_license
remidbs/dash-editable-div
R
false
false
715
r
.dashEditableDiv_js_metadata <- function() { deps_metadata <- list(`dash_editable_div` = structure(list(name = "dash_editable_div", version = "0.0.1", src = list(href = NULL, file = "deps"), meta = NULL, script = 'dash_editable_div.min.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashEditableDiv",...
install.packages("tidyverse") install.packages("emmeans") install.packages("afex")
/install.R
no_license
AngelicaCastaneda/first_binder
R
false
false
83
r
install.packages("tidyverse") install.packages("emmeans") install.packages("afex")
### ========================================================================= ### Expression objects ### ------------------------------------------------------------------------- ### ### Temporarily copy/pasted from rsolr ### setClassUnion("Expression", "language") setClass("ConstantExpression", slots=c(valu...
/R/Expression-class.R
no_license
lawremi/hailr
R
false
false
2,302
r
### ========================================================================= ### Expression objects ### ------------------------------------------------------------------------- ### ### Temporarily copy/pasted from rsolr ### setClassUnion("Expression", "language") setClass("ConstantExpression", slots=c(valu...
#getwd() library(dplyr) par(mfrow = c(1, 1)) # Načtení dat z xlsx souboru data_xlsx = readxl::read_excel("./1S/ukol_123.xlsx", sheet = "Vysledky mereni", skip = 0) data_xlsx = data_xlsx[,-1] # odstraníme první sloupec s indexy colnames(data_xlsx)=c("A2...
/4S/4S.r
permissive
Atheloses/VSB-S8-PS
R
false
false
6,082
r
#getwd() library(dplyr) par(mfrow = c(1, 1)) # Načtení dat z xlsx souboru data_xlsx = readxl::read_excel("./1S/ukol_123.xlsx", sheet = "Vysledky mereni", skip = 0) data_xlsx = data_xlsx[,-1] # odstraníme první sloupec s indexy colnames(data_xlsx)=c("A2...
## ## tests/gcc323.R ## ## $Revision: 1.2 $ $Date: 2015/12/29 08:54:49 $ ## require(spatstat) local({ # critical R values that provoke GCC bug #323 a <- marktable(lansing, R=0.25) a <- marktable(lansing, R=0.21) a <- marktable(lansing, R=0.20) a <- marktable(lansing, R=0.10) }) # # tests/...
/tests/testsGtoK.R
no_license
kasselhingee/spatstat
R
false
false
16,328
r
## ## tests/gcc323.R ## ## $Revision: 1.2 $ $Date: 2015/12/29 08:54:49 $ ## require(spatstat) local({ # critical R values that provoke GCC bug #323 a <- marktable(lansing, R=0.25) a <- marktable(lansing, R=0.21) a <- marktable(lansing, R=0.20) a <- marktable(lansing, R=0.10) }) # # tests/...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions_wmm.R \name{GetMagneticFieldWMM} \alias{GetMagneticFieldWMM} \title{Calculate Expected Magnetic Field from WMM} \usage{ GetMagneticFieldWMM(lon, lat, height, time, wmmVersion = "derived") } \arguments{ \item{lon}{GPS longit...
/man/GetMagneticFieldWMM.Rd
no_license
cran/wmm
R
false
true
2,403
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions_wmm.R \name{GetMagneticFieldWMM} \alias{GetMagneticFieldWMM} \title{Calculate Expected Magnetic Field from WMM} \usage{ GetMagneticFieldWMM(lon, lat, height, time, wmmVersion = "derived") } \arguments{ \item{lon}{GPS longit...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pr_stem.R \name{pr_stem_sentences} \alias{pr_stem_sentences} \title{Stem a dataframe containing a column with sentences} \usage{ pr_stem_sentences(df, col, language = "french") } \arguments{ \item{df}{the data.frame containing the text} \ite...
/man/pr_stem_sentences.Rd
no_license
ColinFay/proustr
R
false
true
721
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pr_stem.R \name{pr_stem_sentences} \alias{pr_stem_sentences} \title{Stem a dataframe containing a column with sentences} \usage{ pr_stem_sentences(df, col, language = "french") } \arguments{ \item{df}{the data.frame containing the text} \ite...
require(foreign) require(ff) require(dplyr) require(lubridate) require(ggplot2) require(ggmap) require(dplyr) require(plotly) require(tidyr) require(Formula) require(Hmisc) require(WDI) require(XML) require(acepack) require(acs) require(checkmate) require(choroplethr) require(choroplethrMaps) require(htmlTable) require...
/app.R
no_license
rfeingold18/Final-Project
R
false
false
2,070
r
require(foreign) require(ff) require(dplyr) require(lubridate) require(ggplot2) require(ggmap) require(dplyr) require(plotly) require(tidyr) require(Formula) require(Hmisc) require(WDI) require(XML) require(acepack) require(acs) require(checkmate) require(choroplethr) require(choroplethrMaps) require(htmlTable) require...
get_finalaCRFpages <- function (dsin_crf = NULL, dsin_linkPages = NULL, domain_list = NULL) { crf_out_final <- data.frame(domain = character(), sdtm_vars = character(), Variable = character(), page_nbr_concat = character()) for (sel_domain in domain_list) { print(sel_domain)...
/proj-mini-parse-aCRF-page-master/dev/functions/get_finalaCRFpages_fn - old.R
no_license
Hw1OCS/aCRFExtractor_GSK-version
R
false
false
1,757
r
get_finalaCRFpages <- function (dsin_crf = NULL, dsin_linkPages = NULL, domain_list = NULL) { crf_out_final <- data.frame(domain = character(), sdtm_vars = character(), Variable = character(), page_nbr_concat = character()) for (sel_domain in domain_list) { print(sel_domain)...
#' zip_state_city #' @docType data #' #' @usage data(zip_state_city) #' #' @format A data.frame with combinations of zipcode, city and state names #' #' @keywords zip, zipcode, city, state #' #' @references \url{www.pier2pier.com/links/files/Countrystate/USA-Zip.xls} "zip_state_city" #' get_state_city_zipcode #' @desc...
/BDEEPInfousa/R/zip_state_city.R
no_license
uiuc-bdeep/InfoUSA_Database
R
false
false
970
r
#' zip_state_city #' @docType data #' #' @usage data(zip_state_city) #' #' @format A data.frame with combinations of zipcode, city and state names #' #' @keywords zip, zipcode, city, state #' #' @references \url{www.pier2pier.com/links/files/Countrystate/USA-Zip.xls} "zip_state_city" #' get_state_city_zipcode #' @desc...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FCP_TPA.R \name{FCP_TPA} \alias{FCP_TPA} \title{The functional CP-TPA algorithm} \usage{ FCP_TPA( X, K, penMat, alphaRange, verbose = FALSE, tol = 1e-04, maxIter = 15, adaptTol = TRUE ) } \arguments{ \item{X}{The data tensor o...
/man/FCP_TPA.Rd
no_license
cran/MFPCA
R
false
true
4,895
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FCP_TPA.R \name{FCP_TPA} \alias{FCP_TPA} \title{The functional CP-TPA algorithm} \usage{ FCP_TPA( X, K, penMat, alphaRange, verbose = FALSE, tol = 1e-04, maxIter = 15, adaptTol = TRUE ) } \arguments{ \item{X}{The data tensor o...
############################################################################### #' @import svDialogs ############################################################################### #' @rdname AQSysCurve #' @title This functions plot a curve based in the chosen model and its #' parameters. #' @description The fun...
/R/AQSysCurve.R
no_license
cran/LLSR
R
false
false
6,700
r
############################################################################### #' @import svDialogs ############################################################################### #' @rdname AQSysCurve #' @title This functions plot a curve based in the chosen model and its #' parameters. #' @description The fun...
library(readr) Abstract_Catalogados <- read_csv("Abstract Catalogados.csv") View(Abstract_Catalogados) library(dplyr) names(Abstract_Catalogados) Abstract_Catalogados=mutate(Abstract_Catalogados, AbstractYRevista= paste(Abstract,Titulo_Revista,sep=" ")) Abstract_Catalogados=filter(Abstract_Catalogados,Disciplina!=...
/RunSVM.R
no_license
claudiasolervicens/Tesis-prueba2
R
false
false
2,160
r
library(readr) Abstract_Catalogados <- read_csv("Abstract Catalogados.csv") View(Abstract_Catalogados) library(dplyr) names(Abstract_Catalogados) Abstract_Catalogados=mutate(Abstract_Catalogados, AbstractYRevista= paste(Abstract,Titulo_Revista,sep=" ")) Abstract_Catalogados=filter(Abstract_Catalogados,Disciplina!=...
library(ape) testtree <- read.tree("1639_19.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="1639_19_unrooted.txt")
/codeml_files/newick_trees_processed/1639_19/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
137
r
library(ape) testtree <- read.tree("1639_19.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="1639_19_unrooted.txt")
# Sidebar with a slider input for number of bins sidebarLayout( fluidRow( box(status="primary", title="Test App 1", sliderInput("bins1", "Number of bins:", min = 1, max = 50, value = 30) ), # Show a plot of the generated dist...
/apps/app1/ui.R
no_license
maryskalicky/shinydashboard
R
false
false
494
r
# Sidebar with a slider input for number of bins sidebarLayout( fluidRow( box(status="primary", title="Test App 1", sliderInput("bins1", "Number of bins:", min = 1, max = 50, value = 30) ), # Show a plot of the generated dist...
############################################################################### # OVERVIEW: # Code to create a cleaned person table from the combined # King County Housing Authority and Seattle Housing Authority data sets # Aim is to have a single row per contiguous time in a house per person # # STEPS: # 01 - Process...
/processing/05_pha_recodes.R
permissive
jmhernan/Housing
R
false
false
4,710
r
############################################################################### # OVERVIEW: # Code to create a cleaned person table from the combined # King County Housing Authority and Seattle Housing Authority data sets # Aim is to have a single row per contiguous time in a house per person # # STEPS: # 01 - Process...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
/src/kudu/scripts/mt-tablet-test-graph.R
permissive
apache/kudu
R
false
false
3,193
r
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
#jian dan xian xing hui gui de zhi huan jian yan library(lmPerm) set.seed(1234) fit <- lmp(weight~height,data=women,perm = "Prob") summary(fit) #duo xiang shi hui gui de zhi huan jian yan fit <- lmp(weight~height + I(height^2), data=women,perm = "Prob") summary(fit) #duo yuan hui gui states <- as.data.frame(state.x77...
/9.10/sample03.R
no_license
weidaoming/R
R
false
false
1,561
r
#jian dan xian xing hui gui de zhi huan jian yan library(lmPerm) set.seed(1234) fit <- lmp(weight~height,data=women,perm = "Prob") summary(fit) #duo xiang shi hui gui de zhi huan jian yan fit <- lmp(weight~height + I(height^2), data=women,perm = "Prob") summary(fit) #duo yuan hui gui states <- as.data.frame(state.x77...
#' Create a dataframe formatted using the Actual and Forecast Table Schema (AFTS) #' #' Joins a table containing time series actuals (given in the TSTS format) and a #' table containing forecasts (given in the FTS format) to create a table containing both #' actuals and forecasts using the Actual and Forecast Table Sch...
/R/createAFTS.R
no_license
forvis/forvision
R
false
false
2,158
r
#' Create a dataframe formatted using the Actual and Forecast Table Schema (AFTS) #' #' Joins a table containing time series actuals (given in the TSTS format) and a #' table containing forecasts (given in the FTS format) to create a table containing both #' actuals and forecasts using the Actual and Forecast Table Sch...
#' @title Update posterior latent class assignment \code{C} for each subject. #' #' @description This uses Bayes' theorem to update posterior latent class assignment. This is a ratio of the likelihood contribution of each subject to class \code{k} and the prior probability of belonging in class \code{k} to the likeliho...
/R/update_C_fast.R
permissive
anthopolos/EHRMiss
R
false
false
10,911
r
#' @title Update posterior latent class assignment \code{C} for each subject. #' #' @description This uses Bayes' theorem to update posterior latent class assignment. This is a ratio of the likelihood contribution of each subject to class \code{k} and the prior probability of belonging in class \code{k} to the likeliho...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sampleAges.R \name{sampleAges} \alias{sampleAges} \title{Get sample ages from a set of Bchron calibrated dates} \usage{ sampleAges(CalDates, n_samp = 10000) } \arguments{ \item{CalDates}{A list created from either \code{\link{BchronCalibrate}...
/man/sampleAges.Rd
no_license
allisonstegner/Bchron
R
false
true
1,459
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sampleAges.R \name{sampleAges} \alias{sampleAges} \title{Get sample ages from a set of Bchron calibrated dates} \usage{ sampleAges(CalDates, n_samp = 10000) } \arguments{ \item{CalDates}{A list created from either \code{\link{BchronCalibrate}...
#' Generates grouped violin plots based on peptides signals intensities with t tests options #' #' Takes in the scaled dataset from krsa_scaleModel() and plot violin figures using ggplot2 #' #' @param data the scaled dataset from krsa_scaleModel #' @param peptides vector of peptides #' @param grp_comp list of group com...
/R/krsa_violin_plot_grouped.R
permissive
AliSajid/KRSA
R
false
false
2,119
r
#' Generates grouped violin plots based on peptides signals intensities with t tests options #' #' Takes in the scaled dataset from krsa_scaleModel() and plot violin figures using ggplot2 #' #' @param data the scaled dataset from krsa_scaleModel #' @param peptides vector of peptides #' @param grp_comp list of group com...
#' @include facet-.R NULL #' Facet specification: a single panel. #' #' @inheritParams facet_grid #' @keywords internal #' @export #' @examples #' # facet_null is the default faceting specification if you #' # don't override it with facet_grid or facet_wrap #' ggplot(mtcars, aes(mpg, wt)) + geom_point() fa...
/R/facet-null.R
no_license
cran/ggplot2
R
false
false
2,400
r
#' @include facet-.R NULL #' Facet specification: a single panel. #' #' @inheritParams facet_grid #' @keywords internal #' @export #' @examples #' # facet_null is the default faceting specification if you #' # don't override it with facet_grid or facet_wrap #' ggplot(mtcars, aes(mpg, wt)) + geom_point() fa...
src <- read.csv(file = "C:/Users/Sam/Desktop/source.csv") splitted <- strsplit(as.character(src$ORIGINAL_TEXT),"[.,_]") for(i in 1:length(splitted)) { temp <- unlist(splitted[i]) temp <- temp[temp !="MODE"] temp <- temp[temp !="TO"] splitted[i] <- list(temp) } zz <- file("C:/Users/Sam/Desktop/target.txt","w") f...
/wf_file.r
no_license
SamJake/test
R
false
false
452
r
src <- read.csv(file = "C:/Users/Sam/Desktop/source.csv") splitted <- strsplit(as.character(src$ORIGINAL_TEXT),"[.,_]") for(i in 1:length(splitted)) { temp <- unlist(splitted[i]) temp <- temp[temp !="MODE"] temp <- temp[temp !="TO"] splitted[i] <- list(temp) } zz <- file("C:/Users/Sam/Desktop/target.txt","w") f...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/docker_class.R \docType{data} \name{docker} \alias{docker} \title{docker} \format{An object of class \code{R6ClassGenerator} of length 24.} \usage{ docker } \description{ docker } \keyword{datasets}
/man/docker.Rd
no_license
favstats/dockeR
R
false
true
277
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/docker_class.R \docType{data} \name{docker} \alias{docker} \title{docker} \format{An object of class \code{R6ClassGenerator} of length 24.} \usage{ docker } \description{ docker } \keyword{datasets}
test.occuMulti.fit.simple.1 <- function() { y <- list(matrix(rep(1,10),5,2), matrix(rep(1,10),5,2)) umf <- unmarkedFrameOccuMulti(y = y) fm <- occuMulti(detformulas=rep("~1",2), stateformulas=rep("~1",3), data = umf, se=FALSE) #Probably should not be calling predict here b/c unit...
/fuzzedpackages/unmarked/inst/unitTests/runit.occuMulti.R
no_license
akhikolla/testpackages
R
false
false
11,814
r
test.occuMulti.fit.simple.1 <- function() { y <- list(matrix(rep(1,10),5,2), matrix(rep(1,10),5,2)) umf <- unmarkedFrameOccuMulti(y = y) fm <- occuMulti(detformulas=rep("~1",2), stateformulas=rep("~1",3), data = umf, se=FALSE) #Probably should not be calling predict here b/c unit...
Define your own operators: `%+%` <- function(e1, e2) { e1[is.na(e1)] <- 0; e2[is.na(e2)] <- 0; return(e1 + e2)} `%-%` <- function(e1, e2) { e1[is.na(e1)] <- 0; e2[is.na(e2)] <- 0; return(e1 - e2)} within(df, e <- a %-% b %+% c) a b c e 1 1 0 9 10 2 2 1 10 11 3 3 NA 11 14 4 4 3 NA 1 5 5 4 13 14
/define_your_own_operators.R
no_license
pstessel/useful_R
R
false
false
312
r
Define your own operators: `%+%` <- function(e1, e2) { e1[is.na(e1)] <- 0; e2[is.na(e2)] <- 0; return(e1 + e2)} `%-%` <- function(e1, e2) { e1[is.na(e1)] <- 0; e2[is.na(e2)] <- 0; return(e1 - e2)} within(df, e <- a %-% b %+% c) a b c e 1 1 0 9 10 2 2 1 10 11 3 3 NA 11 14 4 4 3 NA 1 5 5 4 13 14
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/knapsack_dynamic.R \name{knapsack_dynamic} \alias{knapsack_dynamic} \title{0/1 knapsack problem} \usage{ knapsack_dynamic(x, W) } \arguments{ \item{x}{a dataframe consists of two variables \code{w} and \code{v}. Both variables contain...
/knapsack/man/knapsack_dynamic.Rd
no_license
ClaraSchartner/lab6
R
false
false
783
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/knapsack_dynamic.R \name{knapsack_dynamic} \alias{knapsack_dynamic} \title{0/1 knapsack problem} \usage{ knapsack_dynamic(x, W) } \arguments{ \item{x}{a dataframe consists of two variables \code{w} and \code{v}. Both variables contain...
transmute( flights, dep_min = (dep_time %/% 100) * 60 + dep_time %% 100, sched_dep_min = (sched_dep_time %/% 100) * 60 + sched_dep_time %% 100, )
/cap05/transmute03.R
permissive
vcwild/r4ds
R
false
false
157
r
transmute( flights, dep_min = (dep_time %/% 100) * 60 + dep_time %% 100, sched_dep_min = (sched_dep_time %/% 100) * 60 + sched_dep_time %% 100, )
## In this script there are two function, the first one is to save on cache ## some info, and the second one is to solve info on the first one. ## This function save info on cache makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x set...
/ProgrammingAssignment2/cachematrix.R
no_license
BRodas/datasciencecoursera
R
false
false
790
r
## In this script there are two function, the first one is to save on cache ## some info, and the second one is to solve info on the first one. ## This function save info on cache makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x set...
\name{nexml_write} \alias{nexml_write} \alias{write.nexml} \title{Write nexml files} \usage{ nexml_write(x = new("nexml"), file = NULL, trees = NULL, characters = NULL, meta = NULL, ...) } \arguments{ \item{x}{a nexml object, or any phylogeny object (e.g. phylo, phylo4) that can be coerced into one. Can also be ...
/man/nexml_write.Rd
permissive
craigcitro/RNeXML
R
false
false
2,199
rd
\name{nexml_write} \alias{nexml_write} \alias{write.nexml} \title{Write nexml files} \usage{ nexml_write(x = new("nexml"), file = NULL, trees = NULL, characters = NULL, meta = NULL, ...) } \arguments{ \item{x}{a nexml object, or any phylogeny object (e.g. phylo, phylo4) that can be coerced into one. Can also be ...
\name{dizzysNewInfec-package} \alias{dizzysNewInfec-package} \alias{dizzysNewInfec} \docType{package} \title{ \packageTitle{dizzysNewInfec} } \description{ \packageDescription{dizzysNewInfec} } \details{ The DESCRIPTION file: \packageDESCRIPTION{dizzysNewInfec} \packageIndices{dizzysNewInfec} ~~ An overview of how to ...
/CODE_dizzys/refreshDIZZYS_2015_10_23/lan2/dizzysNewInfec/man/dizzysNewInfec-package.Rd
no_license
ttcgiang/THESE_GitHub
R
false
false
862
rd
\name{dizzysNewInfec-package} \alias{dizzysNewInfec-package} \alias{dizzysNewInfec} \docType{package} \title{ \packageTitle{dizzysNewInfec} } \description{ \packageDescription{dizzysNewInfec} } \details{ The DESCRIPTION file: \packageDESCRIPTION{dizzysNewInfec} \packageIndices{dizzysNewInfec} ~~ An overview of how to ...
te=c(27, 20, 7, 4, 1,1) ye=c("European", "Indian", "Chinese", "West Asian", "Korean", "Japanese" ) df=data.frame(cbind(ye,te)) colnames(df)=c("origin", "count") df$count=as.numeric(as.character(df$count)) df$percentage= round(df$count/sum(te)*100,1) df$pop=c(197.3, 3.18, 3.79, 10.5, 1.7, 1.3 ) totalpop=sum(df$po...
/scripts/cheaters.R
no_license
somasushma/R-code
R
false
false
809
r
te=c(27, 20, 7, 4, 1,1) ye=c("European", "Indian", "Chinese", "West Asian", "Korean", "Japanese" ) df=data.frame(cbind(ye,te)) colnames(df)=c("origin", "count") df$count=as.numeric(as.character(df$count)) df$percentage= round(df$count/sum(te)*100,1) df$pop=c(197.3, 3.18, 3.79, 10.5, 1.7, 1.3 ) totalpop=sum(df$po...
#' Normalised sequence read coverage ratios for wild type S.cerevisiae W303 #' #' Sequence read coverage ratios for wild type sample #' (T7107 strain). The cells were stained with DNA dye and sorted #' based on DNA content into S or G2/M phase fractions. Extracted #' DNA was sequenced and mapped to sacCer3 genome....
/R/W303norm.R
no_license
cran/Repliscope
R
false
false
1,640
r
#' Normalised sequence read coverage ratios for wild type S.cerevisiae W303 #' #' Sequence read coverage ratios for wild type sample #' (T7107 strain). The cells were stained with DNA dye and sorted #' based on DNA content into S or G2/M phase fractions. Extracted #' DNA was sequenced and mapped to sacCer3 genome....
world_map_title_www <- function(p) { print_debug_info(p) if (!is_world_map_www(p)) return(p) p_return <- p # Don't pass the modified p (e.g. with swap) on to next function (bit of hack) x_position_left <- p$labels_margin_left if (!is_set(p$world_map_value)) { title_width <- p$width } else { tit...
/R/world-map-title-www.R
permissive
data-science-made-easy/james
R
false
false
1,580
r
world_map_title_www <- function(p) { print_debug_info(p) if (!is_world_map_www(p)) return(p) p_return <- p # Don't pass the modified p (e.g. with swap) on to next function (bit of hack) x_position_left <- p$labels_margin_left if (!is_set(p$world_map_value)) { title_width <- p$width } else { tit...
#' @include internal.R NULL #' Get coordinate reference system #' #' Extract the coordinate reference system from an object. #' #' @param x [sf::st_sf()], [terra::rast()], [Spatial-class], or #' [raster::raster()] object. #' #' @return A [sf::st_crs()] object. #' #' @noRd NULL get_crs <- function(x) { assert_requ...
/R/get_crs.R
no_license
prioritizr/prioritizr
R
false
false
1,357
r
#' @include internal.R NULL #' Get coordinate reference system #' #' Extract the coordinate reference system from an object. #' #' @param x [sf::st_sf()], [terra::rast()], [Spatial-class], or #' [raster::raster()] object. #' #' @return A [sf::st_crs()] object. #' #' @noRd NULL get_crs <- function(x) { assert_requ...
# En este script buscamos relacionar la presencia de especies domésticas # (vacas, borregos, perros, caballos) con integridad ecológica (ROBIN) library(Hmisc) library(rgdal) library(sp) library(raster) library(dplyr) # conexión a la base de datos (snmb) PASS_SNMB = Sys.getenv("PASS_SNMB") base_input <- src_postgres(d...
/integrity_domestic_animals/integrity_domestic.R
no_license
tereom/robin-snmb
R
false
false
8,141
r
# En este script buscamos relacionar la presencia de especies domésticas # (vacas, borregos, perros, caballos) con integridad ecológica (ROBIN) library(Hmisc) library(rgdal) library(sp) library(raster) library(dplyr) # conexión a la base de datos (snmb) PASS_SNMB = Sys.getenv("PASS_SNMB") base_input <- src_postgres(d...
teasel<-matrix( c( 0, 0, 0, 0, 0, 322.388, 0.966, 0, 0, 0, 0, 0, 0.013, 0.01, 0.125, 0, 0, 3.488, 0.007, 0, 0.125, 0.238, 0, 30.170, 0.008, 0, 0.038, 0.245, 0.167, 0.862, 0, 0, 0, 0.023, 0.750, 0 ), nrow=6, byrow=TRUE, dimnames=list(c("seed1", "see...
/data/teasel.R
no_license
ashander/popbio
R
false
false
445
r
teasel<-matrix( c( 0, 0, 0, 0, 0, 322.388, 0.966, 0, 0, 0, 0, 0, 0.013, 0.01, 0.125, 0, 0, 3.488, 0.007, 0, 0.125, 0.238, 0, 30.170, 0.008, 0, 0.038, 0.245, 0.167, 0.862, 0, 0, 0, 0.023, 0.750, 0 ), nrow=6, byrow=TRUE, dimnames=list(c("seed1", "see...
## Put comments here that give an overall description of what your ## functions do # Following functions calculates the Inverse of a matrix and store it in the Cache memory. # If the matrix is not changed then R does not compute Inverse and returns Inverse of the matrix # stored in the cache memory ## Write a short ...
/cachematrix.R
no_license
saurabh2086/ProgrammingAssignment2
R
false
false
1,279
r
## Put comments here that give an overall description of what your ## functions do # Following functions calculates the Inverse of a matrix and store it in the Cache memory. # If the matrix is not changed then R does not compute Inverse and returns Inverse of the matrix # stored in the cache memory ## Write a short ...
#assignment 1.5 #1. Create an m x n matrix with replicate(m, rnorm(n)) with m=10 column vectors of n=10 elements each, #constructed with rnorm(n), which creates random normal numbers. #Then we transform it into a dataframe (thus 10 observations of 10 variables) and perform an algebraic #operation on each element ...
/assignment 1.5.R
no_license
Farhanaaz522/assignment-1.5
R
false
false
993
r
#assignment 1.5 #1. Create an m x n matrix with replicate(m, rnorm(n)) with m=10 column vectors of n=10 elements each, #constructed with rnorm(n), which creates random normal numbers. #Then we transform it into a dataframe (thus 10 observations of 10 variables) and perform an algebraic #operation on each element ...
## Project: NYSG R/SHH-18 part 1. ## Purpose of study: investigate the effect of pre-growth condition and ## strain diversity on the nisin efficacy against Listeria monocytogenes ## on cold-smoked salmon. ## Purpose of script: # i) post hoc analysis for the salmon lme model. # ii) making figures associated with the s...
/hi_salmon_figures.R
no_license
FSL-MQIP/PregrowthListeria_Nisin
R
false
false
19,266
r
## Project: NYSG R/SHH-18 part 1. ## Purpose of study: investigate the effect of pre-growth condition and ## strain diversity on the nisin efficacy against Listeria monocytogenes ## on cold-smoked salmon. ## Purpose of script: # i) post hoc analysis for the salmon lme model. # ii) making figures associated with the s...
# Sum by person, condition, across event all_pers <- all_events %>% group_by(.subgrps., DUPERSID, VARSTR, VARPSU, PERWT.yy.F, Condition, count) %>% summarize_at(vars(SF.yy.X, PR.yy.X, MR.yy.X, MD.yy.X, OZ.yy.X, XP.yy.X),sum) %>% ungroup PERSdsgn <- svydesign( id = ~VARPSU, strata = ~VARSTR, weights = ~...
/build_hc_tables/code/r/dsgn/cond_PERS.R
permissive
RandomCriticalAnalysis/MEPS-summary-tables
R
false
false
366
r
# Sum by person, condition, across event all_pers <- all_events %>% group_by(.subgrps., DUPERSID, VARSTR, VARPSU, PERWT.yy.F, Condition, count) %>% summarize_at(vars(SF.yy.X, PR.yy.X, MR.yy.X, MD.yy.X, OZ.yy.X, XP.yy.X),sum) %>% ungroup PERSdsgn <- svydesign( id = ~VARPSU, strata = ~VARSTR, weights = ~...
misoMatrices <- list.files("/Users/larssteenhuis/miso/matrices/stimuli_events/") dexSeqMatrices <- "/Users/larssteenhuis/DEXSEQ/matrices/" misoDexIntersect <- "/Users/larssteenhuis/intersectMisoDex/" lapply(misoMatrices,function(x){ x <- "Rhizopus_oryzae_24h" matrixFile <- paste(misoDexIntersect, "intersect_",x ,se...
/dexseq/scripts/R/makeIntersectionFiles.R
no_license
Lsteenhuis/visualizingDEStimulatedExons
R
false
false
1,251
r
misoMatrices <- list.files("/Users/larssteenhuis/miso/matrices/stimuli_events/") dexSeqMatrices <- "/Users/larssteenhuis/DEXSEQ/matrices/" misoDexIntersect <- "/Users/larssteenhuis/intersectMisoDex/" lapply(misoMatrices,function(x){ x <- "Rhizopus_oryzae_24h" matrixFile <- paste(misoDexIntersect, "intersect_",x ,se...
#' Remove duplicates. #' #' @section Aesthetics: #' \Sexpr[results=rd,stage=build]{animint2:::rd_aesthetics("a_stat", "unique")} #' #' @export #' @inheritParams a_layer #' @inheritParams a_geom_point #' @examples #' a_plot(mtcars, a_aes(vs, am)) + a_geom_point(alpha = 0.1) #' a_plot(mtcars, a_aes(vs, am)) + a...
/R/stat-unique.r
no_license
vivekktiwari/animint2
R
false
false
1,104
r
#' Remove duplicates. #' #' @section Aesthetics: #' \Sexpr[results=rd,stage=build]{animint2:::rd_aesthetics("a_stat", "unique")} #' #' @export #' @inheritParams a_layer #' @inheritParams a_geom_point #' @examples #' a_plot(mtcars, a_aes(vs, am)) + a_geom_point(alpha = 0.1) #' a_plot(mtcars, a_aes(vs, am)) + a...
##Download zip file and save it in a folder on working directory: if (!file.exists("./Project2")) {dir.create("./Project2")} site <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip" download.file(site, "./Project2/EPA.zip", method = "curl") ##Unzip file in the new directory: unzip("./Project2/EPA.z...
/plot1.R
no_license
alroru95/Exploratory-Data-Analysis-Course-project-2
R
false
false
915
r
##Download zip file and save it in a folder on working directory: if (!file.exists("./Project2")) {dir.create("./Project2")} site <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip" download.file(site, "./Project2/EPA.zip", method = "curl") ##Unzip file in the new directory: unzip("./Project2/EPA.z...
## app.R ## library(shiny) library(tidyverse) library(leaflet) library(markdown) citydata <- read_csv("500_Cities__City-level_Data__GIS_Friendly_Format___2018_release.csv") citydata <- tidyr::separate(data=citydata, col=Geolocation, into=c("Latitude", "Longitude"...
/app.R
no_license
mattdoesdata/cdc-map
R
false
false
4,884
r
## app.R ## library(shiny) library(tidyverse) library(leaflet) library(markdown) citydata <- read_csv("500_Cities__City-level_Data__GIS_Friendly_Format___2018_release.csv") citydata <- tidyr::separate(data=citydata, col=Geolocation, into=c("Latitude", "Longitude"...
f <-file.choose() f d <- read.table(f, header = TRUE, sep = "\t", stringsAsFactors = FALSE, fill = TRUE) d library(readr) d <- read_tsv(f, col_names = TRUE) # for tab-separated value files d library(readxl) f <- "data/CPDS-1960-2014-reduced.xlsx" d <- read_excel(f, sheet = 1, col_names = TRUE) head(d) library(curl) f ...
/Class_02_11.R
no_license
brittaw/ADA
R
false
false
698
r
f <-file.choose() f d <- read.table(f, header = TRUE, sep = "\t", stringsAsFactors = FALSE, fill = TRUE) d library(readr) d <- read_tsv(f, col_names = TRUE) # for tab-separated value files d library(readxl) f <- "data/CPDS-1960-2014-reduced.xlsx" d <- read_excel(f, sheet = 1, col_names = TRUE) head(d) library(curl) f ...
##----------------------------------------------------------------------------------------------------------## ## Cedric Scherer (cedricphilippscherer@gmail.com) ## ## Creating NLMs as .txt files ...
/swifcol/R/nlms.R
no_license
marcosci/Sciaini_et_al_2018
R
false
false
1,766
r
##----------------------------------------------------------------------------------------------------------## ## Cedric Scherer (cedricphilippscherer@gmail.com) ## ## Creating NLMs as .txt files ...
library(seewave) ### Name: dynspec ### Title: Dynamic sliding spectrum ### Aliases: dynspec ### Keywords: dplot ts ### ** Examples ## Not run: ##D data(sheep) ##D require(rpanel) ##D dynspec(sheep,f=8000,wl=1024,ovlp=50,osc=TRUE) ## End(Not run)
/data/genthat_extracted_code/seewave/examples/dynspec.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
254
r
library(seewave) ### Name: dynspec ### Title: Dynamic sliding spectrum ### Aliases: dynspec ### Keywords: dplot ts ### ** Examples ## Not run: ##D data(sheep) ##D require(rpanel) ##D dynspec(sheep,f=8000,wl=1024,ovlp=50,osc=TRUE) ## End(Not run)
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/ac_ranking.R \name{centroid.buckets} \alias{centroid.buckets} \title{Buckets Centroid} \usage{ centroid.buckets(buckets, simulations = 1000) } \arguments{ \item{buckets}{a list where each element contains the index of the assets in th...
/man/centroid.buckets.Rd
no_license
arturochian/PortfolioAnalytics-1
R
false
false
822
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/ac_ranking.R \name{centroid.buckets} \alias{centroid.buckets} \title{Buckets Centroid} \usage{ centroid.buckets(buckets, simulations = 1000) } \arguments{ \item{buckets}{a list where each element contains the index of the assets in th...
# # Functions for analysing A. Thaliana Tiling Arrays # last modified: 05-06-2013 # first written: 03-06-2013 # (c) 2013 GBIC Yalan Bi, Danny Arends, R.C. Jansen # #************************************************************* plot exp part *************************************************************# #plot 4 env se...
/functions/old/geneticsAS_s1_plot.r
no_license
YalanBi/AA
R
false
false
7,341
r
# # Functions for analysing A. Thaliana Tiling Arrays # last modified: 05-06-2013 # first written: 03-06-2013 # (c) 2013 GBIC Yalan Bi, Danny Arends, R.C. Jansen # #************************************************************* plot exp part *************************************************************# #plot 4 env se...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/UCTSUpload.R \name{UCTSAppend} \alias{UCTSAppend} \title{Append a xts to an existing UCTS timeseries in Datastream} \usage{ UCTSAppend( tsData, TSCode = "", MGMTGroup = "ABC", freq = c("D", "W", "M", "Q", "Y"), seriesName, Units =...
/man/UCTSAppend.Rd
no_license
CharlesCara/DatastreamDSWS2R
R
false
true
2,478
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/UCTSUpload.R \name{UCTSAppend} \alias{UCTSAppend} \title{Append a xts to an existing UCTS timeseries in Datastream} \usage{ UCTSAppend( tsData, TSCode = "", MGMTGroup = "ABC", freq = c("D", "W", "M", "Q", "Y"), seriesName, Units =...
reconcile_predictions <- function(use_case = 'team_games', predictions) { if (use_case == 'team_games') { } }
/R/reconcile_predictions.R
no_license
jimtheflash/nba.modelR
R
false
false
152
r
reconcile_predictions <- function(use_case = 'team_games', predictions) { if (use_case == 'team_games') { } }
\name{gtex.4k} \alias{gtex.4k} \docType{data} \title{ Example data for the spqn package. } \description{ A random sample of 4,000 expressed genes (protein-coding or lincRNAs) from GTEx v6p. The tissue is Adipose Subcutaneous. } \usage{data("gtex.4k")} \format{An object of class \code{SummarizedExperiment}. } \details{ ...
/man/gtex.4k.Rd
no_license
hansenlab/spqnData
R
false
false
1,514
rd
\name{gtex.4k} \alias{gtex.4k} \docType{data} \title{ Example data for the spqn package. } \description{ A random sample of 4,000 expressed genes (protein-coding or lincRNAs) from GTEx v6p. The tissue is Adipose Subcutaneous. } \usage{data("gtex.4k")} \format{An object of class \code{SummarizedExperiment}. } \details{ ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pphi.R \name{pphi} \alias{pphi} \title{calculate the left-tail probability of phi-divergence under general correlation matrix.} \usage{ pphi(q, M, k0, k1, s = 2, t = 30, onesided = FALSE) } \arguments{ \item{q}{- quantile, must be a ...
/man/pphi.Rd
no_license
cran/SetTest
R
false
true
1,150
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pphi.R \name{pphi} \alias{pphi} \title{calculate the left-tail probability of phi-divergence under general correlation matrix.} \usage{ pphi(q, M, k0, k1, s = 2, t = 30, onesided = FALSE) } \arguments{ \item{q}{- quantile, must be a ...
library(dplyr) # Returns data frame with latest nytimes per state covid data. # Output columns include: # - date (as a date object) # - state (as a string) # - cases # - newCasesPerDay (might be NA) loadAndFormatNytimesCovidPerState <- function() { covidByState <- read.csv2('https://raw.githubusercontent.com/nytimes...
/covid_log_log_diff/functions.R
permissive
jhofman/covid_log_log_diff
R
false
false
814
r
library(dplyr) # Returns data frame with latest nytimes per state covid data. # Output columns include: # - date (as a date object) # - state (as a string) # - cases # - newCasesPerDay (might be NA) loadAndFormatNytimesCovidPerState <- function() { covidByState <- read.csv2('https://raw.githubusercontent.com/nytimes...
\name{NISTpascalTOinchOfWaterConvtnl} \alias{NISTpascalTOinchOfWaterConvtnl} \title{Convert pascal to inch of water, conventional 12} \usage{NISTpascalTOinchOfWaterConvtnl(pascal)} \description{\code{NISTpascalTOinchOfWaterConvtnl} converts from pascal (Pa) to inch of water, conventional (inH2O) 12 } \arguments{ \it...
/man/NISTpascalTOinchOfWaterConvtnl.Rd
no_license
cran/NISTunits
R
false
false
871
rd
\name{NISTpascalTOinchOfWaterConvtnl} \alias{NISTpascalTOinchOfWaterConvtnl} \title{Convert pascal to inch of water, conventional 12} \usage{NISTpascalTOinchOfWaterConvtnl(pascal)} \description{\code{NISTpascalTOinchOfWaterConvtnl} converts from pascal (Pa) to inch of water, conventional (inH2O) 12 } \arguments{ \it...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{plot.rpca} \alias{plot.rpca} \title{Screeplot} \usage{ \method{plot}{rpca}(x, ...) } \arguments{ \item{x}{Object returned by the \code{\link[rsvd]{rpca}} function.} \item{...}{Additional arguments passed to the individual plot ...
/man/plot.rpca.Rd
no_license
cran/rsvd
R
false
true
605
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{plot.rpca} \alias{plot.rpca} \title{Screeplot} \usage{ \method{plot}{rpca}(x, ...) } \arguments{ \item{x}{Object returned by the \code{\link[rsvd]{rpca}} function.} \item{...}{Additional arguments passed to the individual plot ...
# Download the file if (!file.exists("getdata-projectfiles-UCI HAR Dataset.zip")) { download.file(url="https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip", destfile = "getdata-projectfiles-UCI HAR Dataset.zip") # Unzip the file unzip("getdata-projectfiles-UCI HA...
/run_analysis.R
no_license
ltlow/Getting-And-Cleaning-Data
R
false
false
2,348
r
# Download the file if (!file.exists("getdata-projectfiles-UCI HAR Dataset.zip")) { download.file(url="https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip", destfile = "getdata-projectfiles-UCI HAR Dataset.zip") # Unzip the file unzip("getdata-projectfiles-UCI HA...
testlist <- list(a = -1L, b = -15007745L, x = c(-1L, NA, -1L, -15066369L, -618987776L, 517726432L, -522133280L, -522125535L, -32L, -522133280L, -522133280L, -522133280L, -522133467L, -522133280L, -1310662432L, -522133280L, -7968L, -522133280L, -522133280L, -522133280L, NA, 0L, 0L, 0L, 110L)) result <- do.call(gratt...
/grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610128207-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
357
r
testlist <- list(a = -1L, b = -15007745L, x = c(-1L, NA, -1L, -15066369L, -618987776L, 517726432L, -522133280L, -522125535L, -32L, -522133280L, -522133280L, -522133280L, -522133467L, -522133280L, -1310662432L, -522133280L, -7968L, -522133280L, -522133280L, -522133280L, NA, 0L, 0L, 0L, 110L)) result <- do.call(gratt...
library(lubridate) library(dplyr) url<- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" temp<-tempfile() download.file(url, temp, method="curl") data<- read.table(unz(temp, "household_power_consumption.txt"), header = T, sep = ";") unlink(temp) rm(temp, url) data<- mutate(data,...
/Plot1.R
no_license
Yadanaparthiharsha/Individual-household-electric-power-consumption-Data-Set-
R
false
false
868
r
library(lubridate) library(dplyr) url<- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" temp<-tempfile() download.file(url, temp, method="curl") data<- read.table(unz(temp, "household_power_consumption.txt"), header = T, sep = ";") unlink(temp) rm(temp, url) data<- mutate(data,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/info_utilities.R \name{res_cendist} \alias{res_cendist} \title{Get average distance between H3 cell centers} \usage{ res_cendist(res = NULL, units = c("m", "km"), fast = TRUE) } \arguments{ \item{res}{Integer; Desired H3 resolution. See \url{...
/man/res_cendist.Rd
permissive
dcooley/h3jsr
R
false
true
954
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/info_utilities.R \name{res_cendist} \alias{res_cendist} \title{Get average distance between H3 cell centers} \usage{ res_cendist(res = NULL, units = c("m", "km"), fast = TRUE) } \arguments{ \item{res}{Integer; Desired H3 resolution. See \url{...
### R code from vignette source 'rrcov.Rnw' ################################################### ### code chunk number 1: rrcov.Rnw:471-473 ################################################### ## set the prompt to "R> " and the continuation to "+ " options(prompt="R> ", continue="+ ") #################################...
/resources/app/R-Portable-Win/library/rrcov/doc/rrcov.R
permissive
tim7en/SedSatV2_electron
R
false
false
12,216
r
### R code from vignette source 'rrcov.Rnw' ################################################### ### code chunk number 1: rrcov.Rnw:471-473 ################################################### ## set the prompt to "R> " and the continuation to "+ " options(prompt="R> ", continue="+ ") #################################...
context("People data") sample_person <- "peter-dinklage" multi_person <- c("peter-dinklage", "maisie-williams") test_that("trakt.people.summary returns data.frame", { expect_is(trakt.people.summary(target = sample_person, extended = "min"), "data.frame") expect_is(trakt.people.summary(target = sample_person, ext...
/tests/testthat/test_people-data.R
no_license
cran/tRakt
R
false
false
1,277
r
context("People data") sample_person <- "peter-dinklage" multi_person <- c("peter-dinklage", "maisie-williams") test_that("trakt.people.summary returns data.frame", { expect_is(trakt.people.summary(target = sample_person, extended = "min"), "data.frame") expect_is(trakt.people.summary(target = sample_person, ext...
#Error calculation for Model 1 across all plot sizes #Load Model 1 predicted dbh distributions load(file="PredictedDbhDistbn_Mod1.RData") #Load observed dbh distributions load(file="ObservedDbhDistbn.RData") #Load observed Dominant height and age data load(file="Dominant Height and Age Dataset_Model 1.Rda...
/Prediction Error Calculation Mod 1.R
no_license
Fedzzy/Diameter-Class-Growth-and-Yield---Thesis
R
false
false
5,027
r
#Error calculation for Model 1 across all plot sizes #Load Model 1 predicted dbh distributions load(file="PredictedDbhDistbn_Mod1.RData") #Load observed dbh distributions load(file="ObservedDbhDistbn.RData") #Load observed Dominant height and age data load(file="Dominant Height and Age Dataset_Model 1.Rda...
This function converts temperatures in celsius to fahrenheit. Although, I would mainly use temperatures in celsius in my data analysis, I have had instances where the hydrolab (what I am using to collect abiotic data in the field) accidently gets set to fahrenheit instead of celsius. I then have had to convert thos...
/convert_temp/Celsius_to_Fahrenheit.R
no_license
kearstinfindley/Project3
R
false
false
738
r
This function converts temperatures in celsius to fahrenheit. Although, I would mainly use temperatures in celsius in my data analysis, I have had instances where the hydrolab (what I am using to collect abiotic data in the field) accidently gets set to fahrenheit instead of celsius. I then have had to convert thos...
\alias{gtkTreeStoreSet} \name{gtkTreeStoreSet} \title{gtkTreeStoreSet} \description{Sets the value of one or more cells in the row referenced by \code{iter}. The variable argument list should contain integer column numbers, each column number followed by the value to be set. The list is terminated by a -1. For example...
/man/gtkTreeStoreSet.Rd
no_license
cran/RGtk2.10
R
false
false
687
rd
\alias{gtkTreeStoreSet} \name{gtkTreeStoreSet} \title{gtkTreeStoreSet} \description{Sets the value of one or more cells in the row referenced by \code{iter}. The variable argument list should contain integer column numbers, each column number followed by the value to be set. The list is terminated by a -1. For example...
plot.l1pca <- function(x, ...) { if(!inherits(x,"l1pca")) stop("Not an l1pca object") if(ncol(x$scores) == 1) stop("Need scores in at least two dimensions") plot(x$scores[,1:2]) }
/R/plot.l1pca.R
no_license
cran/pcaL1
R
false
false
198
r
plot.l1pca <- function(x, ...) { if(!inherits(x,"l1pca")) stop("Not an l1pca object") if(ncol(x$scores) == 1) stop("Need scores in at least two dimensions") plot(x$scores[,1:2]) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/internal_fluo_est.R \name{distfromcenter} \alias{distfromcenter} \title{distfromcenter} \usage{ distfromcenter(data, center) } \arguments{ \item{data}{Data matrix. A 2-dimensional location.} \item{center}{Data matrix. A second 2-dimensional ...
/man/distfromcenter.Rd
no_license
dianalow/CONFESS
R
false
true
501
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/internal_fluo_est.R \name{distfromcenter} \alias{distfromcenter} \title{distfromcenter} \usage{ distfromcenter(data, center) } \arguments{ \item{data}{Data matrix. A 2-dimensional location.} \item{center}{Data matrix. A second 2-dimensional ...
# Script that checks which images are actually embedded in any file, # given one or several folders of rmd files and a folder of images. # # Images that are not found to be embedded in any file, are removed from # the image folder (either deleted or moved to a given folder) remove_images <- function(img, files, del...
/code/remove_images.R
no_license
oskarmwagner/datahandling
R
false
false
1,428
r
# Script that checks which images are actually embedded in any file, # given one or several folders of rmd files and a folder of images. # # Images that are not found to be embedded in any file, are removed from # the image folder (either deleted or moved to a given folder) remove_images <- function(img, files, del...
library(readr) library(dplyr) # Remove duplicate Admission IDs from TrackVia in the Utilizations table # Remove blank subscriber_id # Read in data util <- read.csv("utilization.csv") # Get duplicates util$dup <- duplicated(util$admission_id) | duplicated(util$admission_id, fromLast = TRUE) # Subset duplicates util_...
/utilization.R
no_license
CamdenCoalitionOfHealthcareProviders/database
R
false
false
831
r
library(readr) library(dplyr) # Remove duplicate Admission IDs from TrackVia in the Utilizations table # Remove blank subscriber_id # Read in data util <- read.csv("utilization.csv") # Get duplicates util$dup <- duplicated(util$admission_id) | duplicated(util$admission_id, fromLast = TRUE) # Subset duplicates util_...
#' An expert rule based system using Reduction Based on Significance #' #' @name CREA.RBS #' @description CREA-RBS is a rule reduction method for allocating a significance value to each rule in the system so that experts #' may select the rules that should be considered as preferable and understand the exact degree of ...
/R/CREARBS.R
no_license
datascienceumh/MachineLearning
R
false
false
6,242
r
#' An expert rule based system using Reduction Based on Significance #' #' @name CREA.RBS #' @description CREA-RBS is a rule reduction method for allocating a significance value to each rule in the system so that experts #' may select the rules that should be considered as preferable and understand the exact degree of ...
# usage: # R --slave --vanilla --file=ImpreciseDEASMAACCREfficienciesCLI_XMCDAv2.R --args "[inDirectory]" "[outDirectory]" rm(list=ls()) # tell R to use the rJava package and the RXMCDA3 package library(hitandrun) library(rJava) library(XMCDA3) # cf. http://stackoverflow.com/questions/1815606/rscript-determine-path...
/ImpreciseDEACCR/ImpreciseDEASMAACCREfficiencies/src/ImpreciseDEASMAACCREfficienciesCLI_XMCDAv2.R
no_license
alabijak/diviz_DEA
R
false
false
7,175
r
# usage: # R --slave --vanilla --file=ImpreciseDEASMAACCREfficienciesCLI_XMCDAv2.R --args "[inDirectory]" "[outDirectory]" rm(list=ls()) # tell R to use the rJava package and the RXMCDA3 package library(hitandrun) library(rJava) library(XMCDA3) # cf. http://stackoverflow.com/questions/1815606/rscript-determine-path...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/distributions.R \name{summary_gamma} \alias{summary_gamma} \title{Summary of a Gamma distribution} \usage{ summary_gamma(a, b, output = "list", ...) } \arguments{ \item{a,b}{Shape and rate parameters.} \item{output}{\code{"list"} to ...
/man/summary_gamma.Rd
no_license
stla/brr
R
false
false
655
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/distributions.R \name{summary_gamma} \alias{summary_gamma} \title{Summary of a Gamma distribution} \usage{ summary_gamma(a, b, output = "list", ...) } \arguments{ \item{a,b}{Shape and rate parameters.} \item{output}{\code{"list"} to ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/hlpr.R \name{matrixSwitch} \alias{matrixSwitch} \title{Switch that takes expression and results as vectors (helper.R)} \usage{ matrixSwitch(expression, ...) } \arguments{ \item{expression}{Expression vector} \item{...}{Cases and vectors of r...
/man/matrixSwitch.Rd
no_license
solavrov/hlpr
R
false
true
572
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/hlpr.R \name{matrixSwitch} \alias{matrixSwitch} \title{Switch that takes expression and results as vectors (helper.R)} \usage{ matrixSwitch(expression, ...) } \arguments{ \item{expression}{Expression vector} \item{...}{Cases and vectors of r...
#' @importFrom magrittr %>% Training <- R6::R6Class( "Training", public = list( #'@field points dataframe points = NULL, #' @description Constructor class initialize = function(width, height, amount){ x = sample(width,amount) y = sample(height,amount) points <- data.frame(x,y...
/training.R
no_license
dlotto/Learning-Neural-Networks
R
false
false
1,011
r
#' @importFrom magrittr %>% Training <- R6::R6Class( "Training", public = list( #'@field points dataframe points = NULL, #' @description Constructor class initialize = function(width, height, amount){ x = sample(width,amount) y = sample(height,amount) points <- data.frame(x,y...
# Fingerprinting worker script - running single chip enrichment option # Delay allows time to monitor process starting up print("preparing for script launch, 5s synch delay") Sys.sleep(5) # Read the genelist in genelist <- sampleset[[8]]; total <- length(genelist) # load contents of directory once # this used to be wit...
/Fingerprint running scripts/random_SCE_sq_parallel/random_SCE_parallel_h.R
no_license
hidelab/database-fingerprint-scripts
R
false
false
1,415
r
# Fingerprinting worker script - running single chip enrichment option # Delay allows time to monitor process starting up print("preparing for script launch, 5s synch delay") Sys.sleep(5) # Read the genelist in genelist <- sampleset[[8]]; total <- length(genelist) # load contents of directory once # this used to be wit...
### LOAD LIBRARIES ----------------------------------------------------------------------------------------- library("gplots") library("RColorBrewer") library("stringr") ### SET PATHS ---------------------------------------------------------------------------------------------- dir.wrk <- file.path("/Data/Raunak/proje...
/task/03_enrichment_analysis/scripts/02_02_compile_enrichment_data_kegg.R
permissive
raunakms/meso_pem
R
false
false
3,777
r
### LOAD LIBRARIES ----------------------------------------------------------------------------------------- library("gplots") library("RColorBrewer") library("stringr") ### SET PATHS ---------------------------------------------------------------------------------------------- dir.wrk <- file.path("/Data/Raunak/proje...
#' @title Chi square tests for symptom mapping #' #' @description #' Lesion to symptom mapping performed on a prepared matrix. #' The behavior must be a binary vector. #' Chi square tests are performed at each voxel. By default #' the Yates correction is performed, use \code{correct=FALSE} #' if you need to disable it....
/R/lsm_chisq.R
permissive
mbowren/LESYMAP
R
false
false
3,294
r
#' @title Chi square tests for symptom mapping #' #' @description #' Lesion to symptom mapping performed on a prepared matrix. #' The behavior must be a binary vector. #' Chi square tests are performed at each voxel. By default #' the Yates correction is performed, use \code{correct=FALSE} #' if you need to disable it....