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 |
|---|---|---|---|---|---|---|---|---|---|
\name{PE.ends}
\alias{PE.ends}
\docType{data}
\title{
A sample final-timepoint dataset from a Pheno-Evo experiment
}
\description{
This is an example Pheno-Evo dataset containing the final timepoints from each of 9 runs in a BehaviorSpace parameter sweep. It is useful for testing any functions for analyzing or visualiz... | /man/PE.ends.Rd | no_license | jessicaaudreylee/PhenoEvoR | R | false | false | 2,231 | rd | \name{PE.ends}
\alias{PE.ends}
\docType{data}
\title{
A sample final-timepoint dataset from a Pheno-Evo experiment
}
\description{
This is an example Pheno-Evo dataset containing the final timepoints from each of 9 runs in a BehaviorSpace parameter sweep. It is useful for testing any functions for analyzing or visualiz... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shape_data_internal.R
\name{diff_col}
\alias{diff_col}
\title{helper function to go from cumulative to daily counts}
\usage{
diff_col(x)
}
\arguments{
\item{x}{vector of cumulative}
}
\value{
daily values
}
\description{
helper function to go... | /HutchCOVID/man/diff_col.Rd | no_license | FredHutch/COVID_modeling_schools | R | false | true | 355 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shape_data_internal.R
\name{diff_col}
\alias{diff_col}
\title{helper function to go from cumulative to daily counts}
\usage{
diff_col(x)
}
\arguments{
\item{x}{vector of cumulative}
}
\value{
daily values
}
\description{
helper function to go... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coerceVector.R
\name{coerceVector}
\alias{coerceVector}
\alias{Rf_coerceVector}
\alias{AS_LOGICAL}
\alias{AS_INTEGER}
\alias{AS_NUMERIC}
\alias{AS_CHARACTER}
\alias{AS_COMPLEX}
\alias{AS_VECTOR}
\alias{AS_LIST}
\alias{AS_RAW}
\title{Coerces a... | /man/coerceVector.Rd | no_license | HenrikBengtsson/RNativeAPI | R | false | true | 1,899 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coerceVector.R
\name{coerceVector}
\alias{coerceVector}
\alias{Rf_coerceVector}
\alias{AS_LOGICAL}
\alias{AS_INTEGER}
\alias{AS_NUMERIC}
\alias{AS_CHARACTER}
\alias{AS_COMPLEX}
\alias{AS_VECTOR}
\alias{AS_LIST}
\alias{AS_RAW}
\title{Coerces a... |
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setinverse <- function(inverse) m <<- inverse
getinverse <- function() m
list(set = set, get = get,
set... | /matrix inversion.R | no_license | shrikarth/Cousera-R-course | R | false | false | 720 | r | makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setinverse <- function(inverse) m <<- inverse
getinverse <- function() m
list(set = set, get = get,
set... |
tm <- function(s = T)
{
# Starts/stops timer
#
# Args:
# s: start timer if true; stop otherwise
#
# Returns:
# Elapsed time if s = F (stops)
if(s) {
timer <<- Sys.time()
return()
}
elapsed <- as.numeric(Sys.time() - timer)
return(elapsed)
}
# tm()
# print(tm(... | /f_timer.R | no_license | yichuan-liu/Return-Forecast-Portfolio-Optimization-with-ML | R | false | false | 323 | r | tm <- function(s = T)
{
# Starts/stops timer
#
# Args:
# s: start timer if true; stop otherwise
#
# Returns:
# Elapsed time if s = F (stops)
if(s) {
timer <<- Sys.time()
return()
}
elapsed <- as.numeric(Sys.time() - timer)
return(elapsed)
}
# tm()
# print(tm(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/as.init.R
\name{fixed}
\alias{fixed}
\alias{fixed.init}
\alias{fixed.initList}
\title{Check if something is fixed}
\usage{
fixed(x, ...)
\method{fixed}{init}(x, ...)
\method{fixed}{initList}(x, ...)
}
\arguments{
\item{x}{object}
\item{...... | /man/fixed.Rd | no_license | bergsmat/partab | R | false | true | 592 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/as.init.R
\name{fixed}
\alias{fixed}
\alias{fixed.init}
\alias{fixed.initList}
\title{Check if something is fixed}
\usage{
fixed(x, ...)
\method{fixed}{init}(x, ...)
\method{fixed}{initList}(x, ...)
}
\arguments{
\item{x}{object}
\item{...... |
# This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common new_handlers new_service set_config
NULL
#' AWS Resource Groups
#'
#' @description
#' Resource Groups lets you organize Amazon Web Services resources such as
#' Amazon Elastic Compute Cloud instances, Amazon Relational Database
... | /R/resourcegroups_service.R | no_license | cran/paws.management | R | false | false | 7,278 | r | # This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common new_handlers new_service set_config
NULL
#' AWS Resource Groups
#'
#' @description
#' Resource Groups lets you organize Amazon Web Services resources such as
#' Amazon Elastic Compute Cloud instances, Amazon Relational Database
... |
library(dmt)
### Name: centerData
### Title: Center data matrix.
### Aliases: centerData
### Keywords: utilities maths
### ** Examples
#centerData(X)
| /data/genthat_extracted_code/dmt/examples/centerData.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 157 | r | library(dmt)
### Name: centerData
### Title: Center data matrix.
### Aliases: centerData
### Keywords: utilities maths
### ** Examples
#centerData(X)
|
# Classification Algorithms:
# Categories: I) Statistical Classifiers
# II) Nearest Neighbour Methods
# III) Neural Networks
# IV) SVM Based Classifiers
# V) Decision Tree Approaches
# VI) Ensemble Methods
# I) Statistical Classifiers:
#------------------------... | /ClassificationAlgorithms.R | no_license | ekamnit/ResearchWork | R | false | false | 6,932 | r | # Classification Algorithms:
# Categories: I) Statistical Classifiers
# II) Nearest Neighbour Methods
# III) Neural Networks
# IV) SVM Based Classifiers
# V) Decision Tree Approaches
# VI) Ensemble Methods
# I) Statistical Classifiers:
#------------------------... |
\name{newnorm}
\alias{newnorm}
\title{
Function to normalize Illumina Infinium Human Methylation 450 BeadChip (Illumina 450K)
}
\description{
Function performs normalization Illumina Infinium Human Methylation 450 BeadChip data,
correcting for quantile and tissue/cell type.
}
\usage{
newnorm(sigA, sigB, Annot = NULL... | /man/newnorm.Rd | no_license | stepanv1/NewNorm | R | false | false | 2,914 | rd | \name{newnorm}
\alias{newnorm}
\title{
Function to normalize Illumina Infinium Human Methylation 450 BeadChip (Illumina 450K)
}
\description{
Function performs normalization Illumina Infinium Human Methylation 450 BeadChip data,
correcting for quantile and tissue/cell type.
}
\usage{
newnorm(sigA, sigB, Annot = NULL... |
###########################################################
#######1. ?????丮, ???̺귯??, ?????? ?ҷ??��? ?ڵ?#######
###########################################################
setwd('D:/??ȸ/???м??̳?/??��')
getwd()
need_packages = c("data.table", "tidyverse", "mice", "MLmetrics","DMwR","gridExtra","reshape2","lubridate",... | /2팀_제출_코드/전처리_2팀.R | no_license | P-Sat/2021-01_Winter_Seminar | R | false | false | 16,330 | r | ###########################################################
#######1. ?????丮, ???̺귯??, ?????? ?ҷ??��? ?ڵ?#######
###########################################################
setwd('D:/??ȸ/???м??̳?/??��')
getwd()
need_packages = c("data.table", "tidyverse", "mice", "MLmetrics","DMwR","gridExtra","reshape2","lubridate",... |
poisson_process <- function(Tmax,lam=1){
# Returns a series of event times from a homogeneous Poisson process with parameter lam in the interval [0,T]
# For future c++ implementation, the following is an example using U(0,1) variables rather than Exp(lam)
# n = rpois(1,Tmax*lam)
# U = runif(n) # draw... | /oldR/poisson process functions.R | no_license | jacobostergaard/bootha | R | false | false | 1,432 | r | poisson_process <- function(Tmax,lam=1){
# Returns a series of event times from a homogeneous Poisson process with parameter lam in the interval [0,T]
# For future c++ implementation, the following is an example using U(0,1) variables rather than Exp(lam)
# n = rpois(1,Tmax*lam)
# U = runif(n) # draw... |
#' @title Placement of "dots"
#'
#' @description Places the dots randomly within a delimited space
#'
#' @param data The dataset containing the dots information
#' @param size The size of the space within which to place the dots
#'
#' @return An updated dataset
#'
#' @examples
#' dots_data = place_dots(data=d... | /R/place_dots.R | no_license | qleclerc/rdots | R | false | false | 606 | r | #' @title Placement of "dots"
#'
#' @description Places the dots randomly within a delimited space
#'
#' @param data The dataset containing the dots information
#' @param size The size of the space within which to place the dots
#'
#' @return An updated dataset
#'
#' @examples
#' dots_data = place_dots(data=d... |
#
# Two sample analysis as in Bootstrap_two.r requiring >120GB of RAM to
# run (or a re-code)
#
set.seed(1974201701)
load(file="all_latencies.rdat")
source('Bootstrap_all_twosamples.r')
print("-----------------------------------------")
print ("Studentized bootstrapped hypothesis test (Algo 16.2)")
# ndsd does bett... | /analysis/Bootstrap_two_bigmem.r | no_license | ABRG-Models/linetask2014 | R | false | false | 773 | r | #
# Two sample analysis as in Bootstrap_two.r requiring >120GB of RAM to
# run (or a re-code)
#
set.seed(1974201701)
load(file="all_latencies.rdat")
source('Bootstrap_all_twosamples.r')
print("-----------------------------------------")
print ("Studentized bootstrapped hypothesis test (Algo 16.2)")
# ndsd does bett... |
#!/usr/bin/Rscript
#########################################################################################
# Generate uni-partite undirect graphs with different degree heterogeneity by rewiring links.
# 1), generate a ER random graph.
# 2), repeat rewiring a link to a new node who has more neighbors than the old node... | /graphs.rewiring.unipart.R | no_license | keepsimpler/net-effect | R | false | false | 16,242 | r | #!/usr/bin/Rscript
#########################################################################################
# Generate uni-partite undirect graphs with different degree heterogeneity by rewiring links.
# 1), generate a ER random graph.
# 2), repeat rewiring a link to a new node who has more neighbors than the old node... |
library(plyr)
library(data.table)
library(dplyr)
setwd('C:\\Users\\Ahmmed\\Desktop\\material\\cousera\\course material\\getdata and clean\\wk4\\getdata%2Fprojectfiles%2FUCI HAR Dataset\\')
#read data into r
YTest <- read.table("y_test.txt")
XTest <- read.table("X_test.txt")
SubjectTest <- read.table("subject_test.tx... | /GetClean_Courseproject/run_analysis.R | no_license | ahmmedadelabu/datasciencecoursera | R | false | false | 5,715 | r | library(plyr)
library(data.table)
library(dplyr)
setwd('C:\\Users\\Ahmmed\\Desktop\\material\\cousera\\course material\\getdata and clean\\wk4\\getdata%2Fprojectfiles%2FUCI HAR Dataset\\')
#read data into r
YTest <- read.table("y_test.txt")
XTest <- read.table("X_test.txt")
SubjectTest <- read.table("subject_test.tx... |
# grains on a given square
square <- function(n) {
stopifnot(1 <= n && n <= 64)
return(2^(n-1))
}
# total grains on the board up to a given square
total <- function(n) {
board <- matrix(1:64, nrow = 8)
sum(sapply(board[1:n], square))
}
| /grains/grains.R | no_license | johnantolik/exercism-r | R | false | false | 247 | r | # grains on a given square
square <- function(n) {
stopifnot(1 <= n && n <= 64)
return(2^(n-1))
}
# total grains on the board up to a given square
total <- function(n) {
board <- matrix(1:64, nrow = 8)
sum(sapply(board[1:n], square))
}
|
library(datasets)
library(dplyr)
library(ggplot2)
data(mtcars)
cars <- mtcars
# multivariate linear model:
lm_fit <- lm(mpg ~ cyl + hp, data = cars)
summary(lm_fit)
# create a data frame with the prediction for the values in THE ORIGINAL DATA FRAME (THE TRAIN DATA, WHICH IS NOT GOOD)!! and the values of hp:
predict... | /R/Clasification -Supervised Learning/Linear regression/mtcars multivariate linear regression.R | no_license | MGijon/Artificial-Intelligence | R | false | false | 1,211 | r | library(datasets)
library(dplyr)
library(ggplot2)
data(mtcars)
cars <- mtcars
# multivariate linear model:
lm_fit <- lm(mpg ~ cyl + hp, data = cars)
summary(lm_fit)
# create a data frame with the prediction for the values in THE ORIGINAL DATA FRAME (THE TRAIN DATA, WHICH IS NOT GOOD)!! and the values of hp:
predict... |
# Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
#
# http://r-pkgs.had.co.nz/
#
# Some useful keyboard shortcuts for package authoring:
#
# Install Package: 'Ctrl + Shift + B'
# Check Package: ... | /R/ReMIXTURE.R | no_license | BakDK/ReMIXTURE2 | R | false | false | 13,567 | r |
# Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
#
# http://r-pkgs.had.co.nz/
#
# Some useful keyboard shortcuts for package authoring:
#
# Install Package: 'Ctrl + Shift + B'
# Check Package: ... |
\name{workflowRun}
\alias{workflowRun}
\title{workflowRun API wrapper}
\usage{
workflowRun(objectID, inputParams = emptyNamedList,
jsonifyData = TRUE, alwaysRetry = FALSE)
}
\arguments{
\item{objectID}{DNAnexus object ID}
\item{inputParams}{Either an R object that will be
converted into JSON using \code{RJ... | /src/R/dxR/man/workflowRun.Rd | permissive | dnanexus/dx-toolkit | R | false | false | 1,341 | rd | \name{workflowRun}
\alias{workflowRun}
\title{workflowRun API wrapper}
\usage{
workflowRun(objectID, inputParams = emptyNamedList,
jsonifyData = TRUE, alwaysRetry = FALSE)
}
\arguments{
\item{objectID}{DNAnexus object ID}
\item{inputParams}{Either an R object that will be
converted into JSON using \code{RJ... |
solve_3comp <- function(chem.name = NULL,
chem.cas = NULL,
times=NULL,
parameters=NULL,
days=10,
tsteps = 4, # tsteps is number of steps per hour
daily.dose =1, # Assume dose is in mg/kg BW/day
... | /httk/R/solve_3comp.R | no_license | ingted/R-Examples | R | false | false | 10,460 | r | solve_3comp <- function(chem.name = NULL,
chem.cas = NULL,
times=NULL,
parameters=NULL,
days=10,
tsteps = 4, # tsteps is number of steps per hour
daily.dose =1, # Assume dose is in mg/kg BW/day
... |
## -*- coding: utf-8 -*-
#' Creates ROC or response distribution model fit plots with posterior
#' predictive intervals.
#'
#' @param fit a stanfit object.
#' @param adata an aggregated data object produced by the
#' \code{aggregate_responses} function. It must be the same
#' aggregated data object that was us... | /R/plot_sdt_fit.R | no_license | boryspaulewicz/bhsdtr | R | false | false | 6,002 | r | ## -*- coding: utf-8 -*-
#' Creates ROC or response distribution model fit plots with posterior
#' predictive intervals.
#'
#' @param fit a stanfit object.
#' @param adata an aggregated data object produced by the
#' \code{aggregate_responses} function. It must be the same
#' aggregated data object that was us... |
library(rexpokit)
### Name: SparseM_coo_to_REXPOKIT_coo
### Title: Convert a SparseM COO matrix to a plain matrix
### Aliases: SparseM_coo_to_REXPOKIT_coo
### ** Examples
# Example use:
# Make a Q matrix
tmpmat = matrix(c(-1.218, 0.504, 0.336, 0.378, 0.126, -0.882, 0.252, 0.504, 0.168,
0.504, -1.05, 0.378, 0.126, 0... | /data/genthat_extracted_code/rexpokit/examples/zzz_SparseM_coo_to_REXPOKIT_coo.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 442 | r | library(rexpokit)
### Name: SparseM_coo_to_REXPOKIT_coo
### Title: Convert a SparseM COO matrix to a plain matrix
### Aliases: SparseM_coo_to_REXPOKIT_coo
### ** Examples
# Example use:
# Make a Q matrix
tmpmat = matrix(c(-1.218, 0.504, 0.336, 0.378, 0.126, -0.882, 0.252, 0.504, 0.168,
0.504, -1.05, 0.378, 0.126, 0... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/postprocessing.R
\name{reconstruct.bs}
\alias{reconstruct.bs}
\title{reconstruct.bs function}
\usage{
reconstruct.bs(mod, ...)
}
\arguments{
\item{mod}{an object}
\item{...}{additional arguments}
}
\value{
method reconstruct.bs
}
\descriptio... | /man/reconstruct.bs.Rd | no_license | cran/spatsurv | R | false | true | 448 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/postprocessing.R
\name{reconstruct.bs}
\alias{reconstruct.bs}
\title{reconstruct.bs function}
\usage{
reconstruct.bs(mod, ...)
}
\arguments{
\item{mod}{an object}
\item{...}{additional arguments}
}
\value{
method reconstruct.bs
}
\descriptio... |
# BrAPI-Core
#
# The Breeding API (BrAPI) is a Standardized REST ful Web Service API Specification for communicating Plant Breeding Data. BrAPI allows for easy data sharing between databases and tools involved in plant breeding. <div class=\"brapi-section\"> <h2 class=\"brapi-section-title\">General Reference Documenta... | /R/scale_list_response.R | no_license | Breeding-Insight/brapi-r-v2 | R | false | false | 8,625 | r | # BrAPI-Core
#
# The Breeding API (BrAPI) is a Standardized REST ful Web Service API Specification for communicating Plant Breeding Data. BrAPI allows for easy data sharing between databases and tools involved in plant breeding. <div class=\"brapi-section\"> <h2 class=\"brapi-section-title\">General Reference Documenta... |
#' Fonction plot.plsda
#'
#' @description Plot the quality of the model and the VIP for each variable and component.
#' @param x A plsda object containing a trained model. The model can be generated with the fit function of this package.
#' @param ... Use to comply generic model
#' @return None.
#' @keywords VIP, quali... | /R/plot.plsda.R | no_license | raydai/plsda | R | false | false | 1,181 | r | #' Fonction plot.plsda
#'
#' @description Plot the quality of the model and the VIP for each variable and component.
#' @param x A plsda object containing a trained model. The model can be generated with the fit function of this package.
#' @param ... Use to comply generic model
#' @return None.
#' @keywords VIP, quali... |
library(dplyr)
library(plotly)
library(ggplot2)
breaches <- read.csv("./data/data_breaches.csv", stringsAsFactors = FALSE)
# Transform and edit dataset to add clarity and ease of use
# 13 = year of 2017, 14 = recently -- group these as a whole
breaches$year[breaches$year == 14] <- 13
breaches$year <- breaches$year +... | /dataset.R | no_license | ferily7/INFO-201-Project | R | false | false | 1,283 | r | library(dplyr)
library(plotly)
library(ggplot2)
breaches <- read.csv("./data/data_breaches.csv", stringsAsFactors = FALSE)
# Transform and edit dataset to add clarity and ease of use
# 13 = year of 2017, 14 = recently -- group these as a whole
breaches$year[breaches$year == 14] <- 13
breaches$year <- breaches$year +... |
test_that("get_status works", {
valid_cnps <- c(1940616346114, 7041218318525, 4980423260322, NA)
status_vec <- c("nascut in Romania", "rezident",
"nascut in Romania", NA_character_)
expect_equal(get_status(valid_cnps),
status_vec)
expect_equal(get_status(620120601... | /tests/testthat/test-get_status.R | permissive | dragosmg/rocnp | R | false | false | 1,019 | r | test_that("get_status works", {
valid_cnps <- c(1940616346114, 7041218318525, 4980423260322, NA)
status_vec <- c("nascut in Romania", "rezident",
"nascut in Romania", NA_character_)
expect_equal(get_status(valid_cnps),
status_vec)
expect_equal(get_status(620120601... |
##########################################################
# Name of file: dataset for time dependent cox.R
# Data release (if applicable):
# Original author(s): Chris Robertson chrisobertson@nhs.net
# Original date: 06 August 2020
# Latest update author (if not using version control) - Jiafeng Pan jiafeng.pan@phs.scot... | /code/adult asthma time dependent cox.r | no_license | EAVE-II/Covid-asthma-adults. | R | false | false | 4,472 | r | ##########################################################
# Name of file: dataset for time dependent cox.R
# Data release (if applicable):
# Original author(s): Chris Robertson chrisobertson@nhs.net
# Original date: 06 August 2020
# Latest update author (if not using version control) - Jiafeng Pan jiafeng.pan@phs.scot... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{check_proper_color}
\alias{check_proper_color}
\title{Check if color is set from Semanti-UI palette}
\usage{
check_proper_color(color)
}
\arguments{
\item{color}{character with color name}
}
\value{
Error when \code{color} does ... | /man/check_proper_color.Rd | permissive | al224/shiny.semantic | R | false | true | 406 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{check_proper_color}
\alias{check_proper_color}
\title{Check if color is set from Semanti-UI palette}
\usage{
check_proper_color(color)
}
\arguments{
\item{color}{character with color name}
}
\value{
Error when \code{color} does ... |
#' Create a point
#'
#' @export
#' @param coordinates a pair of points in a vector, list or json, of the form
#' \code{e.g., c(longitude,latitude)}
#' @param properties a list of properties. Default: NULL
#' @family data functions
#' @return a \code{\link{data-Point}} feature
#' @examples
#' lawn_point(c(-74.5, 40))
#'... | /R/point.R | permissive | jbousquin/lawn | R | false | false | 754 | r | #' Create a point
#'
#' @export
#' @param coordinates a pair of points in a vector, list or json, of the form
#' \code{e.g., c(longitude,latitude)}
#' @param properties a list of properties. Default: NULL
#' @family data functions
#' @return a \code{\link{data-Point}} feature
#' @examples
#' lawn_point(c(-74.5, 40))
#'... |
###Install sqldf and utils packages. These lines can be skipped if you already have these packages installed!
install.packages("sqldf")
install.packages("utils")
###Open libraries for sqldf and utils. These lines can be skipped if you have already openend these libraries!
library(sqldf)
library(utils)
###Create a ne... | /plot3.R | no_license | Jikkeromijn/Exploratory_DA | R | false | false | 2,976 | r | ###Install sqldf and utils packages. These lines can be skipped if you already have these packages installed!
install.packages("sqldf")
install.packages("utils")
###Open libraries for sqldf and utils. These lines can be skipped if you have already openend these libraries!
library(sqldf)
library(utils)
###Create a ne... |
# This install script is run in bare R installation and
# it installs all packages required to run Chipster.
# The script uses install functions that check each package
# before installation, meaning that it can be rerun if needed
# and only missing packages are installed.
# Determine the path of the executing script... | /tools/admin/R-3.6.1-plain/install-libs.R | permissive | oheil/chipster-tools | R | false | false | 1,930 | r | # This install script is run in bare R installation and
# it installs all packages required to run Chipster.
# The script uses install functions that check each package
# before installation, meaning that it can be rerun if needed
# and only missing packages are installed.
# Determine the path of the executing script... |
## N. Chardon
## Start: 9 Oct 2015
## Aim: quantile regressions with 2014 data
rm(list=ls())
setwd("~/Desktop/Research/silene/")
# Load Libraries
library(quantreg)
library(ggplot2)
library(latticeExtra)
# load dataframes
load('r_files/na_df.RData')
## Quantile Regression
#elevation: quadratic term significant at al... | /quantreg.R | no_license | nchardon/silene | R | false | false | 2,158 | r | ## N. Chardon
## Start: 9 Oct 2015
## Aim: quantile regressions with 2014 data
rm(list=ls())
setwd("~/Desktop/Research/silene/")
# Load Libraries
library(quantreg)
library(ggplot2)
library(latticeExtra)
# load dataframes
load('r_files/na_df.RData')
## Quantile Regression
#elevation: quadratic term significant at al... |
library(DBI) #required for SQL connection
library(dplyr) #for data manipulation commands
library(dbplyr) #for sql data manipulation commands
library(odbc) #required for SQL connection
library(rgdal) #for manipulating spatial data
library(sf) #for writing to MapInfo tables
#Connect to SQL postcode lookup
#Rerun... | /R Postcode Co-ordinate Validation & Lookup Github Share.R | no_license | AndyELich/RPostcodeGeocoding | R | false | false | 4,257 | r | library(DBI) #required for SQL connection
library(dplyr) #for data manipulation commands
library(dbplyr) #for sql data manipulation commands
library(odbc) #required for SQL connection
library(rgdal) #for manipulating spatial data
library(sf) #for writing to MapInfo tables
#Connect to SQL postcode lookup
#Rerun... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ui-styling.R
\name{style_dir}
\alias{style_dir}
\title{Prettify arbitrary R code}
\usage{
style_dir(
path = ".",
...,
style = tidyverse_style,
transformers = style(...),
filetype = c("R", "Rprofile"),
recursive = TRUE,
exclude_f... | /man/style_dir.Rd | no_license | cstepper/styler | R | false | true | 4,093 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ui-styling.R
\name{style_dir}
\alias{style_dir}
\title{Prettify arbitrary R code}
\usage{
style_dir(
path = ".",
...,
style = tidyverse_style,
transformers = style(...),
filetype = c("R", "Rprofile"),
recursive = TRUE,
exclude_f... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gene.R
\name{geneBarplot}
\alias{geneBarplot}
\title{Main function for drawing the bar plot with plotly}
\usage{
geneBarplot(expression, experiment, colorby, expressionmeasure = "Expression")
}
\arguments{
\item{expression}{Matrix of values}
... | /man/geneBarplot.Rd | permissive | freestatman/shinyngs | R | false | true | 894 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gene.R
\name{geneBarplot}
\alias{geneBarplot}
\title{Main function for drawing the bar plot with plotly}
\usage{
geneBarplot(expression, experiment, colorby, expressionmeasure = "Expression")
}
\arguments{
\item{expression}{Matrix of values}
... |
%
% Copyright 2007-2018 by the individuals mentioned in the source code history
%
% Licensed under the Apache License, Version 2.0 (the "License");
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
... | /man/mxBootstrapEval.Rd | no_license | lnsongxf/OpenMx | R | false | false | 4,250 | rd | %
% Copyright 2007-2018 by the individuals mentioned in the source code history
%
% Licensed under the Apache License, Version 2.0 (the "License");
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CRRA.R
\name{crra.moments}
\alias{crra.moments}
\title{# Custom moments fucntion for use in optimize portfolio
supplies moments to CRRA objective function}
\usage{
crra.moments(R, ...)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame... | /man/crra.moments.Rd | no_license | GreenGrassBlueOcean/PortfolioAnalytics | R | false | true | 642 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CRRA.R
\name{crra.moments}
\alias{crra.moments}
\title{# Custom moments fucntion for use in optimize portfolio
supplies moments to CRRA objective function}
\usage{
crra.moments(R, ...)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame... |
\name{mPhen.preparePheno}
\alias{mPhen.preparePheno}
\title{Prepare phenotype data for analysis}
\description{This harmonises the phenotype data with genotype data, and
also extract the relevant columns from a larger phenotype matrix, and also pre-calculates stratification indices and residuals. This is called by mPhe... | /man/mPhen.preparePheno.Rd | no_license | cran/MultiPhen | R | false | false | 3,083 | rd | \name{mPhen.preparePheno}
\alias{mPhen.preparePheno}
\title{Prepare phenotype data for analysis}
\description{This harmonises the phenotype data with genotype data, and
also extract the relevant columns from a larger phenotype matrix, and also pre-calculates stratification indices and residuals. This is called by mPhe... |
# Script for Importing DJI RTK Rover point surveys
rm(list = ls())
library(dplyr)
library(stringr)
library(splitstackshape)
#establish a filepath for the raw GCP file:
Input <- "xxx.txt"
#establish the column names from the collected RTK data files
Columns <- c("altitude(m)", "antennaHeight(m)", "description", "inde... | /DJI_RTK_Rover.R | no_license | GEOSWRL/DJI_RTK_Rover | R | false | false | 2,448 | r | # Script for Importing DJI RTK Rover point surveys
rm(list = ls())
library(dplyr)
library(stringr)
library(splitstackshape)
#establish a filepath for the raw GCP file:
Input <- "xxx.txt"
#establish the column names from the collected RTK data files
Columns <- c("altitude(m)", "antennaHeight(m)", "description", "inde... |
#This script summarizes juvenile data from NCRMP 2013-2019 at the site, stratum, island and sector level
#It also identifies which sectors and strata have been surveyed in all years
#It calculate delta density
#Ends with summarized site-level data between 2015-2019
rm(list=ls())
#Set Run Flags
DEBUG=TRUE
#LOAD LI... | /Project-specific scripts/Juvenile Project/scripts/Svydesign Correction/Juvenile Project Summary Script_v7.R | no_license | benthic-crep/Benthic-Scripts | R | false | false | 27,236 | r | #This script summarizes juvenile data from NCRMP 2013-2019 at the site, stratum, island and sector level
#It also identifies which sectors and strata have been surveyed in all years
#It calculate delta density
#Ends with summarized site-level data between 2015-2019
rm(list=ls())
#Set Run Flags
DEBUG=TRUE
#LOAD LI... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/kinematics.R
\name{kinematics}
\alias{kinematics}
\title{Calculate a set of kinematics parameter from a \code{TrajectorySet} object, or a single parameter, or from a single trajectory (all possible combinations)}
\usage{
kinematics(tr... | /man/kinematics.Rd | permissive | federicomarini/flowcatchR-release | R | false | false | 1,982 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/kinematics.R
\name{kinematics}
\alias{kinematics}
\title{Calculate a set of kinematics parameter from a \code{TrajectorySet} object, or a single parameter, or from a single trajectory (all possible combinations)}
\usage{
kinematics(tr... |
############################################################################
####################------DAIMLER------#####################################
############################################################################
# CODE: Exponential Weighted Moving Average
# COMMODITY: Rubber
# AUTHOR: Sayan Pal
... | /Commodity Price Forecasting Master Codes/Rubber Codes/Rubber-EWMA.R | no_license | Sayan-Pal585/Time-Series-Analysis | R | false | false | 1,551 | r | ############################################################################
####################------DAIMLER------#####################################
############################################################################
# CODE: Exponential Weighted Moving Average
# COMMODITY: Rubber
# AUTHOR: Sayan Pal
... |
### script de teste para o fisfa 1.0
teste.fun<-function(x){
if (x == 1984) print ("1º: Funcionou!")
else print("1º alt: Funcionou também!")
library(zoo)
}
| /teste.fun.R | no_license | allanvc/fisfa | R | false | false | 166 | r | ### script de teste para o fisfa 1.0
teste.fun<-function(x){
if (x == 1984) print ("1º: Funcionou!")
else print("1º alt: Funcionou também!")
library(zoo)
}
|
#' @title Grammar-of-Graphics Multivariate entropy stacked bar constructor
#'
#' @description
#' This function creates a stacked bar graph of entropies issued from \code{\link{sentropies}}.
#'
#' @details The \code{\link{geom_bar}} geometry of \code{\link{ggplot2}} is imposed on the
#'
#' @param smdef A source mu... | /R/ggmebars.R | no_license | Jaimedlrm/entropies | R | false | false | 2,469 | r | #' @title Grammar-of-Graphics Multivariate entropy stacked bar constructor
#'
#' @description
#' This function creates a stacked bar graph of entropies issued from \code{\link{sentropies}}.
#'
#' @details The \code{\link{geom_bar}} geometry of \code{\link{ggplot2}} is imposed on the
#'
#' @param smdef A source mu... |
### Module Functions:
# Change-log:
# V1.0 18-07-2014 Erik Initiation of this file
# V1.1 19-07-2014 Erik Pimping "plot.module.size", add "plot.module.overlap"
# V1.2 23-07-2014 Erik debug introduced incompatibility (V1.0->V1.1) in "plot.module.overlap"
# V1.3 19-01-2015 Erik Add functions: "get.module.me", "get.samp... | /RFunctions/module.functions_V1.10.R | no_license | transcriptome-in-transition/Transcriptome-in-transition | R | false | false | 15,462 | r |
### Module Functions:
# Change-log:
# V1.0 18-07-2014 Erik Initiation of this file
# V1.1 19-07-2014 Erik Pimping "plot.module.size", add "plot.module.overlap"
# V1.2 23-07-2014 Erik debug introduced incompatibility (V1.0->V1.1) in "plot.module.overlap"
# V1.3 19-01-2015 Erik Add functions: "get.module.me", "get.samp... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gbh.R
\name{Adaptive.GBH}
\alias{Adaptive.GBH}
\title{Adaptive Group Benjamini-Hochberg Procedure}
\usage{
Adaptive.GBH(unadj.p, group.index, alpha = 0.05, method = "lsl", lambda = 0.5)
}
\arguments{
\item{unadj.p}{A vector of the unadjusted ... | /man/Adaptive.GBH.Rd | no_license | krisrs1128/structSSI | R | false | true | 3,188 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gbh.R
\name{Adaptive.GBH}
\alias{Adaptive.GBH}
\title{Adaptive Group Benjamini-Hochberg Procedure}
\usage{
Adaptive.GBH(unadj.p, group.index, alpha = 0.05, method = "lsl", lambda = 0.5)
}
\arguments{
\item{unadj.p}{A vector of the unadjusted ... |
#
# This test file has been generated by kwb.test::create_test_files()
#
test_that("nodeIdToRowColumn() works", {
expect_error(
kwb.demeau:::nodeIdToRowColumn()
# argument "nodeID" is missing, with no default
)
})
| /tests/testthat/test-function-nodeIdToRowColumn.R | permissive | KWB-R/kwb.demeau | R | false | false | 243 | r | #
# This test file has been generated by kwb.test::create_test_files()
#
test_that("nodeIdToRowColumn() works", {
expect_error(
kwb.demeau:::nodeIdToRowColumn()
# argument "nodeID" is missing, with no default
)
})
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{get_distance}
\alias{get_distance}
\title{Distance between two geographic entities}
\usage{
get_distance(origin, destination, year = 2012, theta = -1,
data = NULL, code_format = "iso3c", data_url = NULL,
data_store = T)
... | /man/get_distance.Rd | no_license | julianhinz/gravity.distances | R | false | true | 1,294 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{get_distance}
\alias{get_distance}
\title{Distance between two geographic entities}
\usage{
get_distance(origin, destination, year = 2012, theta = -1,
data = NULL, code_format = "iso3c", data_url = NULL,
data_store = T)
... |
\name{hsegHMM_N}
\alias{hsegHMM_N}
\title{The hsegHMM procedure for normally distributed log(Ratio) values}
\description{
A hidden Markov model approach that accounts for hypersegmentation
for allele-specific SCNA analysis for normally distributed log(Ratio) values
}
\usage{ hsegHM... | /source/man/hsegHMM_N.Rd | no_license | wheelerb/hsegHMM | R | false | false | 4,576 | rd |
\name{hsegHMM_N}
\alias{hsegHMM_N}
\title{The hsegHMM procedure for normally distributed log(Ratio) values}
\description{
A hidden Markov model approach that accounts for hypersegmentation
for allele-specific SCNA analysis for normally distributed log(Ratio) values
}
\usage{ hsegHM... |
#' @title Slice rows in data.frame
#' @description Analogous function for \code{slice} in \pkg{dplyr}
#' @param data data.frame
#' @param ... Integer row values.
#' @return data.table
#' @seealso \code{\link[dplyr]{slice}}
#' @examples
#' iris %>% slice_dt(1:3)
#' iris %>% slice_dt(1,3)
#' iris %>% slice_dt(... | /R/slice_dt.R | permissive | hope-data-science/tidydt | R | false | false | 743 | r |
#' @title Slice rows in data.frame
#' @description Analogous function for \code{slice} in \pkg{dplyr}
#' @param data data.frame
#' @param ... Integer row values.
#' @return data.table
#' @seealso \code{\link[dplyr]{slice}}
#' @examples
#' iris %>% slice_dt(1:3)
#' iris %>% slice_dt(1,3)
#' iris %>% slice_dt(... |
\name{fitted.slrm}
\Rdversion{1.1}
\alias{fitted.slrm}
\title{
Fitted Probabilities for Spatial Logistic Regression
}
\description{
Given a fitted Spatial Logistic Regression model,
this function computes the fitted probabilities for each pixel.
}
\usage{
\method{fitted}{slrm}(object, ...)
}
\arguments{
\item... | /man/fitted.slrm.Rd | no_license | chenjiaxun9/spatstat | R | false | false | 1,259 | rd | \name{fitted.slrm}
\Rdversion{1.1}
\alias{fitted.slrm}
\title{
Fitted Probabilities for Spatial Logistic Regression
}
\description{
Given a fitted Spatial Logistic Regression model,
this function computes the fitted probabilities for each pixel.
}
\usage{
\method{fitted}{slrm}(object, ...)
}
\arguments{
\item... |
library("lattice")
# 示例数据
# CD103 stage
# 10 1
# 23 1
# 12 1
# 25 2
# 32 2
# 34 2
# 43 2
# 45 3
# 46 3
# 76 3
# 2 4
# 3 4
data=read.csv('clipboard',sep="\t",header=T)
xyplot(CD103~stage,data)
par(cex = 0.6);
par(mar = c(3,3,2,1))
par(mfrow=c(1,2))
#http://r.789695.n4.nabble.com/overlap-dot-plots-with-box-plots-td2... | /R_scripts/visulization/stripchart_boxplot.R | no_license | DawnEve/bioToolKit | R | false | false | 1,191 | r | library("lattice")
# 示例数据
# CD103 stage
# 10 1
# 23 1
# 12 1
# 25 2
# 32 2
# 34 2
# 43 2
# 45 3
# 46 3
# 76 3
# 2 4
# 3 4
data=read.csv('clipboard',sep="\t",header=T)
xyplot(CD103~stage,data)
par(cex = 0.6);
par(mar = c(3,3,2,1))
par(mfrow=c(1,2))
#http://r.789695.n4.nabble.com/overlap-dot-plots-with-box-plots-td2... |
#Generate figures using wsyn base code
setwd("C:/Users/Tom/Documents/GitRepos/mbsync/AndersDeerShort")
library(reshape2)
library(tools)
library(fields)
library(shape)
library(devtools)
library(wsyn)
minyear<-1981
maxyear<-2016
dens.flag<-"dnr"
nsurrogs<-1000
source("Code/Deer_DataGeneration.R")
source("Code/Climate_D... | /QC_Tests/test_plots.R | no_license | reumandc/TomAnderson_WIdeer | R | false | false | 6,585 | r | #Generate figures using wsyn base code
setwd("C:/Users/Tom/Documents/GitRepos/mbsync/AndersDeerShort")
library(reshape2)
library(tools)
library(fields)
library(shape)
library(devtools)
library(wsyn)
minyear<-1981
maxyear<-2016
dens.flag<-"dnr"
nsurrogs<-1000
source("Code/Deer_DataGeneration.R")
source("Code/Climate_D... |
## Put comments here that give an overall description of what your
## functions do
##Special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
invMatrix <- NULL
set <- function(actualMatrix)
{
x <<- actualMatrix
invMatrix <<- NULL
}
## Get input matr... | /cachematrix.R | no_license | JavierQuinteroRamirez/ProgrammingAssignment2 | R | false | false | 983 | r | ## Put comments here that give an overall description of what your
## functions do
##Special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
invMatrix <- NULL
set <- function(actualMatrix)
{
x <<- actualMatrix
invMatrix <<- NULL
}
## Get input matr... |
context("KNN regression")
model <- knn_model(ts(c(2, 3, 1, 5, 4, 0, 7, 1, 2)), lags = 1:2, k = 2)
r <- list(
prediction = 3,
neighbors = c(3, 4)
)
test_that("knn regression with one target", {
expect_equal(regression(model, c(1, 2), k = 2), r)
})
model <- knn_model(ts(c(2, 3, 1, 5, 4, 0, 7, 1, 2)), lags = 1:2,... | /tests/testthat/test_regression.R | no_license | emraher/tsfknn | R | false | false | 808 | r | context("KNN regression")
model <- knn_model(ts(c(2, 3, 1, 5, 4, 0, 7, 1, 2)), lags = 1:2, k = 2)
r <- list(
prediction = 3,
neighbors = c(3, 4)
)
test_that("knn regression with one target", {
expect_equal(regression(model, c(1, 2), k = 2), r)
})
model <- knn_model(ts(c(2, 3, 1, 5, 4, 0, 7, 1, 2)), lags = 1:2,... |
library(RCurl)
library(XML)
library(stringr)
library(dplyr)
library(readr)
library(reshape2)
setwd("C:/Users/Stephen/Desktop/R/EDA/distress")
# get census county fips codes
fips_url <- getURL("http://www2.census.gov/geo/docs/reference/codes/files/national_county.txt")
fips <- read.csv(text = fips_url)
write_csv(fips,... | /distress_counties/build_county_distress_data.R | no_license | sdevine188/leaflet_js | R | false | false | 12,970 | r | library(RCurl)
library(XML)
library(stringr)
library(dplyr)
library(readr)
library(reshape2)
setwd("C:/Users/Stephen/Desktop/R/EDA/distress")
# get census county fips codes
fips_url <- getURL("http://www2.census.gov/geo/docs/reference/codes/files/national_county.txt")
fips <- read.csv(text = fips_url)
write_csv(fips,... |
library(tidyverse)
library(pheatmap)
library(viridis)
library(stringdist)
library(matrixStats)
library(magrittr)
library(ggbeeswarm)
require(svglite)
theme_set(theme_minimal())
#' Define all input files:
bc_count_file <- "../01_counting-barcodes/AAV-lib3/output/merged-barcode-counts.tsv.gz"
bc_info_file <- "Lib3_Over... | /02_analysis/Lib3-analysis.R | no_license | jaeilpark/AAV-screening | R | false | false | 16,133 | r | library(tidyverse)
library(pheatmap)
library(viridis)
library(stringdist)
library(matrixStats)
library(magrittr)
library(ggbeeswarm)
require(svglite)
theme_set(theme_minimal())
#' Define all input files:
bc_count_file <- "../01_counting-barcodes/AAV-lib3/output/merged-barcode-counts.tsv.gz"
bc_info_file <- "Lib3_Over... |
#' load the data and make it pretty
#'
#' load the data set and add some useful columns that can be comuted from the rest
#' very idosyncratic for this specific data file.
#'
#'
#' @param datafilename The name of the file where the data is saved as csv (include .csv in the filename).
#' @return A data frame with the... | /analysis/data_preprocessing.R | no_license | blewke/jymmin_cognition | R | false | false | 6,649 | r | #' load the data and make it pretty
#'
#' load the data set and add some useful columns that can be comuted from the rest
#' very idosyncratic for this specific data file.
#'
#'
#' @param datafilename The name of the file where the data is saved as csv (include .csv in the filename).
#' @return A data frame with the... |
make_expression <- function(col, txt, joiner){
# col = iterable with items to insert into text
# text = string into which to insert item sin col. Insert location is specified by '%s'
# joiner = character/s to join the text with items inserted from col
expression <- ''
for (x in col) {
expression <- pas... | /safer_streets_priority_finder/R/fct_sliding_windows_tool.R | permissive | dflynn-volpe/Safer-Streets-Priority-Finder | R | false | false | 33,422 | r |
make_expression <- function(col, txt, joiner){
# col = iterable with items to insert into text
# text = string into which to insert item sin col. Insert location is specified by '%s'
# joiner = character/s to join the text with items inserted from col
expression <- ''
for (x in col) {
expression <- pas... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{rnb.find.relative.site.coord}
\alias{rnb.find.relative.site.coord}
\title{rnb.find.relative.site.coord}
\usage{
rnb.find.relative.site.coord(rnb.set, region.type, extend.by = 0.33)
}
\arguments{
\item{rnb.set}{RnBSet object}
\item{region.type}{Region type for ... | /RnBeads/RnBeads/man/rnb.find.relative.site.coord.Rd | permissive | relshire/epiGBS | R | false | false | 1,116 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{rnb.find.relative.site.coord}
\alias{rnb.find.relative.site.coord}
\title{rnb.find.relative.site.coord}
\usage{
rnb.find.relative.site.coord(rnb.set, region.type, extend.by = 0.33)
}
\arguments{
\item{rnb.set}{RnBSet object}
\item{region.type}{Region type for ... |
# Thermostat (Meadows ch.2) -- version 1.0
# (one stock with competing balancing loops)
# CPSC 420 -- spring 2016
# Set up time. (delta.t and time vector).
delta.t <- 1/60 # hrs
starting.time <- 0
time <- seq(starting.time,24*7,delta.t) # hrs
# itot() and ttoi() functions (if desired).
itot <- functio... | /sd/thermostat.R | no_license | Adyke95/cpsc420 | R | false | false | 2,833 | r |
# Thermostat (Meadows ch.2) -- version 1.0
# (one stock with competing balancing loops)
# CPSC 420 -- spring 2016
# Set up time. (delta.t and time vector).
delta.t <- 1/60 # hrs
starting.time <- 0
time <- seq(starting.time,24*7,delta.t) # hrs
# itot() and ttoi() functions (if desired).
itot <- functio... |
## usethis namespace: start
#' @importFrom Rcpp sourceCpp
#' @useDynLib phfrailty, .registration = TRUE
## usethis namespace: end
NULL
| /R/phfrailty-package.R | permissive | jorgeyslas/phfrailty | R | false | false | 135 | r | ## usethis namespace: start
#' @importFrom Rcpp sourceCpp
#' @useDynLib phfrailty, .registration = TRUE
## usethis namespace: end
NULL
|
#' recurrence_interval_prob
#'
#' This function determines the risk from finding the probability in any given year that a flood of that magnitude will be equaled or exceeded
#' @param Y years in record
#' @param R magnitude ranking
#' @return the risk in in any given year that a flood of that magnitude will be equaled ... | /R/recurrence_interval_prob.R | no_license | claudiapflores/garage | R | false | false | 796 | r | #' recurrence_interval_prob
#'
#' This function determines the risk from finding the probability in any given year that a flood of that magnitude will be equaled or exceeded
#' @param Y years in record
#' @param R magnitude ranking
#' @return the risk in in any given year that a flood of that magnitude will be equaled ... |
#-------------------------------------------------------------------------------------
# Function to generate design operator calX (as a n-list of d1Xd2-matrices) and noise
#-------------------------------------------------------------------------------------
data_genXe <- function(n,d1,d2,sd){
p = d1*d2
elm =... | /trace-regression.R | no_license | philipthomp/Outlier-robust-regression | R | false | false | 7,344 | r | #-------------------------------------------------------------------------------------
# Function to generate design operator calX (as a n-list of d1Xd2-matrices) and noise
#-------------------------------------------------------------------------------------
data_genXe <- function(n,d1,d2,sd){
p = d1*d2
elm =... |
#' Run a presser app in another process
#'
#' Runs an app in a subprocess, using [callr::r_session].
#'
#' @param app `presser_app` object, the web app to run.
#' @param port Port to use. By default the OS assigns a port.
#' @param opts Server options. See [server_opts()] for the defaults.
#' @param process_ti... | /R/app-process.R | permissive | cran/presser | R | false | false | 6,318 | r |
#' Run a presser app in another process
#'
#' Runs an app in a subprocess, using [callr::r_session].
#'
#' @param app `presser_app` object, the web app to run.
#' @param port Port to use. By default the OS assigns a port.
#' @param opts Server options. See [server_opts()] for the defaults.
#' @param process_ti... |
library('ggplot2')
pa <- as.data.frame(read.csv("tiemposno.csv"))
sec <-as.data.frame(read.csv("tiempos.csv"))
por<-as.data.frame(read.csv("porciento200.csv"))
ambos<- data.frame()
ambos<-rbind(pa,sec)
ambos$Poblacion <- as.factor(ambos$Poblacion)
#png(paste("ambos.png", sep=""), width=700, height=700)
#ggplot(... | /P11/graficas.R | no_license | ValeryGomez/SimulacionSistemas | R | false | false | 978 | r | library('ggplot2')
pa <- as.data.frame(read.csv("tiemposno.csv"))
sec <-as.data.frame(read.csv("tiempos.csv"))
por<-as.data.frame(read.csv("porciento200.csv"))
ambos<- data.frame()
ambos<-rbind(pa,sec)
ambos$Poblacion <- as.factor(ambos$Poblacion)
#png(paste("ambos.png", sep=""), width=700, height=700)
#ggplot(... |
#' Joint Random Forest for the simultaneous estimation of multiple related networks
#'
#' MAIN FUNCTION -- > iJRFNet
importance <- function(x, scale=TRUE) {
# --- Function importance is a modified version of function importance from R package randomForest
type=NULL;
class=NULL;
if (!inherits(x, "randomFor... | /iJRFNet_Anna_Pipeline/iJRFNet Original/R/iJRFNet_parallel_permutation.R | no_license | shalinkpatel/JRF | R | false | false | 40,478 | r | #' Joint Random Forest for the simultaneous estimation of multiple related networks
#'
#' MAIN FUNCTION -- > iJRFNet
importance <- function(x, scale=TRUE) {
# --- Function importance is a modified version of function importance from R package randomForest
type=NULL;
class=NULL;
if (!inherits(x, "randomFor... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xform.R
\name{xform}
\alias{xform}
\alias{xform.default}
\alias{xform.character}
\alias{xform.list}
\alias{xform.shape3d}
\alias{xform.mesh3d}
\alias{xform.neuron}
\alias{xform.data.frame}
\alias{xform.dotprops}
\alias{xform.neuronlist}
\titl... | /man/xform.Rd | no_license | natverse/nat | R | false | true | 6,844 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xform.R
\name{xform}
\alias{xform}
\alias{xform.default}
\alias{xform.character}
\alias{xform.list}
\alias{xform.shape3d}
\alias{xform.mesh3d}
\alias{xform.neuron}
\alias{xform.data.frame}
\alias{xform.dotprops}
\alias{xform.neuronlist}
\titl... |
## this script create a list of file names that was saved into data folder
## and use a for loop to extract all content inside of each file
# create a list with all file names
file_names <- dir('./01_data', pattern = '*NotaCorretagem*')
# extract text from each file and append into a list
text_raw <- list()
for (i... | /02_script/02_scr_files.R | no_license | elsiormoreira/brokerage_project | R | false | false | 566 | r |
## this script create a list of file names that was saved into data folder
## and use a for loop to extract all content inside of each file
# create a list with all file names
file_names <- dir('./01_data', pattern = '*NotaCorretagem*')
# extract text from each file and append into a list
text_raw <- list()
for (i... |
#' Sphere Function
#'
#' Also known as the the \dQuote{De Jong function 1}. Convex, continous function
#' calculated via the formula
#' \deqn{f(\mathbf{x}) = \sum_{i=1}^{n} \mathbf{x}_i^2}
#' with box-constraings \eqn{\mathbf{x}_i \in [-5.12, 5.12], i = 1, \ldots, n}.
#'
#' @references M. A. Schumer, K. Steiglitz, Adap... | /R/sof.sphere.R | no_license | mllg/smoof | R | false | false | 1,410 | r | #' Sphere Function
#'
#' Also known as the the \dQuote{De Jong function 1}. Convex, continous function
#' calculated via the formula
#' \deqn{f(\mathbf{x}) = \sum_{i=1}^{n} \mathbf{x}_i^2}
#' with box-constraings \eqn{\mathbf{x}_i \in [-5.12, 5.12], i = 1, \ldots, n}.
#'
#' @references M. A. Schumer, K. Steiglitz, Adap... |
##' Recommendation functions.
##'
##' @name recommendation-functions
# Create a helper function to calculate the cosine between two vectors
help.get_cosine = function(x,y)
{
this.cosine = sum(x*y) / (sqrt(sum(x*x)) * sqrt(sum(y*y)))
if (!is.nan(this.cosine))
{
return(this.cosine)
}
else
{
return(0)... | /src/recommender/R/recommendation-functions.R | no_license | savchukndr/temat14 | R | false | false | 6,309 | r | ##' Recommendation functions.
##'
##' @name recommendation-functions
# Create a helper function to calculate the cosine between two vectors
help.get_cosine = function(x,y)
{
this.cosine = sum(x*y) / (sqrt(sum(x*x)) * sqrt(sum(y*y)))
if (!is.nan(this.cosine))
{
return(this.cosine)
}
else
{
return(0)... |
#Mac
if(R.version$platform == "x86_64-apple-darwin15.6.0")
setwd("/Users/aleach/Google Drive")
#PC
if(R.version$platform == "x86_64-w64-mingw32")
setwd("C:/Users/aleach/Google Drive")
print(getwd())
#FORECASTS
if(!exists("get_forecast_report", mode="function")) source("aeso_scrapes.R")
#seasons
if(!exists("getS... | /alt_code/ghgs_merit.R | no_license | leachandrew/alberta_power | R | false | false | 6,790 | r | #Mac
if(R.version$platform == "x86_64-apple-darwin15.6.0")
setwd("/Users/aleach/Google Drive")
#PC
if(R.version$platform == "x86_64-w64-mingw32")
setwd("C:/Users/aleach/Google Drive")
print(getwd())
#FORECASTS
if(!exists("get_forecast_report", mode="function")) source("aeso_scrapes.R")
#seasons
if(!exists("getS... |
# make_expectation(spec_seeds1(c(1), mo = 4), "is_identical_to")
# make_expectation(spec_seeds1(c(1,1), mo = 4) , "is_identical_to")
# make_expectation(spec_seeds1(c(1,1,1), mo = 4) , "is_identical_to")
# make_expectation(spec_seeds1(c(1,1,1,1), mo = 4) , "is_identical_to")
# make_expectation(spec_seeds1(c(2,2,2,... | /tests/testthat/test-co_ones.R | no_license | cran/mcompanion | R | false | false | 3,071 | r | # make_expectation(spec_seeds1(c(1), mo = 4), "is_identical_to")
# make_expectation(spec_seeds1(c(1,1), mo = 4) , "is_identical_to")
# make_expectation(spec_seeds1(c(1,1,1), mo = 4) , "is_identical_to")
# make_expectation(spec_seeds1(c(1,1,1,1), mo = 4) , "is_identical_to")
# make_expectation(spec_seeds1(c(2,2,2,... |
# Removes whole taxa if maximum relative abundance is below cutoff
# Good for uneven sampling and uneven distribution, to avoid losing relatively
# rare but discrimnant taxa.
# Anders Lanzen 2018
# Recommended minRelativeAbundance is 10/(the number of reads in the least sequeneced sample)
dropRareByMaxAbundance = fun... | /R/utils/filtering.R | no_license | lanzen/MicrobialMonitoringMandala | R | false | false | 3,886 | r | # Removes whole taxa if maximum relative abundance is below cutoff
# Good for uneven sampling and uneven distribution, to avoid losing relatively
# rare but discrimnant taxa.
# Anders Lanzen 2018
# Recommended minRelativeAbundance is 10/(the number of reads in the least sequeneced sample)
dropRareByMaxAbundance = fun... |
# server.R
require("jsonlite")
require("RCurl")
require(ggplot2)
require(dplyr)
require(shiny)
require(shinydashboard)
require(leaflet)
require(DT)
shinyServer(function(input, output) {
dfQ1 <- data.frame(fromJSON(getURL(URLencode(gsub("\n", " ", 'skipper.cs.utexas.edu:5001/rest/native/?query="""select BUDGEN, YE... | /04 Shiny (ui.R and server.R)/QuanShiny/server.R | no_license | spradling/DataVis--WarAndPeace | R | false | false | 2,036 | r | # server.R
require("jsonlite")
require("RCurl")
require(ggplot2)
require(dplyr)
require(shiny)
require(shinydashboard)
require(leaflet)
require(DT)
shinyServer(function(input, output) {
dfQ1 <- data.frame(fromJSON(getURL(URLencode(gsub("\n", " ", 'skipper.cs.utexas.edu:5001/rest/native/?query="""select BUDGEN, YE... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distinct.R
\name{distinct}
\alias{distinct}
\title{Select distinct/unique rows}
\usage{
distinct(.data, ..., .keep_all = FALSE)
}
\arguments{
\item{.data}{a tbl}
\item{...}{<\code{\link[=dplyr_tidy_eval]{tidy-eval}}> Optional variables to us... | /man/distinct.Rd | permissive | boke0/dplyr | R | false | true | 1,939 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distinct.R
\name{distinct}
\alias{distinct}
\title{Select distinct/unique rows}
\usage{
distinct(.data, ..., .keep_all = FALSE)
}
\arguments{
\item{.data}{a tbl}
\item{...}{<\code{\link[=dplyr_tidy_eval]{tidy-eval}}> Optional variables to us... |
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = c(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, 0, 0, 0, 0, 0), ra = numeric(0), relh = -1.72131968194159e+83, rs = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, ... | /meteor/inst/testfiles/ET0_PenmanMonteith/AFL_ET0_PenmanMonteith/ET0_PenmanMonteith_valgrind_files/1615839200-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 826 | r | testlist <- list(G = numeric(0), Rn = numeric(0), atmp = c(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, 0, 0, 0, 0, 0), ra = numeric(0), relh = -1.72131968194159e+83, rs = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coo-ldk-utilities.R
\name{ldk_check}
\alias{ldk_check}
\title{Checks 'ldk' shapes}
\usage{
ldk_check(ldk)
}
\arguments{
\item{ldk}{a \code{matrix} of (x; y) coordinates, a list, or an array.}
}
\value{
an \code{array} of (x; y) coordinates.
}... | /man/ldk_check.Rd | no_license | chris-english/Momocs | R | false | true | 899 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coo-ldk-utilities.R
\name{ldk_check}
\alias{ldk_check}
\title{Checks 'ldk' shapes}
\usage{
ldk_check(ldk)
}
\arguments{
\item{ldk}{a \code{matrix} of (x; y) coordinates, a list, or an array.}
}
\value{
an \code{array} of (x; y) coordinates.
}... |
## Writing functions to get inverse of mstrix
## creating the matrix
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function()x
setinverse <- function(solve) m <<- solve
getinverse <- function()m
list(set = set, get... | /cachematrix.R | no_license | vishnupradha16/ProgrammingAssignment2 | R | false | false | 714 | r | ## Writing functions to get inverse of mstrix
## creating the matrix
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function()x
setinverse <- function(solve) m <<- solve
getinverse <- function()m
list(set = set, get... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitness_trait_space.R
\name{max_fitness}
\alias{max_fitness}
\title{Find point of maximum fitness within some range.}
\usage{
max_fitness(bounds, p, log_scale = TRUE, tol = 0.001)
}
\arguments{
\item{bounds}{Two element vector specifing range... | /man/max_fitness.Rd | no_license | PaulESantos/plant | R | false | true | 743 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitness_trait_space.R
\name{max_fitness}
\alias{max_fitness}
\title{Find point of maximum fitness within some range.}
\usage{
max_fitness(bounds, p, log_scale = TRUE, tol = 0.001)
}
\arguments{
\item{bounds}{Two element vector specifing range... |
#### CREATING A DATASET FOR DASHBOARDING ####
# Source of data: http://www.airqualityontario.com/history/index.php
# Pollutant, Nitrogen Dioxide [NO2] -- Unit, parts per billion (ppb)
# Pollutant, Fine Particulate Matter [PM2.5] -- Unit, micrograms per cubic metre (micrograms/m3)
# Pollutant, Ozone [O3] -- Unit, part... | /04_air_dashboard.R | no_license | joanmanuellopez/AirQuality | R | false | false | 6,609 | r | #### CREATING A DATASET FOR DASHBOARDING ####
# Source of data: http://www.airqualityontario.com/history/index.php
# Pollutant, Nitrogen Dioxide [NO2] -- Unit, parts per billion (ppb)
# Pollutant, Fine Particulate Matter [PM2.5] -- Unit, micrograms per cubic metre (micrograms/m3)
# Pollutant, Ozone [O3] -- Unit, part... |
# -------------------------------------------------------------------------
# INITIALISATION
# -------------------------------------------------------------------------
library(tidyverse)
library(magrittr)
library(pdftools)
library(tidytext)
# -----------------------------------------------------------------------... | /short-circuit-pdf/R/parse_pdf.R | permissive | NickPTaylor/short-circuit-pdf | R | false | false | 2,028 | r | # -------------------------------------------------------------------------
# INITIALISATION
# -------------------------------------------------------------------------
library(tidyverse)
library(magrittr)
library(pdftools)
library(tidytext)
# -----------------------------------------------------------------------... |
# Learn about API authentication here: {{BASE_URL}}/r/getting-started
# Find your api_key here: {{BASE_URL}}/settings/api
library(plotly)
py <- plotly(username='TestBot', key='r1neazxo9w')
trace1 <- list(
x = c(0, 1, 2, 3, 4, 5, 6, 7, 8),
y = c(8, 7, 6, 5, 4, 3, 2, 1, 0),
type = "scatter"
)
trace2 <- list(
... | /auto-docs/executables/r/axes_lines.r | no_license | VukDukic/documentation | R | false | false | 1,100 | r | # Learn about API authentication here: {{BASE_URL}}/r/getting-started
# Find your api_key here: {{BASE_URL}}/settings/api
library(plotly)
py <- plotly(username='TestBot', key='r1neazxo9w')
trace1 <- list(
x = c(0, 1, 2, 3, 4, 5, 6, 7, 8),
y = c(8, 7, 6, 5, 4, 3, 2, 1, 0),
type = "scatter"
)
trace2 <- list(
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{CMIP5}
\alias{CMIP5}
\title{CMIP5 data for the Mwache river basin}
\format{An object of class \code{data.frame} with 118 rows and 4 columns.}
\usage{
CMIP5
}
\description{
Provided to show how GCM data can be overl... | /man/CMIP5.Rd | no_license | tbadams45/wrviz | R | false | true | 366 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{CMIP5}
\alias{CMIP5}
\title{CMIP5 data for the Mwache river basin}
\format{An object of class \code{data.frame} with 118 rows and 4 columns.}
\usage{
CMIP5
}
\description{
Provided to show how GCM data can be overl... |
#' Function to return the TL1 and TL2 hydrologic indicator statistics for a given data frame
#'
#' This function accepts a data frame that contains a column named "discharge" and calculates
#' TL1; Julian date of annual minimum. Determine the Julian date that the minimum flow occurs for each water year.
#' Transform... | /R/tl1.2.R | no_license | jlthomps/EflowStats | R | false | false | 2,335 | r | #' Function to return the TL1 and TL2 hydrologic indicator statistics for a given data frame
#'
#' This function accepts a data frame that contains a column named "discharge" and calculates
#' TL1; Julian date of annual minimum. Determine the Julian date that the minimum flow occurs for each water year.
#' Transform... |
## ----carga, echo=FALSE---------------------------------------------------
load("../data/share_def4.RData")
## ----librerias, echo=FALSE, message=FALSE,warning=FALSE------------------
library(ggplot2)
library(lme4)
library(scales)
## ----glminicial----------------------------------------------------------
fit1 <- ... | /Informes/1_Enfoque_multinivel_intro.R | no_license | joscani/Env_Activo_reproducible | R | false | false | 2,765 | r |
## ----carga, echo=FALSE---------------------------------------------------
load("../data/share_def4.RData")
## ----librerias, echo=FALSE, message=FALSE,warning=FALSE------------------
library(ggplot2)
library(lme4)
library(scales)
## ----glminicial----------------------------------------------------------
fit1 <- ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clo.R
\name{cloSysVarIn}
\alias{cloSysVarIn}
\title{Compares a baseline "intercepts only" model to one including the system variable for predicting the dynamic parameters of the coupled oscillator model.}
\usage{
cloSysVarIn(basedata, sysVarT... | /man/cloSysVarIn.Rd | no_license | ebmtnprof/qid | R | false | true | 1,799 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clo.R
\name{cloSysVarIn}
\alias{cloSysVarIn}
\title{Compares a baseline "intercepts only" model to one including the system variable for predicting the dynamic parameters of the coupled oscillator model.}
\usage{
cloSysVarIn(basedata, sysVarT... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/dataDocs.R
\docType{data}
\name{amicusCorpus}
\alias{amicus}
\alias{amicusCorpus}
\alias{amicusTexts}
\title{amicus curiae briefs from Bakke (1978) and Bollinger (2008)}
\format{\code{amicusCorpus} is corpus with 100 texts, and \code{... | /man/amicusCorpus.Rd | no_license | pjsio/quantedaData | R | false | false | 853 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/dataDocs.R
\docType{data}
\name{amicusCorpus}
\alias{amicus}
\alias{amicusCorpus}
\alias{amicusTexts}
\title{amicus curiae briefs from Bakke (1978) and Bollinger (2008)}
\format{\code{amicusCorpus} is corpus with 100 texts, and \code{... |
library(GEOquery)
# Read in the annotated studies
# Column names in this table are keep, drug, gse, gsm, sample_group
all.studies.tab = read.table('Data/GEO/human_GPL570_n6_toAnnotate_completed.txt',
sep = '\t', header = T, stringsAsFactors = F)
all.studies.tab = all.studies.tab[all.studie... | /R/02-downloadStudies.R | no_license | CostelloLab/GSEARerank | R | false | false | 3,102 | r | library(GEOquery)
# Read in the annotated studies
# Column names in this table are keep, drug, gse, gsm, sample_group
all.studies.tab = read.table('Data/GEO/human_GPL570_n6_toAnnotate_completed.txt',
sep = '\t', header = T, stringsAsFactors = F)
all.studies.tab = all.studies.tab[all.studie... |
context("Download")
test_that("download_method", {
mockery::stub(download_method, "get_r_version", "3.3.0")
expect_equal(download_method(), "auto")
mockery::stub(download_method, "get_r_version", "3.2.5")
mockery::stub(download_method, "os_type", "windows")
expect_equal(download_method(), "wininet")
mo... | /tests/testthat/test-download.R | no_license | bleutner/remotes | R | false | false | 2,251 | r |
context("Download")
test_that("download_method", {
mockery::stub(download_method, "get_r_version", "3.3.0")
expect_equal(download_method(), "auto")
mockery::stub(download_method, "get_r_version", "3.2.5")
mockery::stub(download_method, "os_type", "windows")
expect_equal(download_method(), "wininet")
mo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/benchmarkTest.R
\name{friedmanPostHocTestBMR}
\alias{friedmanPostHocTestBMR}
\title{Perform a posthoc Friedman-Nemenyi test.}
\usage{
friedmanPostHocTestBMR(bmr, measure = NULL, p.value = 0.05,
aggregation = "default")
}
\arguments{
\item{b... | /man/friedmanPostHocTestBMR.Rd | no_license | abhik1368/mlr | R | false | true | 2,795 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/benchmarkTest.R
\name{friedmanPostHocTestBMR}
\alias{friedmanPostHocTestBMR}
\title{Perform a posthoc Friedman-Nemenyi test.}
\usage{
friedmanPostHocTestBMR(bmr, measure = NULL, p.value = 0.05,
aggregation = "default")
}
\arguments{
\item{b... |
\name{pack}
\alias{pack}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
Compile network information into a network class.
}
\description{
This function provides a flexible framework for importing flow network
information into a network class object for analyses.
}
\us... | /src/debugging/diff/enaR_100/man/pack.Rd | no_license | SEELab/enaR_development | R | false | false | 1,950 | rd | \name{pack}
\alias{pack}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
Compile network information into a network class.
}
\description{
This function provides a flexible framework for importing flow network
information into a network class object for analyses.
}
\us... |
##this will turn matlab output into a pretty graph without having to think about it.
# install.packages(c("Cairo"), repos="http://cran.r-project.org" )
library(Cairo)
library(plyr)
library(ggplot2)
library(grid)
source("C:/Users/phug7649/Desktop/TXTBIN/R-scripts/functions/make_letter_ids.R")
##input files for matlab:
... | /mesonplot.R | no_license | p-hughes/Dirty_business | R | false | false | 4,122 | r | ##this will turn matlab output into a pretty graph without having to think about it.
# install.packages(c("Cairo"), repos="http://cran.r-project.org" )
library(Cairo)
library(plyr)
library(ggplot2)
library(grid)
source("C:/Users/phug7649/Desktop/TXTBIN/R-scripts/functions/make_letter_ids.R")
##input files for matlab:
... |
#######################################
###professor Choi, shizu@snu.ac.kr ####
#######################################
#######################################
########dplyr(데이터 전처리)###########
#######################################
install.packages()
install.packages("dplyr")
library(dplyr)
### 1.dplyr소개 ####... | /2_dplyr.R | no_license | LeeJeongae/2021_graduate | R | false | false | 8,612 | r | #######################################
###professor Choi, shizu@snu.ac.kr ####
#######################################
#######################################
########dplyr(데이터 전처리)###########
#######################################
install.packages()
install.packages("dplyr")
library(dplyr)
### 1.dplyr소개 ####... |
## CLT in practice: The last practice is t-distribution practice. Here will use CLT to repeat the same thing
## , but hope to see the sample size different in the ??????
## Load this data have 846 obs. not just 24 for previous practice.
library(downloader)
url <- "https://raw.githubusercontent.com/genomicsclass/dagda... | /lab/course1/CLT in practice.R | no_license | chadchouGitHub/GenomeNote | R | false | false | 3,006 | r |
## CLT in practice: The last practice is t-distribution practice. Here will use CLT to repeat the same thing
## , but hope to see the sample size different in the ??????
## Load this data have 846 obs. not just 24 for previous practice.
library(downloader)
url <- "https://raw.githubusercontent.com/genomicsclass/dagda... |
margK <-
function(m){
n <- dim(m)
dimnames(m) <- NULL
if(length(n) == 3) {
n1 <- n[1] * n[2]
dim(m) <- c(n1, n[3])
mm <- apply(m, 2, sum)
} else {
cat(" Wrong dimension m")
return(0)
}
}
| /R/margK.R | no_license | cran/CA3variants | R | false | false | 266 | r | margK <-
function(m){
n <- dim(m)
dimnames(m) <- NULL
if(length(n) == 3) {
n1 <- n[1] * n[2]
dim(m) <- c(n1, n[3])
mm <- apply(m, 2, sum)
} else {
cat(" Wrong dimension m")
return(0)
}
}
|
# install package
if ( ! any(grepl("RWeka" , installed.packages()))) install.packages("RWeka")
# load the package
library(RWeka)
# load data
data(iris)
# fit model
fit <- J48(Species~., data=iris)
# summarize the fit
summary(fit)
# make predictions
predictions <- predict(fit, iris[,1:4])
# summarize accurac... | /DecisionTree_Exercise.R | no_license | mezud/ml-class | R | false | false | 1,970 | r | # install package
if ( ! any(grepl("RWeka" , installed.packages()))) install.packages("RWeka")
# load the package
library(RWeka)
# load data
data(iris)
# fit model
fit <- J48(Species~., data=iris)
# summarize the fit
summary(fit)
# make predictions
predictions <- predict(fit, iris[,1:4])
# summarize accurac... |
# FISH 6003: Major Assignment Data Exploration
# Note: 001_DataSetup.R must be run prior to this script.
# Visualize experiment
# Conduct data exploration:
#############################
# 1. Outliers, Y and X #
#############################
################################
# 2. Homogeneity of variance Y #
... | /analysis/002_Exploration.R | no_license | rjcommand/FISH_6003_Major_Assignment | R | false | false | 1,220 | r | # FISH 6003: Major Assignment Data Exploration
# Note: 001_DataSetup.R must be run prior to this script.
# Visualize experiment
# Conduct data exploration:
#############################
# 1. Outliers, Y and X #
#############################
################################
# 2. Homogeneity of variance Y #
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.