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
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fwrite_fwf.R \name{fwrite_fwf} \alias{fwrite_fwf} \alias{fwrite_fwf,data.frame,character,StfwfSchema-method} \title{Fast write a fixed-width file.} \usage{ fwrite_fwf( data, filename, StfwfSchema, validate = FALSE, justify = "left",...
/man/fwrite_fwf.Rd
no_license
david-salgado/fastReadfwf
R
false
true
1,802
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fwrite_fwf.R \name{fwrite_fwf} \alias{fwrite_fwf} \alias{fwrite_fwf,data.frame,character,StfwfSchema-method} \title{Fast write a fixed-width file.} \usage{ fwrite_fwf( data, filename, StfwfSchema, validate = FALSE, justify = "left",...
library(qqvases) ### Name: qq_plot ### Title: Interactive QQ Plot ### Aliases: qq_plot ### ** Examples ## Not run: ##D qq_plot(rnorm(50)) ##D ##D qq_plot(rnorm(50), step=0.05, breaks="Sturges") ##D ##D if(require("MASS", quietly=TRUE)){ qq_plot(geyser$waiting) } ## End(Not run)
/data/genthat_extracted_code/qqvases/examples/qq_plot.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
289
r
library(qqvases) ### Name: qq_plot ### Title: Interactive QQ Plot ### Aliases: qq_plot ### ** Examples ## Not run: ##D qq_plot(rnorm(50)) ##D ##D qq_plot(rnorm(50), step=0.05, breaks="Sturges") ##D ##D if(require("MASS", quietly=TRUE)){ qq_plot(geyser$waiting) } ## End(Not run)
gg_circle <- function(r, xc, yc, color="black", fill=NA, ...) { x <- xc + r*cos(seq(0, pi, length.out=100)) ymax <- yc + r*sin(seq(0, pi, length.out=100)) ymin <- yc + r*sin(seq(0, -pi, length.out=100)) annotate("ribbon", x=x, ymin=ymin, ymax=ymax, color=color, fill=fill, ...) } square <- ggplot(data.frame(x=0:...
/Useful/PlotCircle.R
no_license
hkshu001/R_Learning
R
false
false
645
r
gg_circle <- function(r, xc, yc, color="black", fill=NA, ...) { x <- xc + r*cos(seq(0, pi, length.out=100)) ymax <- yc + r*sin(seq(0, pi, length.out=100)) ymin <- yc + r*sin(seq(0, -pi, length.out=100)) annotate("ribbon", x=x, ymin=ymin, ymax=ymax, color=color, fill=fill, ...) } square <- ggplot(data.frame(x=0:...
####This script serves to get overrepresented GO terms from DE (DESeq2) results ###reading options options(stringsAsFactors = F) ### graphical options #options(device='x11') #grDevices::X11.options(type='cairo') options(bitmapType='cairo') ###libraries require(plyr) require(reshape2) require(ggplot2) library(RColorBr...
/CBPD_phenanthrene_scripts/GO_enrichment.R
no_license
drozdovapb/EveEcyGlaDE
R
false
false
18,031
r
####This script serves to get overrepresented GO terms from DE (DESeq2) results ###reading options options(stringsAsFactors = F) ### graphical options #options(device='x11') #grDevices::X11.options(type='cairo') options(bitmapType='cairo') ###libraries require(plyr) require(reshape2) require(ggplot2) library(RColorBr...
#' findmass #' #' see if any features match a given mass, and whether they are plausibly M0 #' @details a convenience function to perform a targeted search of all feaures for a mass of interest. Also performs a crude plausibility check as to whether the matched feature could be M0, based on the assumption of approxim...
/R/findmass.R
no_license
inambioinfo/RAMClustR
R
false
false
3,313
r
#' findmass #' #' see if any features match a given mass, and whether they are plausibly M0 #' @details a convenience function to perform a targeted search of all feaures for a mass of interest. Also performs a crude plausibility check as to whether the matched feature could be M0, based on the assumption of approxim...
library(XLConnect) ### Name: col2idx ### Title: Converting Excel column names to indices ### Aliases: col2idx ### Keywords: utilities ### ** Examples col2idx(c("A", "BTG"))
/data/genthat_extracted_code/XLConnect/examples/col2idx.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
180
r
library(XLConnect) ### Name: col2idx ### Title: Converting Excel column names to indices ### Aliases: col2idx ### Keywords: utilities ### ** Examples col2idx(c("A", "BTG"))
rm(list = ls()) setwd("~/Desktop/Lab R-Geography ") #library(sf) library(tmap) library(dplyr) library(rgdal) #to import shapefiles library(broom) #to convert shapefiles into the data frame structure we need library(haven) library(ggmap) #EXAMPLE I: Downloading a file download.file("http://biogeo.ucdavis.edu/data/gadm2...
/exercies_polygons.R
no_license
marespadafor/drawingmaps
R
false
false
6,065
r
rm(list = ls()) setwd("~/Desktop/Lab R-Geography ") #library(sf) library(tmap) library(dplyr) library(rgdal) #to import shapefiles library(broom) #to convert shapefiles into the data frame structure we need library(haven) library(ggmap) #EXAMPLE I: Downloading a file download.file("http://biogeo.ucdavis.edu/data/gadm2...
trainsetp=trainset b=Sys.time() for (i in 1:Npermutation){ #permute trainset: #taking all permutation is impossible when we get more than 5 animals per group, so we sample one possibility trainsetp$groupingvar=sample (trainset$groupingvar) #create svm model: we tune only in one kerne...
/analysis/Rcode/multidimensional_analysis_perm_svm.R
permissive
dscun/HCS_analysis
R
false
false
1,374
r
trainsetp=trainset b=Sys.time() for (i in 1:Npermutation){ #permute trainset: #taking all permutation is impossible when we get more than 5 animals per group, so we sample one possibility trainsetp$groupingvar=sample (trainset$groupingvar) #create svm model: we tune only in one kerne...
## Models with simulated data joint_model_cov <- function(structured_data, unstructured_data, dat1, biasfield, resolution = c(10,10), biascov){ #packages library(INLA) library(reshape2) library(rgeos) library(fields) max_x <- max(biasfield$x) max_y <- max(biasfield$y) #preparation - mesh co...
/Run models joint covariate for bias.R
no_license
NERC-CEH/IOFFsimwork
R
false
false
5,761
r
## Models with simulated data joint_model_cov <- function(structured_data, unstructured_data, dat1, biasfield, resolution = c(10,10), biascov){ #packages library(INLA) library(reshape2) library(rgeos) library(fields) max_x <- max(biasfield$x) max_y <- max(biasfield$y) #preparation - mesh co...
RNGkind("Knuth-TAOCP") set.seed(0) runif(10) ### -> [ ## 0.627400767058134412, 0.354186671786010432, 0.989893430843949762, ## 0.862408143468201493, 0.662299204617739057, 0.077800422906875638, ## 0.145743910223245676, 0.811320250853896474, 0.346456802450120616, ## 0.791849832...
/src/lib/rng/knuth-taocp/__test__/fixture-generation/fixture-generaton.R
permissive
R-js/libRmath.js
R
false
false
1,865
r
RNGkind("Knuth-TAOCP") set.seed(0) runif(10) ### -> [ ## 0.627400767058134412, 0.354186671786010432, 0.989893430843949762, ## 0.862408143468201493, 0.662299204617739057, 0.077800422906875638, ## 0.145743910223245676, 0.811320250853896474, 0.346456802450120616, ## 0.791849832...
library(shiny) library(shinythemes) library(plotly) library(viridis) ghg <- read.csv('data/ghg.csv', na.strings = '.') names(ghg)[1] <- 'ccode' ui <- fluidPage(theme = shinytheme('cerulean'), titlePanel(h1("Coursera_JH Developing Data Products")), sidebarLayout( sidebarPanel(helpText('Cre...
/app.R
no_license
oscarba07/Coursera_JH_DDP
R
false
false
3,440
r
library(shiny) library(shinythemes) library(plotly) library(viridis) ghg <- read.csv('data/ghg.csv', na.strings = '.') names(ghg)[1] <- 'ccode' ui <- fluidPage(theme = shinytheme('cerulean'), titlePanel(h1("Coursera_JH Developing Data Products")), sidebarLayout( sidebarPanel(helpText('Cre...
rm(list=ls()) ############################## Download in R ##################################### classes<-c("factor","factor",rep("numeric",times=7)) temp <- tempfile() download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp) dat <- read.table(unz(temp, "household_p...
/plot1.R
no_license
vladmalkov/ExData_Plotting1
R
false
false
1,181
r
rm(list=ls()) ############################## Download in R ##################################### classes<-c("factor","factor",rep("numeric",times=7)) temp <- tempfile() download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp) dat <- read.table(unz(temp, "household_p...
## These functions will cache the result of inverting a square matrix to avoid ## doing unnecessary computation if the matrix needs to be inverted repeatedly ## This function will create a list of 3 functions to 1) get the values of a matrix ## 2) set the values of an inverted matrix and 3) get those values from a cac...
/cachematrix.R
no_license
89million/ProgrammingAssignment2
R
false
false
1,102
r
## These functions will cache the result of inverting a square matrix to avoid ## doing unnecessary computation if the matrix needs to be inverted repeatedly ## This function will create a list of 3 functions to 1) get the values of a matrix ## 2) set the values of an inverted matrix and 3) get those values from a cac...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/anglr-package.R \docType{package} \name{anglr-package} \alias{anglr-package} \title{Tidy tables for topological spatial data structures.} \description{ The 'anglr' package helps transcend the following general limitations: \itemize{ \item ...
/man/anglr-package.Rd
no_license
MilesMcBain/anglr
R
false
true
1,368
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/anglr-package.R \docType{package} \name{anglr-package} \alias{anglr-package} \title{Tidy tables for topological spatial data structures.} \description{ The 'anglr' package helps transcend the following general limitations: \itemize{ \item ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{Courses_F1} \alias{Courses_F1} \title{Dataset about KiteSurf} \format{ An object of class \code{list} of length 71. } \usage{ data(Courses_F1) } \description{ Dataset about KiteSurf } \keyword{datasets}
/man/Courses_F1.Rd
permissive
Nowaysis/F1Stats
R
false
true
309
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{Courses_F1} \alias{Courses_F1} \title{Dataset about KiteSurf} \format{ An object of class \code{list} of length 71. } \usage{ data(Courses_F1) } \description{ Dataset about KiteSurf } \keyword{datasets}
#' Return devtools metadata environment #' #' If the package was not loaded with devtools, returns \code{NULL}. #' #' @param name The name of a loaded package #' @examples #' dev_meta("stats") # NULL #' #' if (has_tests()) { #' # Load the test package in directory "testLoadHooks" #' load_all(devtest("testLoadHooks")) #...
/R/metadata.r
no_license
miraisolutions/devtools
R
false
false
1,073
r
#' Return devtools metadata environment #' #' If the package was not loaded with devtools, returns \code{NULL}. #' #' @param name The name of a loaded package #' @examples #' dev_meta("stats") # NULL #' #' if (has_tests()) { #' # Load the test package in directory "testLoadHooks" #' load_all(devtest("testLoadHooks")) #...
<html> <head> <meta name="TextLength" content="SENT_NUM:6, WORD_NUM:91"> </head> <body bgcolor="white"> <a href="#0" id="0">Residents took forecasters at their word when they warned of Hurricane Hugo's fury, and the low number of deaths from the powerful storm can be credited to this healthy respect, authorities said.<...
/DUC-Dataset/Summary_p100_R/D085.AP890925-0054.html.R
no_license
Angela7126/SLNSumEval
R
false
false
814
r
<html> <head> <meta name="TextLength" content="SENT_NUM:6, WORD_NUM:91"> </head> <body bgcolor="white"> <a href="#0" id="0">Residents took forecasters at their word when they warned of Hurricane Hugo's fury, and the low number of deaths from the powerful storm can be credited to this healthy respect, authorities said.<...
## The following are a pair of functions to cache the inverse of a ## matrix. ## makeCacheMatrix creates a matrix object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y){ x <<- y m <<-NULL } get <- function() x setinverse <- function(solve) m <<- s...
/cachematrix.R
no_license
bolognarossoblu/ProgrammingAssignment2
R
false
false
903
r
## The following are a pair of functions to cache the inverse of a ## matrix. ## makeCacheMatrix creates a matrix object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y){ x <<- y m <<-NULL } get <- function() x setinverse <- function(solve) m <<- s...
#' @title Convert Genotype Data #' #' @description Convert genotype data in various formats to sequoia's #' 1-column-per-marker format or Colony's 2-columns-per-marker format. #' #' @param InFile character string with name of genotype file to be converted. #' @param InData dataframe or matrix with genotypes to ...
/R/GenoConvert.R
no_license
cran/sequoia
R
false
false
18,446
r
#' @title Convert Genotype Data #' #' @description Convert genotype data in various formats to sequoia's #' 1-column-per-marker format or Colony's 2-columns-per-marker format. #' #' @param InFile character string with name of genotype file to be converted. #' @param InData dataframe or matrix with genotypes to ...
library(stringi) library(tm) library(gofastr) library(ggplot2) library(ggrepel) library(reshape2) library(RColorBrewer) library(qdap) library(qdapTools) library(RNewsflow) load(file = "Kitu/College/Junior Year/Extracurriculars/Data Science Research Internship/final_data.Rdata") # -------------- first d...
/Final Data Clean RN Non-Parsed/final_dataset_clean.R
no_license
Key2-Success/HeartBD2K
R
false
false
5,279
r
library(stringi) library(tm) library(gofastr) library(ggplot2) library(ggrepel) library(reshape2) library(RColorBrewer) library(qdap) library(qdapTools) library(RNewsflow) load(file = "Kitu/College/Junior Year/Extracurriculars/Data Science Research Internship/final_data.Rdata") # -------------- first d...
require(graphics) hdata <- read.csv("catalogCrossSell.csv", stringsAsFactors=FALSE) hdata2 <-subset(hdata, select=-c(CID,Health)) head(hdata2) h_pca2 = prcomp(hdata2) barplot(sapply(hdata2, var), horiz=T, las=1, cex.names=0.8) summary(h_pca2) biplot(h_pca2 , scale = TRUE , col = "black") plot(h_pca2 , type ...
/r_archive/machineLearning/rcode/code21.R
no_license
DavidHan008/lockdpwn
R
false
false
1,602
r
require(graphics) hdata <- read.csv("catalogCrossSell.csv", stringsAsFactors=FALSE) hdata2 <-subset(hdata, select=-c(CID,Health)) head(hdata2) h_pca2 = prcomp(hdata2) barplot(sapply(hdata2, var), horiz=T, las=1, cex.names=0.8) summary(h_pca2) biplot(h_pca2 , scale = TRUE , col = "black") plot(h_pca2 , type ...
library(DataComputing) source("util.R") #create scatter plots of white voter percentage vs proportion of votes trump_winloss <- trump_nums trump_names <- names(trump_winloss) trump_names[7] = "Young.Percentage" trump_names[10] = "White.Percentage" trump_names[22] = "College.Percentage" trump_names[30] = "Persons.Per.Ho...
/visualizations.R
no_license
ketkar/election
R
false
false
5,444
r
library(DataComputing) source("util.R") #create scatter plots of white voter percentage vs proportion of votes trump_winloss <- trump_nums trump_names <- names(trump_winloss) trump_names[7] = "Young.Percentage" trump_names[10] = "White.Percentage" trump_names[22] = "College.Percentage" trump_names[30] = "Persons.Per.Ho...
library(knitr) library(DEGreport) library(bcbioRNASeq) library(tidyverse) # Set seed for reproducibility set.seed(1454944673L) opts_chunk[["set"]]( autodep = TRUE, bootstrap.show.code = FALSE, cache = TRUE, cache.lazy = TRUE, dev = c("png", "pdf"), error = TRUE, fig.height = 10L, fig.r...
/inst/rmarkdown/shared/_setup.R
permissive
GeneticResources/bcbioRNASeq
R
false
false
621
r
library(knitr) library(DEGreport) library(bcbioRNASeq) library(tidyverse) # Set seed for reproducibility set.seed(1454944673L) opts_chunk[["set"]]( autodep = TRUE, bootstrap.show.code = FALSE, cache = TRUE, cache.lazy = TRUE, dev = c("png", "pdf"), error = TRUE, fig.height = 10L, fig.r...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FlexTablePublicAPI.R \name{setRowsColors} \alias{setRowsColors} \title{applies background colors to rows of a FlexTable} \usage{ setRowsColors(object, i, colors) } \arguments{ \item{object}{a \code{FlexTable} object} \item{i}{vector (integer...
/man/setRowsColors.Rd
no_license
hhy5277/ReporteRs
R
false
true
809
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FlexTablePublicAPI.R \name{setRowsColors} \alias{setRowsColors} \title{applies background colors to rows of a FlexTable} \usage{ setRowsColors(object, i, colors) } \arguments{ \item{object}{a \code{FlexTable} object} \item{i}{vector (integer...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cov.sym.data.table.R \name{cov} \alias{cov} \alias{cov.default} \alias{cov.sym.data.table} \title{Generic function for the covariance} \usage{ cov(x, ...) \method{cov}{default}(x, y = NULL, use = "everything", method = c("pearson", "kendal...
/man/cov.Rd
no_license
Frenchyy1/RSDA
R
false
true
1,553
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cov.sym.data.table.R \name{cov} \alias{cov} \alias{cov.default} \alias{cov.sym.data.table} \title{Generic function for the covariance} \usage{ cov(x, ...) \method{cov}{default}(x, y = NULL, use = "everything", method = c("pearson", "kendal...
## Paper figure 9 -- proportion of heroin deaths involving other opioids library(tidyverse) library(RColorBrewer) library(binom) source('./code/functions/helpers.R') mkdir_p('./report/paa_2017_paper/plots') d <- read.csv("./data/race_age_tc.csv") ## We need to reshape this later so it is easier to calculate the bound...
/report/paa_2017_paper/code/paper_figure_9.R
no_license
mkiang/opioid-mcd
R
false
false
7,618
r
## Paper figure 9 -- proportion of heroin deaths involving other opioids library(tidyverse) library(RColorBrewer) library(binom) source('./code/functions/helpers.R') mkdir_p('./report/paa_2017_paper/plots') d <- read.csv("./data/race_age_tc.csv") ## We need to reshape this later so it is easier to calculate the bound...
getData <- function () { data <- read.table('household_power_consumption.txt', header = TRUE, sep = ";", na.strings = '?') data <- rbind(subset(data, Date == '1/2/2007'), subset(data, Date == '2/2/2007')) data$Timestamp <- strptime(paste(data$Date, data$Time), '%d/%m/%Y %H:%M:%S') data } globalActivePowe...
/plot4.R
no_license
derekconjar/ExData_Plotting1
R
false
false
1,598
r
getData <- function () { data <- read.table('household_power_consumption.txt', header = TRUE, sep = ";", na.strings = '?') data <- rbind(subset(data, Date == '1/2/2007'), subset(data, Date == '2/2/2007')) data$Timestamp <- strptime(paste(data$Date, data$Time), '%d/%m/%Y %H:%M:%S') data } globalActivePowe...
#比例检验 #pwr.2p.test(h=,n=,sig.level=,power=) pwr.2p.test(h=ES.h(.65,.6),sig.level = .05,power=.9,alternative = "greater")
/9.8/2p.R
no_license
weidaoming/R
R
false
false
128
r
#比例检验 #pwr.2p.test(h=,n=,sig.level=,power=) pwr.2p.test(h=ES.h(.65,.6),sig.level = .05,power=.9,alternative = "greater")
#' @title Transpose a matrix on the remote nodes. #' @description See base::t() #' @param symbol a character, name of the object to transpose #' @param newobj a character, name of the new, transposed object #' @param async a logical, see datashield.aggregate #' @param wait a logical, see datashield.aggregate #' @para...
/R/dssT.R
no_license
IulianD/dsSwissKnifeClient
R
false
false
753
r
#' @title Transpose a matrix on the remote nodes. #' @description See base::t() #' @param symbol a character, name of the object to transpose #' @param newobj a character, name of the new, transposed object #' @param async a logical, see datashield.aggregate #' @param wait a logical, see datashield.aggregate #' @para...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/neptune_operations.R \name{neptune_describe_db_instances} \alias{neptune_describe_db_instances} \title{Returns information about provisioned instances, and supports pagination} \usage{ neptune_describe_db_instances( DBInstanceIdentifier = N...
/cran/paws.database/man/neptune_describe_db_instances.Rd
permissive
paws-r/paws
R
false
true
2,122
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/neptune_operations.R \name{neptune_describe_db_instances} \alias{neptune_describe_db_instances} \title{Returns information about provisioned instances, and supports pagination} \usage{ neptune_describe_db_instances( DBInstanceIdentifier = N...
##run fourth to put all data into useable formats for Split B library(tidyverse) library(data.table) ##list all files, both hc and pd, into an array file_list <- list.files(path="~/PG-400/data2/raw/") #Take a random sample of 20% set.seed(32) TestingNames <- sample(file_list) Split.i <- TestingNames[1:504] Split.ii ...
/dataProcessingSplitB4front.R
permissive
M1V0/PG-400
R
false
false
23,526
r
##run fourth to put all data into useable formats for Split B library(tidyverse) library(data.table) ##list all files, both hc and pd, into an array file_list <- list.files(path="~/PG-400/data2/raw/") #Take a random sample of 20% set.seed(32) TestingNames <- sample(file_list) Split.i <- TestingNames[1:504] Split.ii ...
' Quiz about Data type and vector operation ' # 1-1 movies = read.csv('http://www.stat.berkeley.edu/classes/s133/data/movies.txt', sep='|', stringsAsFactors=FALSE) sapply(movies, typeof) # 1-2 # method1: with strsplit movies$box.usd <- as.numeric(sapply(movies$box, ...
/tutorial/R/lec_R_basis/R_basis_DataTypes&VectorOperation_quiz.R
permissive
vashineyu/slides_and_others
R
false
false
1,125
r
' Quiz about Data type and vector operation ' # 1-1 movies = read.csv('http://www.stat.berkeley.edu/classes/s133/data/movies.txt', sep='|', stringsAsFactors=FALSE) sapply(movies, typeof) # 1-2 # method1: with strsplit movies$box.usd <- as.numeric(sapply(movies$box, ...
##Time Series Date Manipulation ##Install Packages## if(!require(lubridate)){install.packages("lubridate")};library("lubridate", lib.loc="~/R/win-library/3.4") #--------Setup Work Directory---------# setwd("File Directory") ##Set file directory getwd() ##Importing Data## iowa<-read.csv(file.choose(),header=T...
/TSA_DateManipulations/TSA_DateManipulation.R
no_license
Sayan-Pal585/Time-Series-Analysis
R
false
false
2,233
r
##Time Series Date Manipulation ##Install Packages## if(!require(lubridate)){install.packages("lubridate")};library("lubridate", lib.loc="~/R/win-library/3.4") #--------Setup Work Directory---------# setwd("File Directory") ##Set file directory getwd() ##Importing Data## iowa<-read.csv(file.choose(),header=T...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/Function-DailyPrecipitationSerie.r \docType{function} \name{DailyPrecipitationSerie} \alias{DailyPrecipitationSerie} \alias{DailyPrecipitationSerie-methods} \title{DailyPrecipitationSerie Constructor} \usage{ DailyPrecipitationSerie(p...
/man/DailyPrecipitationSerie.Rd
no_license
lucasvenez/prefann
R
false
false
920
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/Function-DailyPrecipitationSerie.r \docType{function} \name{DailyPrecipitationSerie} \alias{DailyPrecipitationSerie} \alias{DailyPrecipitationSerie-methods} \title{DailyPrecipitationSerie Constructor} \usage{ DailyPrecipitationSerie(p...
\name{Fahrenheit to Celsius} \alias{Fahrenheit to Celsius} \title{ Converts temperature units} \description{ Converts an input temperature from Fahrenheit to Celsius} \usage{ F_to_C(x) } \arguments{ \item{x}{a number} } \details{ } \value{ Value returned is a number with units in Celsius } \reference...
/TemperatureConverter/man/Fahrenheit to Celsius.Rd
no_license
zjones91/introtoRtake2
R
false
false
421
rd
\name{Fahrenheit to Celsius} \alias{Fahrenheit to Celsius} \title{ Converts temperature units} \description{ Converts an input temperature from Fahrenheit to Celsius} \usage{ F_to_C(x) } \arguments{ \item{x}{a number} } \details{ } \value{ Value returned is a number with units in Celsius } \reference...
# Quality assessment to compare differences in taxonomy among data sources # Jeffrey C. Oliver # jcoliver@email.arizona.edu # 2018-08-30 rm(list = ls()) ################################################################################ bioscan <- read.csv("data/BioScanData.csv") inaturalist <- read.csv("data/iNaturalis...
/scripts/taxonomy-comparison.R
permissive
jcoliver/bioscan
R
false
false
1,997
r
# Quality assessment to compare differences in taxonomy among data sources # Jeffrey C. Oliver # jcoliver@email.arizona.edu # 2018-08-30 rm(list = ls()) ################################################################################ bioscan <- read.csv("data/BioScanData.csv") inaturalist <- read.csv("data/iNaturalis...
GGEBiplot <- function (Data) { tclRequire("BWidget") ########### # Variables ########### optioncentering <- "2.Tester-Centered G+GE" optionscaling <- "0.No scaling" optionSVP <- "GH -(Column Metric Preserving)" datascaling <- c("0.No scaling", "1.Std Deviation (SD)") ...
/GGEBiplotGUI/R/GGEBiplot.R
no_license
ingted/R-Examples
R
false
false
71,377
r
GGEBiplot <- function (Data) { tclRequire("BWidget") ########### # Variables ########### optioncentering <- "2.Tester-Centered G+GE" optionscaling <- "0.No scaling" optionSVP <- "GH -(Column Metric Preserving)" datascaling <- c("0.No scaling", "1.Std Deviation (SD)") ...
f <- function(x, y) { z <- x + y g(z) } g <- function(x) { z <- round(x) h(z) } h <- function(x) { set.seed(1234) z <- rnorm(x) print(z) } options(error = recover) # enable debugging mode f(2, 3) f(2, -3) # enters debugging mode at this point ## type ## number - choose frame ## c - qui...
/r/learning/debug/recover.r
no_license
jk983294/math
R
false
false
424
r
f <- function(x, y) { z <- x + y g(z) } g <- function(x) { z <- round(x) h(z) } h <- function(x) { set.seed(1234) z <- rnorm(x) print(z) } options(error = recover) # enable debugging mode f(2, 3) f(2, -3) # enters debugging mode at this point ## type ## number - choose frame ## c - qui...
testlist <- list(id = NULL, id = NULL, booklet_id = c(8168473L, 2127314835L, 171177770L, -1942759639L, -1295127508L, 601253144L, -804651186L, 2094281728L, 860713787L, -971707632L, -1475044502L, 870040598L, -1182814578L, -1415711445L, 1901326755L, -1882837573L, 1340545259L, 1156041943L, 823641812L, -1106109928L, -10...
/dexterMST/inst/testfiles/is_person_booklet_sorted/AFL_is_person_booklet_sorted/is_person_booklet_sorted_valgrind_files/1615939078-test.R
no_license
akhikolla/updatedatatype-list1
R
false
false
826
r
testlist <- list(id = NULL, id = NULL, booklet_id = c(8168473L, 2127314835L, 171177770L, -1942759639L, -1295127508L, 601253144L, -804651186L, 2094281728L, 860713787L, -971707632L, -1475044502L, 870040598L, -1182814578L, -1415711445L, 1901326755L, -1882837573L, 1340545259L, 1156041943L, 823641812L, -1106109928L, -10...
## ----module, echo=FALSE, results="asis"---------------------------------- Module <- "DataO" cat(paste0("\\newcommand{\\Module}{", Module, "}")) ## ----setup, child="mycourse.Rnw"----------------------------------------- ## ----setup_options, include=FALSE---------------------------------------- library(knitr) lib...
/snippets/R/survivalguide-to-datascience/ch1/DataO.R
no_license
zedoul/air
R
false
false
16,679
r
## ----module, echo=FALSE, results="asis"---------------------------------- Module <- "DataO" cat(paste0("\\newcommand{\\Module}{", Module, "}")) ## ----setup, child="mycourse.Rnw"----------------------------------------- ## ----setup_options, include=FALSE---------------------------------------- library(knitr) lib...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{Briggs_2021} \alias{Briggs_2021} \title{Inferring local and crossborder transmission with human and mobility data, Kanunga District in Southwest Uganda (Briggs et al., 2019)} \format{ A list of multiple data objec...
/man/Briggs_2021.Rd
permissive
mrc-ide/SIMPLEGEN
R
false
true
1,376
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{Briggs_2021} \alias{Briggs_2021} \title{Inferring local and crossborder transmission with human and mobility data, Kanunga District in Southwest Uganda (Briggs et al., 2019)} \format{ A list of multiple data objec...
library(gapminder) library(dplyr) # Find median life expectancy and maximum GDP per capita in each year/continent combination gapminder %>% group_by(continent, year) %>% summarize(medianLifeExp = median(lifeExp), maxGdpPercap = max(gdpPercap))
/DCamp/Intro Tidyverse/Grouping Summarizing/Summarizing by two variables.R
no_license
shinichimatsuda/R_Training
R
false
false
249
r
library(gapminder) library(dplyr) # Find median life expectancy and maximum GDP per capita in each year/continent combination gapminder %>% group_by(continent, year) %>% summarize(medianLifeExp = median(lifeExp), maxGdpPercap = max(gdpPercap))
## Caching the Inverse of a Matrix: ## Matrix inversion is usually a costly computation and there may be some ## benefit to caching the inverse of a matrix rather than compute it repeatedly. ## Below are a pair of functions that are used to create a special object that ## stores a matrix and caches its inverse. ##...
/MatrixAssignmentweek3.R
no_license
ABANTAKM/ProgrammingAssignment2
R
false
false
2,455
r
## Caching the Inverse of a Matrix: ## Matrix inversion is usually a costly computation and there may be some ## benefit to caching the inverse of a matrix rather than compute it repeatedly. ## Below are a pair of functions that are used to create a special object that ## stores a matrix and caches its inverse. ##...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prepareData.R \name{prepareData} \alias{prepareData} \title{Prepare data for estimation} \usage{ prepareData(Y, W, X, match_on, trimming = NULL, model_options, M_matches, J_var_matches) } \arguments{ \item{Y}{A response vector (1 x n)} \it...
/man/prepareData.Rd
no_license
Crazyoumashu/multilevelMatching
R
false
true
2,013
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prepareData.R \name{prepareData} \alias{prepareData} \title{Prepare data for estimation} \usage{ prepareData(Y, W, X, match_on, trimming = NULL, model_options, M_matches, J_var_matches) } \arguments{ \item{Y}{A response vector (1 x n)} \it...
#' 1-D surface rainfall-runoff finite difference simulator. #' #' See Fortran procedure in `../src'. #' #' @param dx spatial step size (meters) of the numerical grid. #' @param nx number of cells. #' @param dt time step size (seconds). #' @param nt number of time steps to simulate. #' @param h0 #' initial flowdept...
/archive/runoff.R
no_license
anchored-inversion/client.R
R
false
false
10,549
r
#' 1-D surface rainfall-runoff finite difference simulator. #' #' See Fortran procedure in `../src'. #' #' @param dx spatial step size (meters) of the numerical grid. #' @param nx number of cells. #' @param dt time step size (seconds). #' @param nt number of time steps to simulate. #' @param h0 #' initial flowdept...
#' @title Class to complete the csv with the preprocessed instance and synsets #' @description Complete the csv with the preprocessed instance and synsets. #' @docType class #' @usage TeeCSVFromSynsetFeatureVectorPipe$new(propertyName = "", #' alwaysBeforeDeps = list(), #' ...
/content-preprocessorinr/pipes/TeeCSVFromSynsetFeatureVectorPipe.R
no_license
miferreiro/content-preprocessorinr
R
false
false
6,956
r
#' @title Class to complete the csv with the preprocessed instance and synsets #' @description Complete the csv with the preprocessed instance and synsets. #' @docType class #' @usage TeeCSVFromSynsetFeatureVectorPipe$new(propertyName = "", #' alwaysBeforeDeps = list(), #' ...
##' QGIS Algorithm provided by SAGA Raster values to points (randomly) (saga:rastervaluestopointsrandomly) ##' ##' @title QGIS algorithm Raster values to points (randomly) ##' ##' @param GRID `raster` - Grid. Path to a raster layer. ##' @param FREQ `number` - Frequency. A numeric value. ##' @param POINTS `vectorDestina...
/R/saga_rastervaluestopointsrandomly.R
permissive
VB6Hobbyst7/r_package_qgis
R
false
false
1,349
r
##' QGIS Algorithm provided by SAGA Raster values to points (randomly) (saga:rastervaluestopointsrandomly) ##' ##' @title QGIS algorithm Raster values to points (randomly) ##' ##' @param GRID `raster` - Grid. Path to a raster layer. ##' @param FREQ `number` - Frequency. A numeric value. ##' @param POINTS `vectorDestina...
pc.stable.backend = function(x, cluster = NULL, whitelist, blacklist, test, alpha, B, debug = FALSE) { nodes = names(x) nnodes = length(nodes) mb = structure(vector(length(nodes), mode = "list"), names = nodes) skeleton = subsets(nodes, 2) node.pairs = apply(skeleton, 1, function(x) list(arc = x, max....
/ombFast/R/pcalgo.R
no_license
kanyulongkkk/KtreeBN
R
false
false
4,880
r
pc.stable.backend = function(x, cluster = NULL, whitelist, blacklist, test, alpha, B, debug = FALSE) { nodes = names(x) nnodes = length(nodes) mb = structure(vector(length(nodes), mode = "list"), names = nodes) skeleton = subsets(nodes, 2) node.pairs = apply(skeleton, 1, function(x) list(arc = x, max....
# Random variables are numeric outcomes resulting from random processes. # An urn with 2 red beads and 3 blue beads beads <- rep(c("red", "blue"), times = c(2, 3)) # define random variable x to be 1 if blue, 0 otherwise x <- ifelse(sample(beads, 1) == "blue", 1, 0) # demonstrate that the random variable is different ...
/Probability/Sample models.R
no_license
yogeshwar1996/BasicsOfDataScience
R
false
false
2,667
r
# Random variables are numeric outcomes resulting from random processes. # An urn with 2 red beads and 3 blue beads beads <- rep(c("red", "blue"), times = c(2, 3)) # define random variable x to be 1 if blue, 0 otherwise x <- ifelse(sample(beads, 1) == "blue", 1, 0) # demonstrate that the random variable is different ...
# Copyright (c) 2016 Al Warren. All rights reserved. # Author: Al Warren # # This program is a solution to plot 1 of course project 1 # from the Coursera course Exploratory Data Analysis. # # Input data is from the “Individual household # electric power consumption Data Set” of the UC Irvine Machine # Learning Reposi...
/plot1.R
no_license
alwarren/ExData_Plotting1
R
false
false
1,210
r
# Copyright (c) 2016 Al Warren. All rights reserved. # Author: Al Warren # # This program is a solution to plot 1 of course project 1 # from the Coursera course Exploratory Data Analysis. # # Input data is from the “Individual household # electric power consumption Data Set” of the UC Irvine Machine # Learning Reposi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/blockseg-class.R \docType{methods} \name{predict,blockSeg-method} \alias{predict,blockSeg-method} \title{Predict method for a \code{blockSeg} object} \usage{ \S4method{predict}{blockSeg}(object, Y, lambda = NULL) } \arguments{ \item{object}{a...
/man/predict.Rd
no_license
jchiquet/blockseg
R
false
true
1,063
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/blockseg-class.R \docType{methods} \name{predict,blockSeg-method} \alias{predict,blockSeg-method} \title{Predict method for a \code{blockSeg} object} \usage{ \S4method{predict}{blockSeg}(object, Y, lambda = NULL) } \arguments{ \item{object}{a...
get_random_stacked <- function(stacked = "By Column", n_rows, n_cols, matrix_checks = NULL, Fillers = FALSE, checks = NULL, data =...
/R/utils_get_random_stacked.R
permissive
DidierMurilloF/FielDHub
R
false
false
1,963
r
get_random_stacked <- function(stacked = "By Column", n_rows, n_cols, matrix_checks = NULL, Fillers = FALSE, checks = NULL, data =...
# new plotting functions library(dplyr) library(reshape2) library(ggplot2) library(grid) library(gridExtra) plotEOCYElev <- function(zz, yrs, var, myTitle) { zz <- dplyr::filter(zz, Year %in% yrs, Variable == var) # compute the 10/50/90 and aggregate by start month zz <- zz %>% dplyr::group_by(StartMonth,...
/code/plottingFunctions.R
no_license
jshirey/Process-CRSS-Res
R
false
false
8,840
r
# new plotting functions library(dplyr) library(reshape2) library(ggplot2) library(grid) library(gridExtra) plotEOCYElev <- function(zz, yrs, var, myTitle) { zz <- dplyr::filter(zz, Year %in% yrs, Variable == var) # compute the 10/50/90 and aggregate by start month zz <- zz %>% dplyr::group_by(StartMonth,...
dim(pts) ## extract plot time series dat <- do.call("rbind", lapply(1:3, function(n) { plots <- suppressWarnings(shapefile(shp[n])) plots <- spTransform(plots, CRS = CRS("+init=epsg:4326")) nms <- sapply(strsplit(plots@data$Name, " "), "[[", 1) for (i in 1:nrow(plots@data)) { if (nchar(nms[i]) == 4) ...
/dfg_spp_exploratories/species_diversity/R/trials.R
no_license
environmentalinformatics-marburg/magic
R
false
false
2,296
r
dim(pts) ## extract plot time series dat <- do.call("rbind", lapply(1:3, function(n) { plots <- suppressWarnings(shapefile(shp[n])) plots <- spTransform(plots, CRS = CRS("+init=epsg:4326")) nms <- sapply(strsplit(plots@data$Name, " "), "[[", 1) for (i in 1:nrow(plots@data)) { if (nchar(nms[i]) == 4) ...
source("../global.R") dbInfo = read.table('../../dbInfo.txt') #### Define server logic required to summarize and view the selected dataset shinyServer(function(input, output) { values <- reactive({ con = dbConnect(MySQL(),dbname=toString(dbInfo[[1]]),user=toString(dbInfo[[2]]),password=toString(dbInfo[[3]]))...
/listtreat/server.R
no_license
stranda/unpak-shiny
R
false
false
745
r
source("../global.R") dbInfo = read.table('../../dbInfo.txt') #### Define server logic required to summarize and view the selected dataset shinyServer(function(input, output) { values <- reactive({ con = dbConnect(MySQL(),dbname=toString(dbInfo[[1]]),user=toString(dbInfo[[2]]),password=toString(dbInfo[[3]]))...
source('pamr.from.excel.R') source('pamr.train.R') source('pamr.cv.R') source('pamr.listgenes.R') source('pamr.plotcv.R') source('pamr.plotcen.R') #Read dataset khan.data <- pamr.from.excel(argv[0], sample.number, sample.labels=TRUE) lapply(khan.data, function(x) replace(x, is.nan(x), 0)) ##Train the classifier khan....
/PAM/PAM_genes.R
no_license
Pierangela00/Classification-and-survival-prediction-in-Diffuse-Large-B-cell-Lymphoma
R
false
false
609
r
source('pamr.from.excel.R') source('pamr.train.R') source('pamr.cv.R') source('pamr.listgenes.R') source('pamr.plotcv.R') source('pamr.plotcen.R') #Read dataset khan.data <- pamr.from.excel(argv[0], sample.number, sample.labels=TRUE) lapply(khan.data, function(x) replace(x, is.nan(x), 0)) ##Train the classifier khan....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Get_and_Filter_Regions.R \name{plotSDstats} \alias{plotSDstats} \title{Plot Heatmaps of Region Standard Deviation vs Features} \usage{ plotSDstats( regions, maxQuantile = 1, bins = 30, nBreaks = 4, legend.position = c(1.09, 0.9), ...
/man/plotSDstats.Rd
permissive
cemordaunt/comethyl
R
false
true
3,398
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Get_and_Filter_Regions.R \name{plotSDstats} \alias{plotSDstats} \title{Plot Heatmaps of Region Standard Deviation vs Features} \usage{ plotSDstats( regions, maxQuantile = 1, bins = 30, nBreaks = 4, legend.position = c(1.09, 0.9), ...
library(ape) testtree <- read.tree("3966_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="3966_0_unrooted.txt")
/codeml_files/newick_trees_processed/3966_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("3966_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="3966_0_unrooted.txt")
## The dataset file wasn't uploaded to the course by the time I started this ## so I made my own from Census Data. The zip_income dataset was from ## table S1903 from the Census Factfinder at: ## https://factfinder.census.gov/faces/nav/jsf/pages/index.xhtml zip_income <- read.csv("homework/zip_income.csv", stringsAsF...
/Homework7.R
no_license
oxenfree/R-Homework
R
false
false
4,252
r
## The dataset file wasn't uploaded to the course by the time I started this ## so I made my own from Census Data. The zip_income dataset was from ## table S1903 from the Census Factfinder at: ## https://factfinder.census.gov/faces/nav/jsf/pages/index.xhtml zip_income <- read.csv("homework/zip_income.csv", stringsAsF...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/billboarder-data.R \docType{data} \name{equilibre_mensuel} \alias{equilibre_mensuel} \title{Monthly supply / demand balance (january 2007 to june 2017)} \format{ A data frame with 126 rows and 5 variables: \describe{ \item{date}{Date} \it...
/man/equilibre_mensuel.Rd
permissive
dreamRs/billboarder
R
false
true
876
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/billboarder-data.R \docType{data} \name{equilibre_mensuel} \alias{equilibre_mensuel} \title{Monthly supply / demand balance (january 2007 to june 2017)} \format{ A data frame with 126 rows and 5 variables: \describe{ \item{date}{Date} \it...
#' @title Calculate number of coital acts per couple #' #' @param dat master data object #' @param at timestep #' @return 'dat' object with number of coital acts per couple added to 'social_discord_edgelist_df' table #' @details #' Takes the data.frame, discord_edgelist_df, returned from social_discord_edgelist_df and ...
/R/social_coital_acts.R
no_license
EvoNetHIV/Test_and_Treat
R
false
false
4,611
r
#' @title Calculate number of coital acts per couple #' #' @param dat master data object #' @param at timestep #' @return 'dat' object with number of coital acts per couple added to 'social_discord_edgelist_df' table #' @details #' Takes the data.frame, discord_edgelist_df, returned from social_discord_edgelist_df and ...
# chap08_VisualizationAnalysi [고급 시각화] ##################################### ## Chapter08. 고급시각화 분석 ##################################### # - lattice, latticeExtra, ggplot2, ggmap 패키지 ########################################## # 1. lattice 패키지 ######################################### # The Lattice Plotting System ...
/itwill/R-script/chap08_VisualizationAnalysi.R
no_license
kimjieun6307/itwill
R
false
false
16,202
r
# chap08_VisualizationAnalysi [고급 시각화] ##################################### ## Chapter08. 고급시각화 분석 ##################################### # - lattice, latticeExtra, ggplot2, ggmap 패키지 ########################################## # 1. lattice 패키지 ######################################### # The Lattice Plotting System ...
.inlabru_envir <- new.env(parent = emptyenv())
/R/0_inlabru_envir.R
no_license
cran/inlabru
R
false
false
47
r
.inlabru_envir <- new.env(parent = emptyenv())
# Enter your code here. Read input from STDIN. Print output to STDOUT time <- read.table(file = "stdin", header = F) t <-as.POSIXct(time[1,1], format = "%I:%M:%S%p") #The different ways of representing data stored behind the % cat(format(t, format = "%H:%M:%S"))
/Time Conversion [easy].R
no_license
fardeen-ahmed/HackerRank
R
false
false
264
r
# Enter your code here. Read input from STDIN. Print output to STDOUT time <- read.table(file = "stdin", header = F) t <-as.POSIXct(time[1,1], format = "%I:%M:%S%p") #The different ways of representing data stored behind the % cat(format(t, format = "%H:%M:%S"))
# Download and unzip data file download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", destfile="household.zip") unzip("household.zip") # Read the data and subset the first two months household <- read.table("household_power_consumption.txt",sep=";",header=TRUE,stringsAsF...
/plot4.R
no_license
azmdatasci/Assignment_plotting1
R
false
false
1,532
r
# Download and unzip data file download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", destfile="household.zip") unzip("household.zip") # Read the data and subset the first two months household <- read.table("household_power_consumption.txt",sep=";",header=TRUE,stringsAsF...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/test-functions.R \name{f0.rosenbrock2} \alias{f0.rosenbrock2} \title{f0.rosenbrock2} \usage{ f0.rosenbrock2(x1, x2) } \arguments{ \item{x1}{Parameter 1} \item{x2}{Parameter 2} } \description{ Two variable Rosenbrock function, where f(1,1) = ...
/man/f0.rosenbrock2.Rd
permissive
antonio-pgarcia/evoper
R
false
true
324
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/test-functions.R \name{f0.rosenbrock2} \alias{f0.rosenbrock2} \title{f0.rosenbrock2} \usage{ f0.rosenbrock2(x1, x2) } \arguments{ \item{x1}{Parameter 1} \item{x2}{Parameter 2} } \description{ Two variable Rosenbrock function, where f(1,1) = ...
# jo f. with thanks to: # http://is-r.tumblr.com/post/46821313005/to-plot-them-is-my-real-test # http://stackoverflow.com/questions/12918367/in-r-how-to-plot-with-a-png-as-background # http://students.washington.edu/mclarkso/documents/figure%20layout%20Ver1.R # http://georeferenced.wordpress.com/2013/01/15/rwordcloud/ ...
/tshirt_code.R
no_license
calycolor/t-shirt
R
false
false
1,630
r
# jo f. with thanks to: # http://is-r.tumblr.com/post/46821313005/to-plot-them-is-my-real-test # http://stackoverflow.com/questions/12918367/in-r-how-to-plot-with-a-png-as-background # http://students.washington.edu/mclarkso/documents/figure%20layout%20Ver1.R # http://georeferenced.wordpress.com/2013/01/15/rwordcloud/ ...
## ## this is the latest version library(aqp) library(soilDB) library(cluster) library(sharpshootR) library(reshape2) library(maps) library(colorspace) library(ragg) library(ggplot2) library(geofacet) library(treemapify) data("us.state.soils") data("munsell") # get KSSL + morph for all state soils x <- fetchKSSL(...
/AQP/state-soils/state-soil-colors.R
no_license
ncss-tech/ncss-tech.github.io
R
false
false
12,158
r
## ## this is the latest version library(aqp) library(soilDB) library(cluster) library(sharpshootR) library(reshape2) library(maps) library(colorspace) library(ragg) library(ggplot2) library(geofacet) library(treemapify) data("us.state.soils") data("munsell") # get KSSL + morph for all state soils x <- fetchKSSL(...
#hw_sim_noise source("hw_functions.R") source("precision_recall.R") library(randomForest) library(stats) library(MASS) library(Matrix) library(scatterplot3d) library(rerf) library(vegan) library(umap) library(pracma) library(rflann) noise_experiments_varying_dim<- function(experiment = "rotation", data = "sphere") { ...
/hw_flann_10e4_dim_noise.R
no_license
megh1241/experiments_URerF
R
false
false
2,249
r
#hw_sim_noise source("hw_functions.R") source("precision_recall.R") library(randomForest) library(stats) library(MASS) library(Matrix) library(scatterplot3d) library(rerf) library(vegan) library(umap) library(pracma) library(rflann) noise_experiments_varying_dim<- function(experiment = "rotation", data = "sphere") { ...
/Credit Australian Market/ProgramCreditAustralian.R
no_license
redisdead-pack/TD_ESILV_BernieThomas
R
false
false
3,706
r
#' user_data UI Function #' #' @description A shiny Module. #' #' @param id,input,output,session Internal parameters for {shiny}. #' #' @noRd #' #' @importFrom shiny NS tagList mod_user_data_ui <- function(id){ ns <- NS(id) tagList( #fluidRow( DT::DTOutput(ns("user_dribble")) %>% withSpinner(), #b...
/R/mod_user_data.R
permissive
lefkiospaikousis/testRemoteData
R
false
false
1,344
r
#' user_data UI Function #' #' @description A shiny Module. #' #' @param id,input,output,session Internal parameters for {shiny}. #' #' @noRd #' #' @importFrom shiny NS tagList mod_user_data_ui <- function(id){ ns <- NS(id) tagList( #fluidRow( DT::DTOutput(ns("user_dribble")) %>% withSpinner(), #b...
# --------------------------------------------------------------------- # Program: ThreeLatentMediationTest2.R # Author: Steven M. Boker # Date: Sun Mar 14 16:28:34 EDT 2010 # # This program tests variations on a latent mediation model # using a standard RAM. # # -------------------------------------------------...
/inst/models/passing/IntroSEM-ThreeLatentMediationTest1.R
permissive
trbrick/OpenMx
R
false
false
10,319
r
# --------------------------------------------------------------------- # Program: ThreeLatentMediationTest2.R # Author: Steven M. Boker # Date: Sun Mar 14 16:28:34 EDT 2010 # # This program tests variations on a latent mediation model # using a standard RAM. # # -------------------------------------------------...
# loading the dataset raw_df <- read.csv("household_power_consumption.txt", sep=";") # subsetting df for the 2007-02-01 and 2007-02-02 df <- subset(raw_df, Date=="1/2/2007" | Date=="2/2/2007") # Converting Global active power to numeric df[, "Global_active_power"] <- as.numeric(as.character(df$Global_active_...
/plot1.R
no_license
walidkaffel/ExData_Plotting1
R
false
false
497
r
# loading the dataset raw_df <- read.csv("household_power_consumption.txt", sep=";") # subsetting df for the 2007-02-01 and 2007-02-02 df <- subset(raw_df, Date=="1/2/2007" | Date=="2/2/2007") # Converting Global active power to numeric df[, "Global_active_power"] <- as.numeric(as.character(df$Global_active_...
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) shinyUI(fluidPage( # Application title titlePanel("European Option Price Calculator"), # Sidebar with a slider input for number...
/ui.R
no_license
jorgebarron/Dev-Data-Products
R
false
false
1,286
r
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) shinyUI(fluidPage( # Application title titlePanel("European Option Price Calculator"), # Sidebar with a slider input for number...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rNnetEventOD.R \name{rNnetEventOD} \alias{rNnetEventOD} \title{Generates random value according to a Poisson multinomial distribution needed to estimate the origin destination matrices.} \usage{ rNnetEventOD( n, dupFileName, regsFileNa...
/MobileNetworkDataSimulationTemplate/code/src/aggregation/man/rNnetEventOD.Rd
no_license
Lorencrack3/TFG-Lorenzo
R
false
true
2,064
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rNnetEventOD.R \name{rNnetEventOD} \alias{rNnetEventOD} \title{Generates random value according to a Poisson multinomial distribution needed to estimate the origin destination matrices.} \usage{ rNnetEventOD( n, dupFileName, regsFileNa...
"Qn.Exp.f" <- function(p,yc,delta,mu,sigma,lambda,zero=1e-4) { n <-length(yc) a <- -10; b <- 6; tol <- 0.001; maxit <- 20 f.res <- .Fortran("qnexp", p=as.double(p),yc=as.double(yc),delta=to.single(delta),n=to.integer(n),mu=as.double(mu), sigma=as.double(sigma),lambda=as.double(lambda),zero=as.double(zero),a=as.do...
/R/Qn.Exp.f.R
no_license
cran/robeth
R
false
false
454
r
"Qn.Exp.f" <- function(p,yc,delta,mu,sigma,lambda,zero=1e-4) { n <-length(yc) a <- -10; b <- 6; tol <- 0.001; maxit <- 20 f.res <- .Fortran("qnexp", p=as.double(p),yc=as.double(yc),delta=to.single(delta),n=to.integer(n),mu=as.double(mu), sigma=as.double(sigma),lambda=as.double(lambda),zero=as.double(zero),a=as.do...
xlimsGen <- function (chr_order, strand_order, start_v, end_v, chr_v){ xlims <- lapply(chr_order, function(chr_i, strand, start_v, end_v, chr_v){ if(strand[which(chr_i %in% chr_order)]){ c(min(start_v[chr_v == chr_i]), max(end_v[chr_v == chr_i])) } else { c(max(end_v[chr_v == chr_i]), ...
/R/functions/xlimsGen.R
no_license
seaman248/An_autosome_reconstructing
R
false
false
454
r
xlimsGen <- function (chr_order, strand_order, start_v, end_v, chr_v){ xlims <- lapply(chr_order, function(chr_i, strand, start_v, end_v, chr_v){ if(strand[which(chr_i %in% chr_order)]){ c(min(start_v[chr_v == chr_i]), max(end_v[chr_v == chr_i])) } else { c(max(end_v[chr_v == chr_i]), ...
## Since inverting a Matrix requires a lot of computation, it is easier to "cache" data in order to save a lot of computation power. ## This couple of functions allow you to create a "matrix" get its inverse and to save it for future calculations. ## If the program doesn't find the cached matrix, it will get its invers...
/cachematrix.R
no_license
PaoloLuciano/ProgrammingAssignment2
R
false
false
1,327
r
## Since inverting a Matrix requires a lot of computation, it is easier to "cache" data in order to save a lot of computation power. ## This couple of functions allow you to create a "matrix" get its inverse and to save it for future calculations. ## If the program doesn't find the cached matrix, it will get its invers...
setwd("D:/Eigene Dateien/Dokumente/GitHub/GeoData/2017/slides") library(knitr) purl("ggmap.Rmd") purl("maps.Rmd") purl("maptools.Rmd") purl("polygonSources.Rmd") purl("OpenStreetMap.Rmd") purl("Matching.Rmd") purl("spplot.Rmd")
/2017/rcode/RcodeErzeugen.R
no_license
Japhilko/GeoData
R
false
false
236
r
setwd("D:/Eigene Dateien/Dokumente/GitHub/GeoData/2017/slides") library(knitr) purl("ggmap.Rmd") purl("maps.Rmd") purl("maptools.Rmd") purl("polygonSources.Rmd") purl("OpenStreetMap.Rmd") purl("Matching.Rmd") purl("spplot.Rmd")
\name{mrw-package} \alias{mrw-package} \alias{mrw} \docType{package} \title{Multistate Random Walks} \description{ A collection of functions to post-process and analyze multistate random walk models of animal movement which were fit in JAGS, as well as the fitted models for the example data sets in the paper. } \detai...
/.svn/pristine/de/de5d8095a550998af817fe1551b7ab3065a5542c.svn-base
no_license
xiang-chen-git/ecomove
R
false
false
869
\name{mrw-package} \alias{mrw-package} \alias{mrw} \docType{package} \title{Multistate Random Walks} \description{ A collection of functions to post-process and analyze multistate random walk models of animal movement which were fit in JAGS, as well as the fitted models for the example data sets in the paper. } \detai...
library(doParallel) library(smaa) library(hitandrun) library(parallel) source('lib/partition.points.R') source('lib/plane.R') source('lib/hyperplane.sample.bounding.R') source('lib/hyperplane.sample.shakeandbake.R') comp.uc <- function(nalts, stopping) { norm <- log2(nalts) # bits of information, choice problem ...
/elicitation/lib/code.R
no_license
tommite/pubs-code
R
false
false
5,724
r
library(doParallel) library(smaa) library(hitandrun) library(parallel) source('lib/partition.points.R') source('lib/plane.R') source('lib/hyperplane.sample.bounding.R') source('lib/hyperplane.sample.shakeandbake.R') comp.uc <- function(nalts, stopping) { norm <- log2(nalts) # bits of information, choice problem ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pcause.R \name{pcause} \alias{pcause} \title{Compute the bootstrap probability of correct causal direction.} \usage{ pcause(x, y, n999 = 999) } \arguments{ \item{x}{{Vector of x data}} \item{y}{{Vector of y data}} \item{n999}{{...
/man/pcause.Rd
no_license
Srisai85/generalCorr
R
false
true
1,976
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pcause.R \name{pcause} \alias{pcause} \title{Compute the bootstrap probability of correct causal direction.} \usage{ pcause(x, y, n999 = 999) } \arguments{ \item{x}{{Vector of x data}} \item{y}{{Vector of y data}} \item{n999}{{...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{beregn_kredsmandater} \alias{beregn_kredsmandater} \title{Beregner kredsmandater} \usage{ beregn_kredsmandater(storkreds_votes, kredsmandater) } \arguments{ \item{storkreds_votes}{stemmer fordelt på storkredse} \item{kredsm...
/man/beregn_kredsmandater.Rd
no_license
mikkelkrogsholm/mandatfordeling
R
false
true
412
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{beregn_kredsmandater} \alias{beregn_kredsmandater} \title{Beregner kredsmandater} \usage{ beregn_kredsmandater(storkreds_votes, kredsmandater) } \arguments{ \item{storkreds_votes}{stemmer fordelt på storkredse} \item{kredsm...
library(caret) library(pROC) library(e1071) library(preprocessCore) library(kknn) library(fastAdaboost) library(limma) options(stringsAsFactors = F) set.seed(333) #path <- "insert path here" path <- "C:/Users/viche/Desktop/vc/code/foru" pt6613 <- read.table(paste(path, "/GSE6613_phtype.tsv", sep="")) gt6613 <- read....
/parkscriptMain.R
no_license
vc64/parkinsonsML
R
false
false
9,596
r
library(caret) library(pROC) library(e1071) library(preprocessCore) library(kknn) library(fastAdaboost) library(limma) options(stringsAsFactors = F) set.seed(333) #path <- "insert path here" path <- "C:/Users/viche/Desktop/vc/code/foru" pt6613 <- read.table(paste(path, "/GSE6613_phtype.tsv", sep="")) gt6613 <- read....
###################################################################### # Goal is described in CompetitionDescription.pdf # For the category # Object_Type # want to find features to help distinguish between # Base Salary/Compensation # NO_LABEL # Other Compensation/Stipend # Supplies/Materials # the given expenditure ...
/RefineObject/UpdateObjectFeatures.R
no_license
mkeysman/EdClassification
R
false
false
5,412
r
###################################################################### # Goal is described in CompetitionDescription.pdf # For the category # Object_Type # want to find features to help distinguish between # Base Salary/Compensation # NO_LABEL # Other Compensation/Stipend # Supplies/Materials # the given expenditure ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/collections.R \name{silent_library} \alias{silent_library} \title{Silently add packages} \usage{ silent_library(packages) } \arguments{ \item{packages}{character vector of package names} } \description{ Load packages without any info returned...
/man/silent_library.Rd
no_license
MalteThodberg/ThodbergMisc
R
false
true
417
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/collections.R \name{silent_library} \alias{silent_library} \title{Silently add packages} \usage{ silent_library(packages) } \arguments{ \item{packages}{character vector of package names} } \description{ Load packages without any info returned...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cognitoidentityprovider_operations.R \name{cognitoidentityprovider_admin_list_user_auth_events} \alias{cognitoidentityprovider_admin_list_user_auth_events} \title{Lists a history of user activity and any risks detected as part of Amazon Cogni...
/cran/paws.security.identity/man/cognitoidentityprovider_admin_list_user_auth_events.Rd
permissive
TWarczak/paws
R
false
true
2,022
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cognitoidentityprovider_operations.R \name{cognitoidentityprovider_admin_list_user_auth_events} \alias{cognitoidentityprovider_admin_list_user_auth_events} \title{Lists a history of user activity and any risks detected as part of Amazon Cogni...
#' Deploy a production-ready predictive RandomForest model #' #' @description This step allows one to #' \itemize{ #' \item Load a saved model from \code{\link{RandomForestDevelopment}} #' \item Run the model against test data to generate predictions #' \item Push these predictions to SQL Server #' } #' @docType class ...
/R/random-forest-deployment.R
permissive
DokottaBYO/healthcareai-r
R
false
false
17,393
r
#' Deploy a production-ready predictive RandomForest model #' #' @description This step allows one to #' \itemize{ #' \item Load a saved model from \code{\link{RandomForestDevelopment}} #' \item Run the model against test data to generate predictions #' \item Push these predictions to SQL Server #' } #' @docType class ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/preprocessing.R \name{generator_next} \alias{generator_next} \title{Retreive the next item from a generator} \usage{ generator_next(generator, completed = NULL) } \arguments{ \item{generator}{Generator} \item{completed}{Sentinel value to ret...
/man/generator_next.Rd
no_license
rdrr1990/keras
R
false
true
643
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/preprocessing.R \name{generator_next} \alias{generator_next} \title{Retreive the next item from a generator} \usage{ generator_next(generator, completed = NULL) } \arguments{ \item{generator}{Generator} \item{completed}{Sentinel value to ret...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GRANonGRAN.R \name{RepoToList} \alias{RepoToList} \title{Transform a GRANRepository object into a list} \usage{ RepoToList(repo) } \arguments{ \item{repo}{repository} } \value{ a list suitable for use with RepoFromList } \description{ Utility...
/man/RepoToList.Rd
no_license
mkearney/gRAN
R
false
true
456
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GRANonGRAN.R \name{RepoToList} \alias{RepoToList} \title{Transform a GRANRepository object into a list} \usage{ RepoToList(repo) } \arguments{ \item{repo}{repository} } \value{ a list suitable for use with RepoFromList } \description{ Utility...
# -------------------------------------- # Author: Andreas Alfons # Erasmus Universiteit Rotterdam # -------------------------------------- #' @export coef.ladlasso <- function(object, zeros = TRUE, tol = .Machine$double.eps^0.5, ...) { ## extract coefficients coef <- object$coeffici...
/R/coef.R
no_license
aalfons/perryExamples
R
false
false
971
r
# -------------------------------------- # Author: Andreas Alfons # Erasmus Universiteit Rotterdam # -------------------------------------- #' @export coef.ladlasso <- function(object, zeros = TRUE, tol = .Machine$double.eps^0.5, ...) { ## extract coefficients coef <- object$coeffici...
# api de datos economicos # @elcontrafactual # librerias library(httr) library(jsonlite) library(rjson) library(lubridate) # pib url <- 'https://www.inegi.org.mx/app/api/indicadores/desarrolladores/jsonxml/INDICATOR/493621/es/0700/false/BIE/2.0/dafd0053-9a71-1cb4-f58d-4a7071445df0?type=json' respuesta <- GET(url) (da...
/inegi_api.R
no_license
iamarin/api_economico
R
false
false
818
r
# api de datos economicos # @elcontrafactual # librerias library(httr) library(jsonlite) library(rjson) library(lubridate) # pib url <- 'https://www.inegi.org.mx/app/api/indicadores/desarrolladores/jsonxml/INDICATOR/493621/es/0700/false/BIE/2.0/dafd0053-9a71-1cb4-f58d-4a7071445df0?type=json' respuesta <- GET(url) (da...
/Assignment5_2.R
no_license
subasish/Statistical-Computing-Course
R
false
false
402
r
Dtable <- function(Dmatrix, PointType = NULL, PointWeight = NULL) { # Dmatrix must be a distance matrix if (is.matrix(Dmatrix)) { if (nrow(Dmatrix) != ncol(Dmatrix)) stop("Dmatrix should be a square matrix.") if (any(is.na(Dmatrix))) stop("NAs are not allowed in the distance matrix.") ...
/R/Dtable.R
no_license
EricMarcon/dbmss
R
false
false
2,104
r
Dtable <- function(Dmatrix, PointType = NULL, PointWeight = NULL) { # Dmatrix must be a distance matrix if (is.matrix(Dmatrix)) { if (nrow(Dmatrix) != ncol(Dmatrix)) stop("Dmatrix should be a square matrix.") if (any(is.na(Dmatrix))) stop("NAs are not allowed in the distance matrix.") ...
library(gridExtra) library(ggrepel) library(ggplot2) library(scales) library(ggtext) library(gplots) library(argparser, quietly=TRUE) ## Create a parser p <- arg_parser("chunk size") ## Add command line arguments p <- add_argument(p, "--st", help="survival type") p <- add_argument(p, "--chunkN", help="chunk N") p <- a...
/v2/spladder_pancox.R
no_license
buzhizhang121/OncoSplicing
R
false
false
7,709
r
library(gridExtra) library(ggrepel) library(ggplot2) library(scales) library(ggtext) library(gplots) library(argparser, quietly=TRUE) ## Create a parser p <- arg_parser("chunk size") ## Add command line arguments p <- add_argument(p, "--st", help="survival type") p <- add_argument(p, "--chunkN", help="chunk N") p <- a...
#' Automatically detect variables from an Mplus model object #' #' This is a function to automatically detect the variables used in an #' Mplus model object. #' #' #' @param object An Mplus model object from \code{mplusObject}.#' #' @return A vector of variables from the R dataset to use. #' @author Joshua F. Wiley <jw...
/R/mplus.R
no_license
ryanji/MplusAutomation
R
false
false
55,323
r
#' Automatically detect variables from an Mplus model object #' #' This is a function to automatically detect the variables used in an #' Mplus model object. #' #' #' @param object An Mplus model object from \code{mplusObject}.#' #' @return A vector of variables from the R dataset to use. #' @author Joshua F. Wiley <jw...
library(testthat) library(mongopipe) test_check("mongopipe")
/tests/testthat.R
no_license
cran/mongopipe
R
false
false
63
r
library(testthat) library(mongopipe) test_check("mongopipe")
################################################################################ ### R script to compare several conditions with the SARTools and DESeq2 packages ### Hugo Varet ### March 20th, 2018 ### designed to be executed with SARTools 1.6.6 ##########################################################################...
/SARTools.DESeq2.transcripts.batch/Julie_genes_SARTools_DESeq2.batch.r
permissive
jfberhane/RNASeqProject
R
false
false
6,207
r
################################################################################ ### R script to compare several conditions with the SARTools and DESeq2 packages ### Hugo Varet ### March 20th, 2018 ### designed to be executed with SARTools 1.6.6 ##########################################################################...
## The functions below are used to compute and cache the inverse of a matrix ## makeCacheMatrix creates a list containing a function to ## 1. set the value of the matrix ## 2. get the value of the matrix ## 3. set the value of the matrix inverse ## 4. get the value of the matrix inverse makeCacheMatrix <- function(x ...
/cachematrix.R
no_license
Eamonnol1981/ProgrammingAssignment2
R
false
false
1,437
r
## The functions below are used to compute and cache the inverse of a matrix ## makeCacheMatrix creates a list containing a function to ## 1. set the value of the matrix ## 2. get the value of the matrix ## 3. set the value of the matrix inverse ## 4. get the value of the matrix inverse makeCacheMatrix <- function(x ...
# factor numeric -------------------------------------------------------------- as.numeric.factor <- function(x) {as.numeric(levels(x))[x]} # Panels with correlation ------------------------------------------------- pairs.panels.new = function (x, smooth = TRUE, scale = FALSE, density = TRUE, ellipses = TRUE, ...
/scripts/functions/fun.panel.R
no_license
AnneOkk/psyCorona-Analysis
R
false
false
10,161
r
# factor numeric -------------------------------------------------------------- as.numeric.factor <- function(x) {as.numeric(levels(x))[x]} # Panels with correlation ------------------------------------------------- pairs.panels.new = function (x, smooth = TRUE, scale = FALSE, density = TRUE, ellipses = TRUE, ...