content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
library(dplyr)
library(lubridate)
setwd("C:/Users/root/documents/coursera/exploratory_data_analysis/project2/")
## This first line will likely take a few seconds. Be patient!
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
# Aggregate by sum the total emissions by year
aggTotal... | /plot1.R | no_license | minuteman1994/ExData_Plotting2 | R | false | false | 613 | r | library(dplyr)
library(lubridate)
setwd("C:/Users/root/documents/coursera/exploratory_data_analysis/project2/")
## This first line will likely take a few seconds. Be patient!
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
# Aggregate by sum the total emissions by year
aggTotal... |
# reads in a folder with TE counts from the Hammel TETranscripts tools
create_te_count_table = function(feature_count_folder, suffix = ".Aligned.sorted.out.bam",prefix = ""){
library(data.table)
# feature counts gives you feature coutns and summariues, given a folder name get a list of files that don't contain
... | /create_te_count_table.R | no_license | frattalab/helpful_scripts | R | false | false | 1,501 | r | # reads in a folder with TE counts from the Hammel TETranscripts tools
create_te_count_table = function(feature_count_folder, suffix = ".Aligned.sorted.out.bam",prefix = ""){
library(data.table)
# feature counts gives you feature coutns and summariues, given a folder name get a list of files that don't contain
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diversity.r
\name{diversity}
\alias{diversity}
\title{Compute a simple measure of diversity of regions}
\usage{
diversity(mat, RCA = FALSE)
}
\arguments{
\item{mat}{An incidence matrix with regions in rows and industries in columns}
\item{RC... | /man/diversity.Rd | no_license | PABalland/EconGeo | R | false | true | 1,707 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diversity.r
\name{diversity}
\alias{diversity}
\title{Compute a simple measure of diversity of regions}
\usage{
diversity(mat, RCA = FALSE)
}
\arguments{
\item{mat}{An incidence matrix with regions in rows and industries in columns}
\item{RC... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary.OBREresult.R
\name{summary.OBREresult}
\alias{summary.OBREresult}
\title{Function that summarize the results contained in an OBREresult object.}
\usage{
\method{summary}{OBREresult}(object)
}
\arguments{
\item{object}{The OBR... | /man/summary.OBREresult.Rd | no_license | cran/OBRE | R | false | true | 1,155 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary.OBREresult.R
\name{summary.OBREresult}
\alias{summary.OBREresult}
\title{Function that summarize the results contained in an OBREresult object.}
\usage{
\method{summary}{OBREresult}(object)
}
\arguments{
\item{object}{The OBR... |
Sys.time()
##############################################################################
# Test arguments
##############################################################################
prefix='23_01_pca1_cl20_'
outdir='../carsten_cytof/PD1_project/CK_2016-06-23_01/080_expression_auto'
path_data='../carsten_cytof... | /Nowicka2017/04_expression_calculate.R | no_license | yhoang/drfz | R | false | false | 5,138 | r |
Sys.time()
##############################################################################
# Test arguments
##############################################################################
prefix='23_01_pca1_cl20_'
outdir='../carsten_cytof/PD1_project/CK_2016-06-23_01/080_expression_auto'
path_data='../carsten_cytof... |
library(secr)
### Name: deviance
### Title: Deviance of fitted secr model and residual degrees of freedom
### Aliases: deviance df.residual deviance.secr df.residual.secr
### Keywords: models
### ** Examples
deviance(secrdemo.0)
df.residual(secrdemo.0)
| /data/genthat_extracted_code/secr/examples/deviance.secr.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 262 | r | library(secr)
### Name: deviance
### Title: Deviance of fitted secr model and residual degrees of freedom
### Aliases: deviance df.residual deviance.secr df.residual.secr
### Keywords: models
### ** Examples
deviance(secrdemo.0)
df.residual(secrdemo.0)
|
library(glmnet)
mydata = read.table("./TrainingSet/LassoBIC/autonomic_ganglia.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.6,family="gaussian",standardize=TRUE)
sink('./Model/EN/Lasso/autonomic_ganglia/autono... | /Model/EN/Lasso/autonomic_ganglia/autonomic_ganglia_067.R | no_license | leon1003/QSMART | R | false | false | 383 | r | library(glmnet)
mydata = read.table("./TrainingSet/LassoBIC/autonomic_ganglia.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.6,family="gaussian",standardize=TRUE)
sink('./Model/EN/Lasso/autonomic_ganglia/autono... |
% Generated by r6-generator-maven-plugin: do not edit by hand
\name{\%>\%}
\alias{\%>\%}
\title{Pipe operator}
\usage{
lhs \%>\% rhs
}
\arguments{
\item{lhs}{A value or the magrittr placeholder.}
\item{rhs}{A function call using the magrittr semantics.}
}
\value{
The result of calling `rhs(lhs)`.
}
\description{
See \... | /man/pipe.Rd | permissive | terminological/roogledocs | R | false | false | 398 | rd | % Generated by r6-generator-maven-plugin: do not edit by hand
\name{\%>\%}
\alias{\%>\%}
\title{Pipe operator}
\usage{
lhs \%>\% rhs
}
\arguments{
\item{lhs}{A value or the magrittr placeholder.}
\item{rhs}{A function call using the magrittr semantics.}
}
\value{
The result of calling `rhs(lhs)`.
}
\description{
See \... |
################################
### Create generic functions ###
################################
#' Instantiate a reference object
#'
#' @description This is a generic function used to retrieve data from a
#' reference object (such as a \code{\link[LazyMatrix]{LazyMatrix-class}}) in
#' its base form (e.g., a \code{\... | /R/GenericMethods.R | no_license | MPCary/LazyMatrix | R | false | false | 1,579 | r | ################################
### Create generic functions ###
################################
#' Instantiate a reference object
#'
#' @description This is a generic function used to retrieve data from a
#' reference object (such as a \code{\link[LazyMatrix]{LazyMatrix-class}}) in
#' its base form (e.g., a \code{\... |
##################################################
## Project: MDT Analysis
## Script purpose: Survey Analysis
## Date: 2019-01-25
## Author: Rustom Ichhaporia - rustomi2@illinois.edu
## Author: Diego Zara - dgomezara@u.northwestern.edu
##################################################
load("data_R/03_ergm.RData")
li... | /code/04_experimentation.R | no_license | rustom/complex-social-networks | R | false | false | 563 | r | ##################################################
## Project: MDT Analysis
## Script purpose: Survey Analysis
## Date: 2019-01-25
## Author: Rustom Ichhaporia - rustomi2@illinois.edu
## Author: Diego Zara - dgomezara@u.northwestern.edu
##################################################
load("data_R/03_ergm.RData")
li... |
setwd("~/SELECT ERASMUS MUNDUS/ENERBYTE- Thesis&internship/THESIS - Enerbyte/Chapter 2. Case study Data analysis/R for Tesi/test_01_tesi")
source("read_dt.R")
test1<-read_dt(112802)
library(xts)
###prova 1 --> works WELL!!
partim<-as.character(c(test1$datetime))
partim1<-as.POSIXct(partim)
str(partim1)
andale... | /R scripts/script_04.1_BO_solve gen-feb_probl.R | no_license | josepotal/master-thesis--clustering-energy-profiles | R | false | false | 3,545 | r | setwd("~/SELECT ERASMUS MUNDUS/ENERBYTE- Thesis&internship/THESIS - Enerbyte/Chapter 2. Case study Data analysis/R for Tesi/test_01_tesi")
source("read_dt.R")
test1<-read_dt(112802)
library(xts)
###prova 1 --> works WELL!!
partim<-as.character(c(test1$datetime))
partim1<-as.POSIXct(partim)
str(partim1)
andale... |
# Exercise 4: DPLYR and flights data
# Install the nycflights13 package and read it in. Require the dplyr package
# install.packages("nycflights13")
library(nycflights13)
library(dplyr)
# The data.frame flights should now be accessible to you. View it,
# and get some basic information about the number of rows/colu... | /exercise-4/exercise.R | permissive | mew34-1534672/m11-dplyr | R | false | false | 2,135 | r | # Exercise 4: DPLYR and flights data
# Install the nycflights13 package and read it in. Require the dplyr package
# install.packages("nycflights13")
library(nycflights13)
library(dplyr)
# The data.frame flights should now be accessible to you. View it,
# and get some basic information about the number of rows/colu... |
library(Seurat)
library(dplyr)
library(SingleR)
setSeurat <- function(dirpath, name, projectName){
name.data <- Read10X(data.dir = dirpath)
name <- CreateSeuratObject(raw.data = name.data, project = projectName, min.cells = 3, min.genes = 200)
name@meta.data$expt <- projectName
name.mito <- grep(pattern = "mt-"... | /ReadProcessData.R | no_license | cuict/Schlegel_et_al_core_analysis | R | false | false | 4,159 | r | library(Seurat)
library(dplyr)
library(SingleR)
setSeurat <- function(dirpath, name, projectName){
name.data <- Read10X(data.dir = dirpath)
name <- CreateSeuratObject(raw.data = name.data, project = projectName, min.cells = 3, min.genes = 200)
name@meta.data$expt <- projectName
name.mito <- grep(pattern = "mt-"... |
#r = getOption("repos")
#r["CRAN"] = "http://cran.us.r-project.org"
#options(repos = r)
#install.packages("DescTools", verbose = FALSE, quiet = TRUE)
suppressPackageStartupMessages(library(DescTools))
name <- "Eshaan"
email <- "eshaan.nex@gmail.com"
slack_username <- "@eshaan "
biostack <- "drug discovery"
t... | /Stage_0_Eshaan.R | no_license | Bhushan-Wagh025/einstein | R | false | false | 526 | r | #r = getOption("repos")
#r["CRAN"] = "http://cran.us.r-project.org"
#options(repos = r)
#install.packages("DescTools", verbose = FALSE, quiet = TRUE)
suppressPackageStartupMessages(library(DescTools))
name <- "Eshaan"
email <- "eshaan.nex@gmail.com"
slack_username <- "@eshaan "
biostack <- "drug discovery"
t... |
print.summary.JMbayes <- function (x, digits = max(4, getOption("digits") - 4),
printKnots = FALSE, ...) {
if (!inherits(x, "summary.JMbayes"))
stop("Use only with 'summary.JMbayes' objects.\n")
cat("\nCall:\n", printCall(x$call), "\n\n", sep = "")
cat("Data Descri... | /R/print.summary.JMbayes.R | no_license | drizopoulos/JMbayes | R | false | false | 4,728 | r | print.summary.JMbayes <- function (x, digits = max(4, getOption("digits") - 4),
printKnots = FALSE, ...) {
if (!inherits(x, "summary.JMbayes"))
stop("Use only with 'summary.JMbayes' objects.\n")
cat("\nCall:\n", printCall(x$call), "\n\n", sep = "")
cat("Data Descri... |
## functions in plot3.R
## plot3(printToScreen (bool), useExistingFile(bool), useExistingVar(bool)
## printToScreen - print to screen or file
## useExistingFile - use existing course file, if it exists or
## refetch from URL
## useExistingVar - use existing global env var if it exists ... | /plot3.R | no_license | TobinCataldo/ExData_Plotting1 | R | false | false | 6,025 | r | ## functions in plot3.R
## plot3(printToScreen (bool), useExistingFile(bool), useExistingVar(bool)
## printToScreen - print to screen or file
## useExistingFile - use existing course file, if it exists or
## refetch from URL
## useExistingVar - use existing global env var if it exists ... |
options(timeout = 3600) # 1 hour for downloads
options(repos=structure(c(CRAN="https://cloud.r-project.org")), warn = -1)
if (!requireNamespace('BiocManager', quietly = TRUE)) {
install.packages('BiocManager')
BiocManager::install("remotes")
}
if (!requireNamespace('data.table', quietly = TRUE)) {
install... | /drop/installRPackages.R | permissive | gagneurlab/drop | R | false | false | 1,593 | r | options(timeout = 3600) # 1 hour for downloads
options(repos=structure(c(CRAN="https://cloud.r-project.org")), warn = -1)
if (!requireNamespace('BiocManager', quietly = TRUE)) {
install.packages('BiocManager')
BiocManager::install("remotes")
}
if (!requireNamespace('data.table', quietly = TRUE)) {
install... |
#' @title Random Forest probability scaled partial dependency plots
#' @description Produces partial dependency plots with probability distribution based on scaled margin distances.
#'
#' @param x Object of class randomForest
#' @param pred.data Training data.frame used for constructing the plot,
#' @param xna... | /rfUtilities/R/rf.partial.prob.R | no_license | ingted/R-Examples | R | false | false | 5,212 | r | #' @title Random Forest probability scaled partial dependency plots
#' @description Produces partial dependency plots with probability distribution based on scaled margin distances.
#'
#' @param x Object of class randomForest
#' @param pred.data Training data.frame used for constructing the plot,
#' @param xna... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_utils.R
\name{compare_group}
\alias{compare_group}
\title{Compare two groups assignment results}
\usage{
compare_group(group1, group2, file.prefix = "Compare.group",
title = "", plot = T, save.image = F, add.legend = T,
label.size = ... | /man/compare_group.Rd | no_license | naikai/sake | R | false | true | 562 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_utils.R
\name{compare_group}
\alias{compare_group}
\title{Compare two groups assignment results}
\usage{
compare_group(group1, group2, file.prefix = "Compare.group",
title = "", plot = T, save.image = F, add.legend = T,
label.size = ... |
# Author: Yuchen Yang (yy5819@ic.ac.uk)
# Version: 0.0.1
## Clear the directory ##
rm(list=ls())
# import the results from the previous step and plot every curve with the models (or none, if nothing converges) overlaid.
# Doing this will help you identify poor fits visually and help you decide whether the previous.
#... | /MiniProject/Code/3_plot_analysis.R | no_license | gregiee/CMEEcoursework | R | false | false | 13,205 | r | # Author: Yuchen Yang (yy5819@ic.ac.uk)
# Version: 0.0.1
## Clear the directory ##
rm(list=ls())
# import the results from the previous step and plot every curve with the models (or none, if nothing converges) overlaid.
# Doing this will help you identify poor fits visually and help you decide whether the previous.
#... |
setWDHere = function(){
sourcePath<-rstudioapi::getSourceEditorContext()$path[1] # gets the location of the script that this piece of code is in
sourceLoc<-strsplit(sourcePath, "/SETUP.R")[[1]][1] # get the parent folder
setwd(sourceLoc) # set the wd to the parent folder
}
setWDHere()
# SETUP file to be run on... | /SETUP.R | no_license | awong234/CT_sim | R | false | false | 2,901 | r | setWDHere = function(){
sourcePath<-rstudioapi::getSourceEditorContext()$path[1] # gets the location of the script that this piece of code is in
sourceLoc<-strsplit(sourcePath, "/SETUP.R")[[1]][1] # get the parent folder
setwd(sourceLoc) # set the wd to the parent folder
}
setWDHere()
# SETUP file to be run on... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tt.R
\name{tt_dir}
\alias{tt_dir}
\title{Create a new TidyTuesday directory}
\usage{
tt_dir(
year = lubridate::year(Sys.Date()),
week = lubridate::isoweek(Sys.Date()) + 1
)
}
\arguments{
\item{year}{4 digit year}
\item{week}{numeric week... | /man/tt_dir.Rd | no_license | jkaupp/jkmisc | R | false | true | 375 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tt.R
\name{tt_dir}
\alias{tt_dir}
\title{Create a new TidyTuesday directory}
\usage{
tt_dir(
year = lubridate::year(Sys.Date()),
week = lubridate::isoweek(Sys.Date()) + 1
)
}
\arguments{
\item{year}{4 digit year}
\item{week}{numeric week... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotTimeSeries.R
\name{plotTimeSeriesResults}
\alias{plotTimeSeriesResults}
\title{Creates a time series plot typical for an MCMC / SMC fit}
\usage{
plotTimeSeriesResults(sampler, model, observed, error = NULL,
plotResiduals = TRUE, start =... | /BayesianTools/man/plotTimeSeriesResults.Rd | permissive | 3rico/BayesianTools | R | false | true | 1,445 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotTimeSeries.R
\name{plotTimeSeriesResults}
\alias{plotTimeSeriesResults}
\title{Creates a time series plot typical for an MCMC / SMC fit}
\usage{
plotTimeSeriesResults(sampler, model, observed, error = NULL,
plotResiduals = TRUE, start =... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggAddLegend.R
\name{.ggAddLegend}
\alias{.ggAddLegend}
\title{Add Legend to a ggplot2 Plot}
\usage{
.ggAddLegend(spectra, use.sym, leg.loc)
}
\arguments{
\item{spectra}{An object of S3 class \code{\link[ChemoSpec:Spectra]{ChemoSpec::Spectra()... | /man/dot-ggAddLegend.Rd | no_license | cran/ChemoSpecUtils | R | false | true | 744 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggAddLegend.R
\name{.ggAddLegend}
\alias{.ggAddLegend}
\title{Add Legend to a ggplot2 Plot}
\usage{
.ggAddLegend(spectra, use.sym, leg.loc)
}
\arguments{
\item{spectra}{An object of S3 class \code{\link[ChemoSpec:Spectra]{ChemoSpec::Spectra()... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transform.R
\name{transform_virtual_mutation_time}
\alias{transform_virtual_mutation_time}
\title{FUNCTION: transform_virtual_mutation_time}
\usage{
transform_virtual_mutation_time(d)
}
\description{
Transform the virtual mutation data file s... | /man/transform_virtual_mutation_time.Rd | no_license | gkapfham/vmutation-replicate | R | false | true | 387 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transform.R
\name{transform_virtual_mutation_time}
\alias{transform_virtual_mutation_time}
\title{FUNCTION: transform_virtual_mutation_time}
\usage{
transform_virtual_mutation_time(d)
}
\description{
Transform the virtual mutation data file s... |
/Review/Simulations/nlin_ph_lambda0.colon_NLIN_Moyen_1000/2000_patients/Generation_Donnees_nlin_ph.R | no_license | danielico/Biostatistics_Paper | R | false | false | 3,302 | r | ||
library(dplyr)
library(ggplot2)
library(tidyverse)
# Get the tarball
tarball <- read.csv("C:/Users/drkpi/Desktop/tmp/SOM/somCompositeData_2019-04-29.csv")
# Vector of numeric analyte names
num.analytes <- colnames(as.data.frame(select_if(tarball, is.numeric)))
str.analytes <- colnames(as.data.frame(select_if(tarball,... | /data-processing/Tarball_v2 scripts/Shiny/Simple var plot/test/server.R | no_license | lter/lterwg-som | R | false | false | 823 | r | library(dplyr)
library(ggplot2)
library(tidyverse)
# Get the tarball
tarball <- read.csv("C:/Users/drkpi/Desktop/tmp/SOM/somCompositeData_2019-04-29.csv")
# Vector of numeric analyte names
num.analytes <- colnames(as.data.frame(select_if(tarball, is.numeric)))
str.analytes <- colnames(as.data.frame(select_if(tarball,... |
## Our aim in this experiment is to write a pair of functions, namely,
## "makeCacheMatrix" and "cacheSolve" that cache the inverse of a matrix
## makeCacheMatrix is a function which creates a special "matrix" object that can
##cache its inverse for the input (which is an invertible square matrix)
makeCacheMatrix <- ... | /cachematrix.R | no_license | amrendrakush/ProgrammingAssignment2 | R | false | false | 1,257 | r | ## Our aim in this experiment is to write a pair of functions, namely,
## "makeCacheMatrix" and "cacheSolve" that cache the inverse of a matrix
## makeCacheMatrix is a function which creates a special "matrix" object that can
##cache its inverse for the input (which is an invertible square matrix)
makeCacheMatrix <- ... |
source("Scripts/Figures/Figure-F.r")
# Parameterization
LAI <- 3
a <- 1.6
nZ <- 0.5
p <- 43200
l <- 1.8e-5
VPD <- 0.02
pe <- -1.58*10^-3
b <- 4.38
kxmax <- 5
c <- 2.64
d <- 5
h <- l*a*LAI/nZ*p
h2 <- l*LAI/nZ*p/1000
# Data
dataSIL <- read.csv("Results/SI-gsL.csv")
dataSIH <- read.csv("Results/SI-gsH.csv")
dataSII... | /Scripts/Figures/Figure 3.r | no_license | YaojieLu/Competitive-stomatal-optimisation | R | false | false | 2,475 | r |
source("Scripts/Figures/Figure-F.r")
# Parameterization
LAI <- 3
a <- 1.6
nZ <- 0.5
p <- 43200
l <- 1.8e-5
VPD <- 0.02
pe <- -1.58*10^-3
b <- 4.38
kxmax <- 5
c <- 2.64
d <- 5
h <- l*a*LAI/nZ*p
h2 <- l*LAI/nZ*p/1000
# Data
dataSIL <- read.csv("Results/SI-gsL.csv")
dataSIH <- read.csv("Results/SI-gsH.csv")
dataSII... |
\name{sampExprSet}
\alias{sampExprSet}
\title{Example of Expression Set}
\description{an ExpressionSet class contains minimum of exprs (expression matrix) of gene expression and
phenoData (AnnotatedDataFrame of end point data).}
\usage{data(sampExprSet)}
\value{an simulated ExpressionSet contains con... | /man/sampExprSet.Rd | no_license | xueyuancao/POST | R | false | false | 461 | rd | \name{sampExprSet}
\alias{sampExprSet}
\title{Example of Expression Set}
\description{an ExpressionSet class contains minimum of exprs (expression matrix) of gene expression and
phenoData (AnnotatedDataFrame of end point data).}
\usage{data(sampExprSet)}
\value{an simulated ExpressionSet contains con... |
#' BinCalcICC: calculate ICC values for data from CRTs with binary outcomes.
#'
#' @param data A dataframe of the sort generated
#' by \code{cps.binary()} or \code{cps.ma.binary()}; can be generate by
#' using \code{all.sim.data = TRUE}.
#' @param method The method to be used to compute ICC. A single or multiple
#' met... | /R/binCalcICC.R | no_license | Kenkleinman/clusterPower | R | false | false | 33,788 | r | #' BinCalcICC: calculate ICC values for data from CRTs with binary outcomes.
#'
#' @param data A dataframe of the sort generated
#' by \code{cps.binary()} or \code{cps.ma.binary()}; can be generate by
#' using \code{all.sim.data = TRUE}.
#' @param method The method to be used to compute ICC. A single or multiple
#' met... |
#' Check if RStudio is running.
#'
#' @param version_needed An optional version specification. If supplied,
#' ensures that RStudio is at least that version.
#'
#' @param child_ok Boolean; check if the current R process is a child
#' process of the main RStudio session? This can be useful for e.g. RStudio
#' ... | /R/code.R | no_license | pontiggi/rstudioapi | R | false | false | 4,136 | r | #' Check if RStudio is running.
#'
#' @param version_needed An optional version specification. If supplied,
#' ensures that RStudio is at least that version.
#'
#' @param child_ok Boolean; check if the current R process is a child
#' process of the main RStudio session? This can be useful for e.g. RStudio
#' ... |
\name{ci_proportion_text}
\alias{ci_proportion_text}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
ci_proportion_text
}
\description{
Confidence interval text description.
}
\usage{Use in an RMD in-line block to print a description of the confidence interval.
ci_proportion_text(Question,x_pct, ... | /man/ci_proportion_text.rd | no_license | SophieMYang/statistics | R | false | false | 2,185 | rd | \name{ci_proportion_text}
\alias{ci_proportion_text}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
ci_proportion_text
}
\description{
Confidence interval text description.
}
\usage{Use in an RMD in-line block to print a description of the confidence interval.
ci_proportion_text(Question,x_pct, ... |
###Tensor times matrix (m-mode product)
ttm<-function(tnsr,mat,m=NULL){
stopifnot(is.matrix(mat))
if(is.null(m)) stop("m must be specified")
mat_dims <- dim(mat)
modes_in <- tnsr@modes
stopifnot(modes_in[m]==mat_dims[2])
modes_out <- modes_in
modes_out[m] <- mat_dims[1]
tnsr_m <- rs_unfold(tnsr,m=m)@data
retar... | /rTensor_Operations.R | no_license | dandrews/tensors | R | false | false | 2,839 | r | ###Tensor times matrix (m-mode product)
ttm<-function(tnsr,mat,m=NULL){
stopifnot(is.matrix(mat))
if(is.null(m)) stop("m must be specified")
mat_dims <- dim(mat)
modes_in <- tnsr@modes
stopifnot(modes_in[m]==mat_dims[2])
modes_out <- modes_in
modes_out[m] <- mat_dims[1]
tnsr_m <- rs_unfold(tnsr,m=m)@data
retar... |
aad002c39e6af4e5f21f982f8877c132 b15_PR_7_50.qdimacs 21025 62388 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/A1/Database/Sauer-Reimer/ITC99/b15_PR_7_50/b15_PR_7_50.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 64 | r | aad002c39e6af4e5f21f982f8877c132 b15_PR_7_50.qdimacs 21025 62388 |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{findLouvain}
\alias{findLouvain}
\title{Louvain clustering on transition matrix}
\usage{
findLouvain(mkv)
}
\arguments{
\item{mkv}{Transition matrix}
}
\value{
Returns a list with graph, dataframe and community object
}
\des... | /man/findLouvain.Rd | no_license | wjawaid/bglab | R | false | true | 448 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{findLouvain}
\alias{findLouvain}
\title{Louvain clustering on transition matrix}
\usage{
findLouvain(mkv)
}
\arguments{
\item{mkv}{Transition matrix}
}
\value{
Returns a list with graph, dataframe and community object
}
\des... |
# constructs three random normal vectors of lenth 100
x1=rnorm(100)
x2=rnorm(100)
x3=rnorm(100)
# Call these variables
x1
x2
x3
# Make a data frame with three columns
t = data.frame(a = x1, b = (x1+x2), c = (x1+x2+x3))
# Call plot(t)
plot(t)
# call sd(t)
sd(t$a)
sd(t$b)
sd(t$c)
# generating graphics
plot(t$a, ... | /todo6-3.R | no_license | snandi17/SRT411 | R | false | false | 475 | r | # constructs three random normal vectors of lenth 100
x1=rnorm(100)
x2=rnorm(100)
x3=rnorm(100)
# Call these variables
x1
x2
x3
# Make a data frame with three columns
t = data.frame(a = x1, b = (x1+x2), c = (x1+x2+x3))
# Call plot(t)
plot(t)
# call sd(t)
sd(t$a)
sd(t$b)
sd(t$c)
# generating graphics
plot(t$a, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/table12_7.R
\docType{data}
\name{Table12_7}
\alias{Table12_7}
\title{Table 12_7}
\format{
\itemize{
\item \strong{YEAR}
\item \strong{C: }12-month average U.S. domestic price of copper (cents per pound)
\item \strong{G: } annual gross nationa... | /man/Table12_7.Rd | no_license | brunoruas2/gujarati | R | false | true | 923 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/table12_7.R
\docType{data}
\name{Table12_7}
\alias{Table12_7}
\title{Table 12_7}
\format{
\itemize{
\item \strong{YEAR}
\item \strong{C: }12-month average U.S. domestic price of copper (cents per pound)
\item \strong{G: } annual gross nationa... |
dFdthetaf <- function(mod){
#Only learn the lengthscales. This vector will be q-long
#Out put is a q-long vector of derivative wrt w_j for j 1 to q
q <- dim(mod$mubar)[2]
output <- numeric(q)
#Precalculate trace terms
#Obtain A matrix
sigma <- sqrt(1/(mod$beta))
psi1 <- mod$psi1
A <- (1/m... | /VAR-GPLVM/backup/dFdthetaf.R | no_license | AsgerMorville/GPLVM | R | false | false | 1,117 | r | dFdthetaf <- function(mod){
#Only learn the lengthscales. This vector will be q-long
#Out put is a q-long vector of derivative wrt w_j for j 1 to q
q <- dim(mod$mubar)[2]
output <- numeric(q)
#Precalculate trace terms
#Obtain A matrix
sigma <- sqrt(1/(mod$beta))
psi1 <- mod$psi1
A <- (1/m... |
library(shiny)
library(shinydashboard)
library(ggplot2)
shinyUI(
dashboardPage(
dashboardHeader(title = "Mobile App Statistics"),
dashboardSidebar(
sidebarMenu(
menuItem("Home",icon = icon("home"),tabName = "home"
),
menuItem("Import dataset",icon = icon("table"... | /ui.R | no_license | nssebirumbi/Group-14-R-project | R | false | false | 22,136 | r | library(shiny)
library(shinydashboard)
library(ggplot2)
shinyUI(
dashboardPage(
dashboardHeader(title = "Mobile App Statistics"),
dashboardSidebar(
sidebarMenu(
menuItem("Home",icon = icon("home"),tabName = "home"
),
menuItem("Import dataset",icon = icon("table"... |
library(ggplot2)
# File Location and URL
data.dir <- "./data"
file.loc <- paste(data.dir, "activity.csv",sep = "/")
# One time file download and directory creation
if (!file.exists(data.dir)) {
dir.create(data.dir)
source.file.url<-"https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2Factivity.zip"... | /code.R | no_license | eddyleesinti/ReproduceWeek2 | R | false | false | 3,070 | r | library(ggplot2)
# File Location and URL
data.dir <- "./data"
file.loc <- paste(data.dir, "activity.csv",sep = "/")
# One time file download and directory creation
if (!file.exists(data.dir)) {
dir.create(data.dir)
source.file.url<-"https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2Factivity.zip"... |
# Yeast Server
#the while loop
whileLoop <- function(input, currentCellCount, desiredCells, totalVol, nextVol){
while(currentCellCount < desiredCells){
totalVol <- totalVol + nextVol
nextVol <- nextVol*2
currentCellCount <- curr... | /Yeast/YeastServer.R | no_license | bbearce/Brewculator | R | false | false | 8,216 | r | # Yeast Server
#the while loop
whileLoop <- function(input, currentCellCount, desiredCells, totalVol, nextVol){
while(currentCellCount < desiredCells){
totalVol <- totalVol + nextVol
nextVol <- nextVol*2
currentCellCount <- curr... |
# This first line will take a few seconds.
if(!exists("NEI")){
NEI <- readRDS("./data/summarySCC_PM25.rds")
}
if(!exists("SCC")){
SCC <- readRDS("./data/Source_Classification_Code.rds")
}
library(ggplot2)
# Of the four types of sources indicated by the type (point, nonpoint, onroad, nonroad) variable,
... | /plot3pm25.R | no_license | wmoukhaiber/Peer--graded-Course-Project-2 | R | false | false | 1,054 | r | # This first line will take a few seconds.
if(!exists("NEI")){
NEI <- readRDS("./data/summarySCC_PM25.rds")
}
if(!exists("SCC")){
SCC <- readRDS("./data/Source_Classification_Code.rds")
}
library(ggplot2)
# Of the four types of sources indicated by the type (point, nonpoint, onroad, nonroad) variable,
... |
\name{linfun}
\Rdversion{1.1}
\alias{linfun}
\title{
Function on a Linear Network
}
\description{
Create a function on a linear network.
}
\usage{
linfun(f, L)
}
\arguments{
\item{f}{
A \code{function} in the \R language.
}
\item{L}{
A linear network (object of class \code{"linnet"})
on which \c... | /man/linfun.Rd | no_license | chenjiaxun9/spatstat | R | false | false | 2,187 | rd | \name{linfun}
\Rdversion{1.1}
\alias{linfun}
\title{
Function on a Linear Network
}
\description{
Create a function on a linear network.
}
\usage{
linfun(f, L)
}
\arguments{
\item{f}{
A \code{function} in the \R language.
}
\item{L}{
A linear network (object of class \code{"linnet"})
on which \c... |
source("incl/start.R")
library("datasets") ## cars data set
library("stats") ## lm(), poly(), xtabs()
strategies <- supportedStrategies()
strategies <- setdiff(strategies, "multiprocess")
message("*** Globals - formulas ...")
message("*** Globals - lm(<formula>) ...")
## From example("lm", package="stats")
ctl ... | /tests/globals,formulas.R | no_license | MarkEdmondson1234/future | R | false | false | 3,539 | r | source("incl/start.R")
library("datasets") ## cars data set
library("stats") ## lm(), poly(), xtabs()
strategies <- supportedStrategies()
strategies <- setdiff(strategies, "multiprocess")
message("*** Globals - formulas ...")
message("*** Globals - lm(<formula>) ...")
## From example("lm", package="stats")
ctl ... |
library(dplyr)
library(pdftools)
library(reshape2)
library(stringr)
library(magrittr)
library(openssl)
library(httr)
library(googledrive)
library(googlesheets4)
# authenticate yourself with google sheets
# drive_auth(
# email = gargle::gargle_oauth_email(),
# path = NULL,
# scopes = "https://www.googleapis.com/a... | /Ebola/read_ebola.R | no_license | immovable-ladder/data_scrapers | R | false | false | 4,976 | r | library(dplyr)
library(pdftools)
library(reshape2)
library(stringr)
library(magrittr)
library(openssl)
library(httr)
library(googledrive)
library(googlesheets4)
# authenticate yourself with google sheets
# drive_auth(
# email = gargle::gargle_oauth_email(),
# path = NULL,
# scopes = "https://www.googleapis.com/a... |
library(stringr)
library(dplyr)
# str_extract() Saca la regex que es pattern
# str_locate() Coloca la palabra y donde se encuentra
# str_locate_all() Busca en todo
# str_detect()
str_extract(
string = c("Nov", "Nov.", "november", "Noviembre", "Noventa", "ANOVA"),
pattern = "^[nN][oO][vV](\\.|ember|iembre)?$"
... | /C06- Expresiones Regulares/Clase06.R | no_license | RofoRojas/Data-Wrangling | R | false | false | 978 | r | library(stringr)
library(dplyr)
# str_extract() Saca la regex que es pattern
# str_locate() Coloca la palabra y donde se encuentra
# str_locate_all() Busca en todo
# str_detect()
str_extract(
string = c("Nov", "Nov.", "november", "Noviembre", "Noventa", "ANOVA"),
pattern = "^[nN][oO][vV](\\.|ember|iembre)?$"
... |
#!/usr/bin/Rscript
###QCPhasing
### read variables
args <- commandArgs(TRUE)
## Default setting when no arguments passed
if(length(args) < 1) {
args <- c("--help")
}
## Help section
if("--help" %in% args) {
cat("
plots for qc phasing
Arguments:
--arg1= qcOutfile - character, path to the phen... | /compute5/BIOS_phasing/scripts/plotQCPhasing.R | no_license | npklein/molgenis-pipelines | R | false | false | 1,650 | r | #!/usr/bin/Rscript
###QCPhasing
### read variables
args <- commandArgs(TRUE)
## Default setting when no arguments passed
if(length(args) < 1) {
args <- c("--help")
}
## Help section
if("--help" %in% args) {
cat("
plots for qc phasing
Arguments:
--arg1= qcOutfile - character, path to the phen... |
err <- cbind(train,data)
err <- cbind(data[1:30213,c(1,3,4,9,19,20)], copy[1:30213, ])
err$truecost <- Train$cost
err$pred <- predh2o#xgb.model$pred
err$diff <- err$truecost - err$pred
# plots
plot(x=err1$supplier, y=err1$diff, xlab='supplier-id', ylab='true_cost-pred_cost',
main = 'Distribution of prediction err... | /code/error_analysis.R | no_license | aakansh9/caterpillar | R | false | false | 914 | r | err <- cbind(train,data)
err <- cbind(data[1:30213,c(1,3,4,9,19,20)], copy[1:30213, ])
err$truecost <- Train$cost
err$pred <- predh2o#xgb.model$pred
err$diff <- err$truecost - err$pred
# plots
plot(x=err1$supplier, y=err1$diff, xlab='supplier-id', ylab='true_cost-pred_cost',
main = 'Distribution of prediction err... |
library(tidyverse)
library(rjson)
load_hvc_json = function(fname) {
d = fromJSON(file=fname)
feats = d$features
feats_df = data.frame(do.call(rbind, feats))
colnames(feats_df) = make.names(d$feature_list)
feats_df = feats_df %>% mutate(labels = d$pred_labels,
prob_ent = d$pre... | /hvc.R | no_license | bradleycolquitt/expression-utils | R | false | false | 1,375 | r | library(tidyverse)
library(rjson)
load_hvc_json = function(fname) {
d = fromJSON(file=fname)
feats = d$features
feats_df = data.frame(do.call(rbind, feats))
colnames(feats_df) = make.names(d$feature_list)
feats_df = feats_df %>% mutate(labels = d$pred_labels,
prob_ent = d$pre... |
path<-"./Coursera/Exploratory Data Analysis/household_power_consumption.txt"
mydata<-read.table(path, header = T, sep = ";")
fData<-filter(mydata, Date=="1/2/2007"|Date=="2/2/2007")
gap<-as.numeric(fData$Global_active_power)
dateTime<-paste(fData$Date, fData$Time, sep = " ")
dateTime<-strptime(dateTime, format = "%d/%... | /plot2.R | no_license | karimsyed/ExData_Plotting1 | R | false | false | 518 | r | path<-"./Coursera/Exploratory Data Analysis/household_power_consumption.txt"
mydata<-read.table(path, header = T, sep = ";")
fData<-filter(mydata, Date=="1/2/2007"|Date=="2/2/2007")
gap<-as.numeric(fData$Global_active_power)
dateTime<-paste(fData$Date, fData$Time, sep = " ")
dateTime<-strptime(dateTime, format = "%d/%... |
infile1 = "/mnt/bigdata/Genetic/Projects/EXOMECHIP_MARSHFIELD/summary_results/FinalRelease_QC_20140311_Team1_Marshfield.vcf.plink.map"
infile2 = "/mnt/bigdata/Genetic/Projects/EXOMECHIP_MARSHFIELD/summary_results/FinalRelease_QC_20140311_Team1_Marshfield.vcf.plink.frq"
infile3 = "/mnt/bigdata/Genetic/Projects/EXOMECHIP... | /2ALOF/Exomechip_data_prepare.R | no_license | Shicheng-Guo/marshfield | R | false | false | 980 | r | infile1 = "/mnt/bigdata/Genetic/Projects/EXOMECHIP_MARSHFIELD/summary_results/FinalRelease_QC_20140311_Team1_Marshfield.vcf.plink.map"
infile2 = "/mnt/bigdata/Genetic/Projects/EXOMECHIP_MARSHFIELD/summary_results/FinalRelease_QC_20140311_Team1_Marshfield.vcf.plink.frq"
infile3 = "/mnt/bigdata/Genetic/Projects/EXOMECHIP... |
library(simsem)
### Name: findIndIntercept
### Title: Find indicator intercepts from factor loading matrix, total
### factor mean, and indicator mean.
### Aliases: findIndIntercept
### ** Examples
loading <- matrix(0, 6, 2)
loading[1:3, 1] <- c(0.6, 0.7, 0.8)
loading[4:6, 2] <- c(0.6, 0.7, 0.8)
facMean <- c(0.5, ... | /data/genthat_extracted_code/simsem/examples/findIndIntercept.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 393 | r | library(simsem)
### Name: findIndIntercept
### Title: Find indicator intercepts from factor loading matrix, total
### factor mean, and indicator mean.
### Aliases: findIndIntercept
### ** Examples
loading <- matrix(0, 6, 2)
loading[1:3, 1] <- c(0.6, 0.7, 0.8)
loading[4:6, 2] <- c(0.6, 0.7, 0.8)
facMean <- c(0.5, ... |
#' @export
makeRLearner.surv.coxph = function() {
makeRLearnerSurv(
cl = "surv.coxph",
package = "survival",
par.set = makeParamSet(
makeDiscreteLearnerParam(id = "ties", default = "efron", values = c("efron", "breslow", "exact")),
makeLogicalLearnerParam(id = "singular.ok", default = TRUE),
... | /R/RLearner_surv_coxph.R | no_license | jimhester/mlr | R | false | false | 2,191 | r | #' @export
makeRLearner.surv.coxph = function() {
makeRLearnerSurv(
cl = "surv.coxph",
package = "survival",
par.set = makeParamSet(
makeDiscreteLearnerParam(id = "ties", default = "efron", values = c("efron", "breslow", "exact")),
makeLogicalLearnerParam(id = "singular.ok", default = TRUE),
... |
## code to prepare `demo_dataset` dataset goes here
future::plan("multiprocess")
future::plan("sequential")
usethis::use_data(demo_dataset, overwrite = TRUE)
demo_dataset <- reactive({
# browser()
future::plan("multiprocess")
# browser()
# req(input$fileButton != 0)
#if (!is.null(directory())) {
netCDF... | /data-raw/demo_dataset (conflicted copy 2020-08-24 143422).R | no_license | mbousq/msinco_dev | R | false | false | 2,404 | r | ## code to prepare `demo_dataset` dataset goes here
future::plan("multiprocess")
future::plan("sequential")
usethis::use_data(demo_dataset, overwrite = TRUE)
demo_dataset <- reactive({
# browser()
future::plan("multiprocess")
# browser()
# req(input$fileButton != 0)
#if (!is.null(directory())) {
netCDF... |
#' @export
#' @importFrom S4Vectors metadata
#' @importClassesFrom Biostrings QualityScaledDNAStringSet
#' @importFrom BiocParallel SerialParam bpisup bpstart bpstop
#' @importFrom ShortRead FastqStreamer yield
getAdaptorThresholds <- function(aligned, error=0.01, number=1e5, BPPARAM=SerialParam())
# Scrambles the inpu... | /R/getAdaptorThresholds.R | no_license | MarioniLab/sarlacc | R | false | false | 4,896 | r | #' @export
#' @importFrom S4Vectors metadata
#' @importClassesFrom Biostrings QualityScaledDNAStringSet
#' @importFrom BiocParallel SerialParam bpisup bpstart bpstop
#' @importFrom ShortRead FastqStreamer yield
getAdaptorThresholds <- function(aligned, error=0.01, number=1e5, BPPARAM=SerialParam())
# Scrambles the inpu... |
testlist <- list(m = NULL, repetitions = -304992360L, in_m = structure(c(2.31584307392677e+77, 9.53818252467743e+295, 1.22810536108214e+146), .Dim = c(3L, 1L )))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
str(result) | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615786467-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 254 | r | testlist <- list(m = NULL, repetitions = -304992360L, in_m = structure(c(2.31584307392677e+77, 9.53818252467743e+295, 1.22810536108214e+146), .Dim = c(3L, 1L )))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
str(result) |
sim_bern_mean = function(n, prob) {
sim_data = tibble(
y = rbinom(n_samp, 1, prob)
)
tibble(
samp_avg = mean(sim_data %>% pull(y))
)
} | /resources/sim_bern_mean.R | no_license | anhnguyendepocen/p8105.github.io-2 | R | false | false | 156 | r | sim_bern_mean = function(n, prob) {
sim_data = tibble(
y = rbinom(n_samp, 1, prob)
)
tibble(
samp_avg = mean(sim_data %>% pull(y))
)
} |
library(RJSONIO)
library(RCurl)
library(dplyr)
library(readr)
library(maptools)
library(raster)
library(jpeg)
library(rgeos)
getImageInfo <- function(imageID, subjURL = "https://api.zooniverse.org/projects/kelp/subjects/"){
fromJSON(getURL(paste0(subjURL, imageID)))
}
#can probably do everything in LL now that it's... | /scripts/raw_data_pipeline/FFmethods_fix.R | no_license | Irosenthal/Floating_Forests | R | false | false | 9,642 | r | library(RJSONIO)
library(RCurl)
library(dplyr)
library(readr)
library(maptools)
library(raster)
library(jpeg)
library(rgeos)
getImageInfo <- function(imageID, subjURL = "https://api.zooniverse.org/projects/kelp/subjects/"){
fromJSON(getURL(paste0(subjURL, imageID)))
}
#can probably do everything in LL now that it's... |
library(shiny)
library(shinydashboard)
library(shinycssloaders)
source("preprocessing.R")
shinyUI(
dashboardPage(
dashboardHeader(title = "Clusters in Bibmet")
,dashboardSidebar(
width = 300
,DT::dataTableOutput("ilabels")
,selectInput('starty', 'Start year', 1980:as.integer(format... | /ui.R | no_license | thompa21/kthb-clustering_select-shiny | R | false | false | 6,595 | r | library(shiny)
library(shinydashboard)
library(shinycssloaders)
source("preprocessing.R")
shinyUI(
dashboardPage(
dashboardHeader(title = "Clusters in Bibmet")
,dashboardSidebar(
width = 300
,DT::dataTableOutput("ilabels")
,selectInput('starty', 'Start year', 1980:as.integer(format... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/package.R
\docType{package}
\name{planetfish2}
\alias{planetfish2}
\alias{planetfish2-package}
\title{planetfish2: A fisheries operating model integreted with the CASAL
stock assessment model}
\description{
DRAFT
}
\details{
Based on planetfi... | /man/planetfish2.Rd | no_license | Brett-Stacy/earthfish | R | false | true | 1,486 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/package.R
\docType{package}
\name{planetfish2}
\alias{planetfish2}
\alias{planetfish2-package}
\title{planetfish2: A fisheries operating model integreted with the CASAL
stock assessment model}
\description{
DRAFT
}
\details{
Based on planetfi... |
# This is the main script for running the shiny app
# It uses the same backend functions as main.R
#------------------#
# READ IN PACKAGES #
#------------------#
library(squire)
library(tidyverse)
library(shiny)
source("./load_data.R")
source("./shiny_scripts/shiny_ui.R")
source("./shiny_scripts/shiny_server.R")
so... | /app.R | no_license | IDinsight/covid_scenarios | R | false | false | 880 | r | # This is the main script for running the shiny app
# It uses the same backend functions as main.R
#------------------#
# READ IN PACKAGES #
#------------------#
library(squire)
library(tidyverse)
library(shiny)
source("./load_data.R")
source("./shiny_scripts/shiny_ui.R")
source("./shiny_scripts/shiny_server.R")
so... |
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... | /myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615765088-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,803 | r | testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... |
x<-seq(0,40,length=num.points); y1<-dnorm(x,14,3.5)*1.8; y2<-dnorm(x,5,2); y3<-dnorm(x,19,sd=1)*0.25;
my.y<-y1+y2+y3;
d<-x
fitness.ind.surf<-my.y
sd<-2 #sd=4
calc.wbar<-function(d,sd,fitness.ind.surf){
wbar<-sapply(d,function(my.xbar){
my.norm<-dnorm(d,mean=my.xbar,sd=sd)
mean(my.norm/mean(my.norm)*fitness.ind... | /Rcode/Quant_gen/fitness_landscape_1D_animated.R | permissive | EvoEpi/popgen-notes | R | false | false | 2,699 | r |
x<-seq(0,40,length=num.points); y1<-dnorm(x,14,3.5)*1.8; y2<-dnorm(x,5,2); y3<-dnorm(x,19,sd=1)*0.25;
my.y<-y1+y2+y3;
d<-x
fitness.ind.surf<-my.y
sd<-2 #sd=4
calc.wbar<-function(d,sd,fitness.ind.surf){
wbar<-sapply(d,function(my.xbar){
my.norm<-dnorm(d,mean=my.xbar,sd=sd)
mean(my.norm/mean(my.norm)*fitness.ind... |
# Jason Rich
# Bayesian Classifier
getwd()
setwd('/Users/jasonrich/msim607-machine-learning/project1')
################################################################################
#install packages (if missing)
################################################################################
pkgs <- installed.pac... | /R/bayes-class.R | no_license | jrich8573/bayes-ml | R | false | false | 11,105 | r | # Jason Rich
# Bayesian Classifier
getwd()
setwd('/Users/jasonrich/msim607-machine-learning/project1')
################################################################################
#install packages (if missing)
################################################################################
pkgs <- installed.pac... |
library(rvest)
library(dplyr)
library(tidyr)
library(ggplot2)
library(lubridate)
#### ingest national bracket from ESPN and clean up
espn <- read_html("http://games.espn.com/tournament-challenge-bracket/2017/en/whopickedwhom")
crowd_picks_raw <- espn %>%
html_nodes(".seed , .percentage, .teamName") %>%
html_text(... | /src/fte_vs_crowd_2017.R | no_license | andrewflack/madness2017 | R | false | false | 6,997 | r | library(rvest)
library(dplyr)
library(tidyr)
library(ggplot2)
library(lubridate)
#### ingest national bracket from ESPN and clean up
espn <- read_html("http://games.espn.com/tournament-challenge-bracket/2017/en/whopickedwhom")
crowd_picks_raw <- espn %>%
html_nodes(".seed , .percentage, .teamName") %>%
html_text(... |
X11()
weekdays = c('So', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa')
d <- data.frame(
weekday = factor(rep(weekdays, 5), weekdays),
value = nchar(c(
'##' , # So
'########' , # Mo
'#############' , # Tu
'######' , # We
'############' , # Th
'###############' , #... | /functions/scatter.smooth.R | no_license | ReneNyffenegger/about-r | R | false | false | 1,327 | r | X11()
weekdays = c('So', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa')
d <- data.frame(
weekday = factor(rep(weekdays, 5), weekdays),
value = nchar(c(
'##' , # So
'########' , # Mo
'#############' , # Tu
'######' , # We
'############' , # Th
'###############' , #... |
library(hmi)
### Name: get_type
### Title: Get the type of variables.
### Aliases: get_type
### ** Examples
get_type(iris$Sepal.Length); get_type(iris$Species)
| /data/genthat_extracted_code/hmi/examples/get_type.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 167 | r | library(hmi)
### Name: get_type
### Title: Get the type of variables.
### Aliases: get_type
### ** Examples
get_type(iris$Sepal.Length); get_type(iris$Species)
|
###########################################################
##
## Master Dataset Creation from preprocessed files
## 09/08/2021
##
######################################################
setwd("~/")
library(fuzzyjoin)
library(data.table)
library(stringr)
library(cld2)
library(textcat)
library(utf8)
library(stopwords)... | /Tone_analysis/Master_Data_Code_French_09092021.r | permissive | Moritz-Pfeifer/Money-Trust-and-Central-Bank-Communications | R | false | false | 56,034 | r |
###########################################################
##
## Master Dataset Creation from preprocessed files
## 09/08/2021
##
######################################################
setwd("~/")
library(fuzzyjoin)
library(data.table)
library(stringr)
library(cld2)
library(textcat)
library(utf8)
library(stopwords)... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.1239614668691e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_b... | /CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615826994-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 360 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.1239614668691e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_b... |
#===== Source file: ../make_rowgroups.r on 2021-06-02
#-----
make_rowgroups <- function(stdblks, rowheadruns, rowgroupSize)
{
# Start with standard blocks, including for the row header hierarchy.
d_rhb <- c(stdblks["rowhead_and_body", "nr"],
stdblks["rowhead_and_body", "nc"])
emptyblks <- stdblks[0... | /R/make_rowgroups.bare.R | no_license | rrprf/tablesgg | R | false | false | 3,892 | r | #===== Source file: ../make_rowgroups.r on 2021-06-02
#-----
make_rowgroups <- function(stdblks, rowheadruns, rowgroupSize)
{
# Start with standard blocks, including for the row header hierarchy.
d_rhb <- c(stdblks["rowhead_and_body", "nr"],
stdblks["rowhead_and_body", "nc"])
emptyblks <- stdblks[0... |
####Bandit script
devtools::source_url("https://raw.githubusercontent.com/DecisionNeurosciencePsychopathology/fMRI_R/master/dnpl_utility.R")
if (F) {
start_time <- Sys.time()
R.matlab::readMat(filena)->testmat
#doesn't even work
rmatio::read.mat(filena)->testmat.2 #Use #C which is way more efficient, although ... | /bandit_make_design.R | permissive | DecisionNeurosciencePsychopathology/fMRI_R | R | false | false | 7,166 | r | ####Bandit script
devtools::source_url("https://raw.githubusercontent.com/DecisionNeurosciencePsychopathology/fMRI_R/master/dnpl_utility.R")
if (F) {
start_time <- Sys.time()
R.matlab::readMat(filena)->testmat
#doesn't even work
rmatio::read.mat(filena)->testmat.2 #Use #C which is way more efficient, although ... |
#setwd("G:\\Required\\College\\8th sem\\Major Project\\COVID\\Final")
lowMiddle = c("Angola", "Bangladesh", "Bhutan", "Bolivia", "Cape Verde", "Cambodia", "Cameroon", "Congo", "Cote d'Ivoire", "Djibouti", "Egypt", "El Salvador", "Swaziland", "Ghana", "Honduras", "India", "Indonesia", "Kenya", "Kyrgyzstan", "Laos", "Ma... | /Code/csv_generate.R | no_license | SravanKumar35/Data-Analysis-on-COVID19-Data | R | false | false | 1,196 | r | #setwd("G:\\Required\\College\\8th sem\\Major Project\\COVID\\Final")
lowMiddle = c("Angola", "Bangladesh", "Bhutan", "Bolivia", "Cape Verde", "Cambodia", "Cameroon", "Congo", "Cote d'Ivoire", "Djibouti", "Egypt", "El Salvador", "Swaziland", "Ghana", "Honduras", "India", "Indonesia", "Kenya", "Kyrgyzstan", "Laos", "Ma... |
#' runmysql Function
#'
#' This function allows you to execute a mysql statement against a mysql database. The only required parameter is
#' the mysql statement. All others may be NULL.
#' The function returns a dataframe.
#' @param statement The MYSQL statement you would like to execute.
#' @param con A connection of... | /R/runmysql.R | permissive | KonoAnalytics/KonostdlibR | R | false | false | 1,421 | r | #' runmysql Function
#'
#' This function allows you to execute a mysql statement against a mysql database. The only required parameter is
#' the mysql statement. All others may be NULL.
#' The function returns a dataframe.
#' @param statement The MYSQL statement you would like to execute.
#' @param con A connection of... |
sample.prob.last <- function (n, nm, mA, nA, nfAB)
{
nf <- n - nm
nt <- nm + 2 * nf
nB <- nt - nA
mB <- nm - mA
nfAA <- 0.5 * (nA - mA - nfAB)
nfBB <- 0.5 * (nB - mB - nfAB)
log2 <- log(2)
K <- lgamma(nA+1) + lgamma(nB+1) + lgamma(nf+1) + lgamma(nm+1) - lgamma(mA+1) - lgamma(mB+1) - lgamma(nt+... | /HardyWeinberg/R/sample.prob.last.R | no_license | akhikolla/InformationHouse | R | false | false | 450 | r | sample.prob.last <- function (n, nm, mA, nA, nfAB)
{
nf <- n - nm
nt <- nm + 2 * nf
nB <- nt - nA
mB <- nm - mA
nfAA <- 0.5 * (nA - mA - nfAB)
nfBB <- 0.5 * (nB - mB - nfAB)
log2 <- log(2)
K <- lgamma(nA+1) + lgamma(nB+1) + lgamma(nf+1) + lgamma(nm+1) - lgamma(mA+1) - lgamma(mB+1) - lgamma(nt+... |
# run in data/correlation study
energyOptTable <- read.table("ConnectivityAndAllenExpressionMatrixPair.NewEnergies.out.topList.txt")
energy <- as.matrix(energyOptTable)
dim(energy)
length(energy[energy==0])
#region classification
regionClassification <- read.csv("RegionClassificationABAMSOut.csv", row.names=1)
#make ... | /BAMSandAllen/rCode/ColourDivisionsHeatMapReused.r | no_license | leonfrench/ABAMS | R | false | false | 1,280 | r | # run in data/correlation study
energyOptTable <- read.table("ConnectivityAndAllenExpressionMatrixPair.NewEnergies.out.topList.txt")
energy <- as.matrix(energyOptTable)
dim(energy)
length(energy[energy==0])
#region classification
regionClassification <- read.csv("RegionClassificationABAMSOut.csv", row.names=1)
#make ... |
library(rvest)
library(ggplot2)
library(ggthemes)
library(tidyverse)
library(nbastatR)
'%!in%' <- function(x,y)!('%in%'(x,y))
dat = read.csv("statsdf.csv")[,-c(1)]
primedf = read.csv("primedf.csv")[,-c(1)]
dat$Player = as.character(dat$Player)
primedf$Player = as.character(primedf$Player)
primedfPl = sort(primedf$Play... | /scrap code/bindingdata.R | no_license | tmayhew/NBAdraft | R | false | false | 573 | r | library(rvest)
library(ggplot2)
library(ggthemes)
library(tidyverse)
library(nbastatR)
'%!in%' <- function(x,y)!('%in%'(x,y))
dat = read.csv("statsdf.csv")[,-c(1)]
primedf = read.csv("primedf.csv")[,-c(1)]
dat$Player = as.character(dat$Player)
primedf$Player = as.character(primedf$Player)
primedfPl = sort(primedf$Play... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_fit.R
\name{model_fit}
\alias{model_fit}
\title{Model fit}
\usage{
model_fit(
wide_data,
chains = 4,
iter = 1000,
control = list(adapt_delta = 0.85),
...
)
}
\arguments{
\item{wide_data}{A wider data frame}
\item{chains}{A nu... | /man/model_fit.Rd | no_license | jabard89/SedSeqQuant | R | false | true | 1,265 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_fit.R
\name{model_fit}
\alias{model_fit}
\title{Model fit}
\usage{
model_fit(
wide_data,
chains = 4,
iter = 1000,
control = list(adapt_delta = 0.85),
...
)
}
\arguments{
\item{wide_data}{A wider data frame}
\item{chains}{A nu... |
# Copyright (c) 2013 Oliver Keyes
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, dis... | /main.R | permissive | wikimedia-research/Blockr | R | false | false | 1,538 | r | # Copyright (c) 2013 Oliver Keyes
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, dis... |
## Exploratory Data Analysis - Week one assignment: Plotting (second plot)
#
## plot2.R - will generate plot2.png
# Download the data set from UC Irvine Machine Learning Repository (see link in README.md file)
# Don't forget to set your working directory to where the data file is located
## Don't forget to UNZIP the fi... | /plot2.R | no_license | Maxshrike/ExData_Plotting1 | R | false | false | 1,524 | r | ## Exploratory Data Analysis - Week one assignment: Plotting (second plot)
#
## plot2.R - will generate plot2.png
# Download the data set from UC Irvine Machine Learning Repository (see link in README.md file)
# Don't forget to set your working directory to where the data file is located
## Don't forget to UNZIP the fi... |
### Function used as input for the bisection method
pdist_hy <- function(d, es, val, cv.P)
{
### Add objects to workspace
yi <- es$yi
vi <- es$vi
zval <- es$zval
zcv <- es$zcv
ori <- es$ori
k <- nrow(es)
zd <- d/sqrt(vi) # Transform d to zd for approximation
q <- numeric(k) # ... | /R/pdist_hy.R | no_license | cran/puniform | R | false | false | 1,290 | r | ### Function used as input for the bisection method
pdist_hy <- function(d, es, val, cv.P)
{
### Add objects to workspace
yi <- es$yi
vi <- es$vi
zval <- es$zval
zcv <- es$zcv
ori <- es$ori
k <- nrow(es)
zd <- d/sqrt(vi) # Transform d to zd for approximation
q <- numeric(k) # ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/doi_sankey.R
\name{doi_sankey}
\alias{doi_sankey}
\title{<Add Title>}
\usage{
doi_sankey(values, edges, focus_node_id = NULL, width = NULL,
height = NULL, style_opts = list())
}
\description{
<Add Description>
}
| /man/doi_sankey.Rd | no_license | krisrs1128/treelapse | R | false | true | 293 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/doi_sankey.R
\name{doi_sankey}
\alias{doi_sankey}
\title{<Add Title>}
\usage{
doi_sankey(values, edges, focus_node_id = NULL, width = NULL,
height = NULL, style_opts = list())
}
\description{
<Add Description>
}
|
source("config.R")
library(rjags)
load(file.path(data_raw, "bigfour.rda"))
### Here's the logit function
logit <- function(p) {
out <- log(p/(1 - p))
return(out)
}
####################################################################################
##### Team-level home advantage
##############################... | /R/posteriorPredictiveChecks_ml.R | permissive | bigfour/competitiveness | R | false | false | 11,337 | r | source("config.R")
library(rjags)
load(file.path(data_raw, "bigfour.rda"))
### Here's the logit function
logit <- function(p) {
out <- log(p/(1 - p))
return(out)
}
####################################################################################
##### Team-level home advantage
##############################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/plotClusterExprs.R
\docType{methods}
\name{plotClusterExprs}
\alias{plotClusterExprs}
\alias{plotClusterExprs,daFrame-method}
\title{Plot expression distributions by cluster}
\usage{
plotClusterExprs(x, ...)
\S4method{plotCl... | /man/plotClusterExprs.Rd | no_license | sukath/CATALYST | R | false | true | 1,293 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/plotClusterExprs.R
\docType{methods}
\name{plotClusterExprs}
\alias{plotClusterExprs}
\alias{plotClusterExprs,daFrame-method}
\title{Plot expression distributions by cluster}
\usage{
plotClusterExprs(x, ...)
\S4method{plotCl... |
library(agridat)
### Name: cox.stripsplit
### Title: Strip-split plot of barley with fertilizer, calcium, and soil
### factors.
### Aliases: cox.stripsplit
### ** Examples
data(cox.stripsplit)
dat <- cox.stripsplit
# Raw means
aggregate(yield ~ calcium, data=dat, mean)
aggregate(yield ~ soil, data=dat, mean)
ag... | /data/genthat_extracted_code/agridat/examples/cox.stripsplit.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 2,015 | r | library(agridat)
### Name: cox.stripsplit
### Title: Strip-split plot of barley with fertilizer, calcium, and soil
### factors.
### Aliases: cox.stripsplit
### ** Examples
data(cox.stripsplit)
dat <- cox.stripsplit
# Raw means
aggregate(yield ~ calcium, data=dat, mean)
aggregate(yield ~ soil, data=dat, mean)
ag... |
#Arrays are multidimensional vectors. SInce it is a vector, all elements of an array must be of same data type. Subsetting elements are done using []. Dimensions apart from rows and columns are called outer dimensions.
myArray = array(1:16, dim=c(2,4,4))# Total Elements product of all dimensions = 2x4x4=16.
myArray
... | /Array.R | no_license | vish3108/DSA-assignment | R | false | false | 519 | r | #Arrays are multidimensional vectors. SInce it is a vector, all elements of an array must be of same data type. Subsetting elements are done using []. Dimensions apart from rows and columns are called outer dimensions.
myArray = array(1:16, dim=c(2,4,4))# Total Elements product of all dimensions = 2x4x4=16.
myArray
... |
library(ggmap)
library(ggplot2)
library(ggthemes)
library(jsonlite)
library(magrittr)
geolocationPlot <- function() {
property.data <- getwd() %>%
paste0("/data/property/IrishPropertyData-3000.json") %>%
jsonlite::fromJSON()
property.data <- property.data[
(property.data$details$longitude < -5 &
... | /research/R/geolocationPlot.R | permissive | O1sims/Sukasa | R | false | false | 1,511 | r | library(ggmap)
library(ggplot2)
library(ggthemes)
library(jsonlite)
library(magrittr)
geolocationPlot <- function() {
property.data <- getwd() %>%
paste0("/data/property/IrishPropertyData-3000.json") %>%
jsonlite::fromJSON()
property.data <- property.data[
(property.data$details$longitude < -5 &
... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
## cached inverse of matrix
inv <- NULL
## getter/setter for matrix
set <- function(y){
... | /cachematrix.R | no_license | silvermint-cheetos/ProgrammingAssignment2 | R | false | false | 1,312 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
## cached inverse of matrix
inv <- NULL
## getter/setter for matrix
set <- function(y){
... |
inter_dataset_properties_list <- c(
"train_dataset","train_complexity","train_entropy",
"train_seq_depth_med","train_seq_depth_IQR","train_cell_types",
"train_cell_type_max_pctg","train_sparsity","train_sample_num",... | /R/summary.R | no_license | XingjieShi/scRNAIdent | R | false | false | 29,181 | r | inter_dataset_properties_list <- c(
"train_dataset","train_complexity","train_entropy",
"train_seq_depth_med","train_seq_depth_IQR","train_cell_types",
"train_cell_type_max_pctg","train_sparsity","train_sample_num",... |
library(plsRglm)
### Name: boxplots.bootpls
### Title: Boxplot bootstrap distributions
### Aliases: boxplots.bootpls
### Keywords: regression models
### ** Examples
data(Cornell)
XCornell<-Cornell[,1:7]
yCornell<-Cornell[,8]
# Lazraq-Cleroux PLS ordinary bootstrap
set.seed(250)
modpls <- plsR(yCornell,XCornell,3)
... | /data/genthat_extracted_code/plsRglm/examples/boxplots.bootpls.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 785 | r | library(plsRglm)
### Name: boxplots.bootpls
### Title: Boxplot bootstrap distributions
### Aliases: boxplots.bootpls
### Keywords: regression models
### ** Examples
data(Cornell)
XCornell<-Cornell[,1:7]
yCornell<-Cornell[,8]
# Lazraq-Cleroux PLS ordinary bootstrap
set.seed(250)
modpls <- plsR(yCornell,XCornell,3)
... |
#
ER<-readRDS("C:/Users/mcherrie/Google Drive/ProjectFiles/CRESHwebmap/alcoholtobacco/geography/DZ/la/East Renfrewshire.rds")
ERdata<-read.csv("C:/Users/mcherrie/Downloads/ER.csv")
colnames(ERdata)[7]<-"Density"
colnames(ERdata)[13]<-"Deprivation"
colnames(ERdata)[9]<-"Mortality"
colnames(ERdata)[10]<-"Hospitalisati... | /requests/EastRen.R | no_license | markocherrie/CRESHwebmap | R | false | false | 748 | r | #
ER<-readRDS("C:/Users/mcherrie/Google Drive/ProjectFiles/CRESHwebmap/alcoholtobacco/geography/DZ/la/East Renfrewshire.rds")
ERdata<-read.csv("C:/Users/mcherrie/Downloads/ER.csv")
colnames(ERdata)[7]<-"Density"
colnames(ERdata)[13]<-"Deprivation"
colnames(ERdata)[9]<-"Mortality"
colnames(ERdata)[10]<-"Hospitalisati... |
################################################################################
#### Project: Lowland plant migrations alpine soil C loss
#### Title: Explaining field soil C loss
#### Author: Tom Walker (thomas.walker@usys.ethz.ch)
#### Date: 26 May 2021
#### ----------------------------------------------------... | /analysis_code/field_explain_soil_carbon_loss.R | no_license | tom-n-walker/uphill-plants-soil-carbon | R | false | false | 5,654 | r | ################################################################################
#### Project: Lowland plant migrations alpine soil C loss
#### Title: Explaining field soil C loss
#### Author: Tom Walker (thomas.walker@usys.ethz.ch)
#### Date: 26 May 2021
#### ----------------------------------------------------... |
#' SAT and GPA data
#'
#' SAT and GPA data for 1000 students at an unnamed college.
#'
#'
#' @name satgpa
#' @docType data
#' @format A data frame with 1000 observations on the following 6 variables.
#' \describe{
#' \item{sex}{Gender of the student.}
#' \item{sat_v}{Verbal SAT percentile.}
#' \item{sat_m}{Math S... | /R/data-satgpa.R | permissive | tessington/qsci381 | R | false | false | 1,350 | r | #' SAT and GPA data
#'
#' SAT and GPA data for 1000 students at an unnamed college.
#'
#'
#' @name satgpa
#' @docType data
#' @format A data frame with 1000 observations on the following 6 variables.
#' \describe{
#' \item{sex}{Gender of the student.}
#' \item{sat_v}{Verbal SAT percentile.}
#' \item{sat_m}{Math S... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/insertMatrixMultiplication.R
\name{insertMatrixMultiplication}
\alias{insertMatrixMultiplication}
\title{Insert Matrix multiplication.}
\usage{
insertMatrixMultiplication()
}
\description{
Call this function as an addin to insert \code{ \%\*\... | /man/insertMatrixMultiplication.Rd | permissive | woojin1223/addinwj | R | false | true | 350 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/insertMatrixMultiplication.R
\name{insertMatrixMultiplication}
\alias{insertMatrixMultiplication}
\title{Insert Matrix multiplication.}
\usage{
insertMatrixMultiplication()
}
\description{
Call this function as an addin to insert \code{ \%\*\... |
# Exercise 1: calling built-in functions
# Create a variable `my.name` that contains your name
my.name <- "Tiffany"
# Create a variable `name.length` that holds how many letters (including spaces)
# are in your name (use the `nchar()` function)
name.length <- nchar(my.name)
# Print the number of letters in your name... | /exercise-1/exercise.R | permissive | t-ffanylai/ch6-functions | R | false | false | 1,553 | r | # Exercise 1: calling built-in functions
# Create a variable `my.name` that contains your name
my.name <- "Tiffany"
# Create a variable `name.length` that holds how many letters (including spaces)
# are in your name (use the `nchar()` function)
name.length <- nchar(my.name)
# Print the number of letters in your name... |
## 02_eda.R
###
### Goal: Explore variables
###
### Content:
### 1. Explore consocational variables
### 2. Explore segmental autonomy
### 2.1. Explore segmental autonomy implementation
### 2.2. Visualize segmental autonomy implementation
### 2.3. Explore sub-facets of segmental autonomy
### 3. Create correlation... | /code/02_eda.R | no_license | tjbrailey/SegmentalAutonomy | R | false | false | 8,313 | r | ## 02_eda.R
###
### Goal: Explore variables
###
### Content:
### 1. Explore consocational variables
### 2. Explore segmental autonomy
### 2.1. Explore segmental autonomy implementation
### 2.2. Visualize segmental autonomy implementation
### 2.3. Explore sub-facets of segmental autonomy
### 3. Create correlation... |
library(mcp)
library(dplyr)
# Import range test ping data ----
rangetestimport <- function(path, pattern){
filenames <- list.files(path = path, pattern = pattern, full.names = T)
filenames <- grep('csv', filenames, value = T)
detections <- lapply(filenames, data.table::fread,
colClasses = ... | /Range Test/mcp change point.R | no_license | mhpob/WEA-Analysis | R | false | false | 6,519 | r | library(mcp)
library(dplyr)
# Import range test ping data ----
rangetestimport <- function(path, pattern){
filenames <- list.files(path = path, pattern = pattern, full.names = T)
filenames <- grep('csv', filenames, value = T)
detections <- lapply(filenames, data.table::fread,
colClasses = ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataprep.R
\name{bam_check_args}
\alias{bam_check_args}
\title{Performs the following checks:
- types:
- logQ_hat is numeric vector
- everything else matrix
- dimensions:
- all matrices have same dims
- logQ_hat has length equ... | /man/bam_check_args.Rd | no_license | craigbrinkerhoff/geoBAMr | R | false | true | 654 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataprep.R
\name{bam_check_args}
\alias{bam_check_args}
\title{Performs the following checks:
- types:
- logQ_hat is numeric vector
- everything else matrix
- dimensions:
- all matrices have same dims
- logQ_hat has length equ... |
data <- read.table("data.txt", sep=";", header=T)
dates = paste(data$Date, data$Time)
dates <- strptime(dates, "%d/%m/%Y %H:%M:%S")
data$Datestamp <- dates
startdate <- strptime(c("2007/02/01 00:00:00"), "%Y/%m/%d %H:%M:%S" )
enddate <- strptime(c("2007/02/02 23:59:59"), "%Y/%m/%d %H:%M:%S" )
dataf <- subset(data, Date... | /Task1.R | no_license | hanskohls/ExData_Plotting1 | R | false | false | 385 | r | data <- read.table("data.txt", sep=";", header=T)
dates = paste(data$Date, data$Time)
dates <- strptime(dates, "%d/%m/%Y %H:%M:%S")
data$Datestamp <- dates
startdate <- strptime(c("2007/02/01 00:00:00"), "%Y/%m/%d %H:%M:%S" )
enddate <- strptime(c("2007/02/02 23:59:59"), "%Y/%m/%d %H:%M:%S" )
dataf <- subset(data, Date... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internal.R
\name{get_api_key}
\alias{get_api_key}
\title{function to get api key based on source}
\usage{
get_api_key(src)
}
\description{
function to get api key based on source
}
\keyword{internal}
| /man/get_api_key.Rd | no_license | metacodetools/elevatr | R | false | true | 279 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internal.R
\name{get_api_key}
\alias{get_api_key}
\title{function to get api key based on source}
\usage{
get_api_key(src)
}
\description{
function to get api key based on source
}
\keyword{internal}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.