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 |
|---|---|---|---|---|---|---|---|---|---|
# R Style Ninja ---- www.rstyle.ninja #
# Donuts R Delicious #
library(plot3D)
# 3D Plot of Half of a Torus
par(mar = c(2, 2, 2, 2))
par(mfrow = c(1, 1))
R <- 3
r <- 2
x <- seq(0, 2*pi,length.out=50)
y <- seq(0, pi,length.out=50)
M <- mesh(x, y)
alpha <- M$x
beta <- M$y
surf3D(x = (R + r*cos(alpha)) * cos(beta), y... | /Donut.R | no_license | RStyleNinja/Donuts-R-Delicious | R | false | false | 812 | r | # R Style Ninja ---- www.rstyle.ninja #
# Donuts R Delicious #
library(plot3D)
# 3D Plot of Half of a Torus
par(mar = c(2, 2, 2, 2))
par(mfrow = c(1, 1))
R <- 3
r <- 2
x <- seq(0, 2*pi,length.out=50)
y <- seq(0, pi,length.out=50)
M <- mesh(x, y)
alpha <- M$x
beta <- M$y
surf3D(x = (R + r*cos(alpha)) * cos(beta), y... |
library(psych)
library(lme4)
library(lmerTest)
lmm.data <- read.table('../DATA/all_results/flattened_no_title.csv', header=TRUE, sep = ",", quote = "'")
nrow(lmm.data)
head(lmm.data)
# remove NaN for some reason the python code breaks the CSV
lmm.data <- lmm.data[complete.cases(lmm.data),]
nrow(lmm.data)
scores = lmm... | /STUDY2/ANALYSIS/psychometrics.R | no_license | sbchou/ANALYSIS | R | false | false | 501 | r | library(psych)
library(lme4)
library(lmerTest)
lmm.data <- read.table('../DATA/all_results/flattened_no_title.csv', header=TRUE, sep = ",", quote = "'")
nrow(lmm.data)
head(lmm.data)
# remove NaN for some reason the python code breaks the CSV
lmm.data <- lmm.data[complete.cases(lmm.data),]
nrow(lmm.data)
scores = lmm... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cbind_lapply.R
\name{cbind_lapply}
\alias{cbind_lapply}
\alias{rbind_lapply}
\title{Bind lapply results}
\usage{
cbind_lapply(X, FUN, ...)
rbind_lapply(X, FUN, ...)
}
\arguments{
\item{X}{[any]\cr
Iterable objects, e.g. list or vector.}
\it... | /man/cbind_lapply.Rd | no_license | jakobbossek/re | R | false | true | 690 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cbind_lapply.R
\name{cbind_lapply}
\alias{cbind_lapply}
\alias{rbind_lapply}
\title{Bind lapply results}
\usage{
cbind_lapply(X, FUN, ...)
rbind_lapply(X, FUN, ...)
}
\arguments{
\item{X}{[any]\cr
Iterable objects, e.g. list or vector.}
\it... |
#' Run algorithms using 'qgis_process'
#'
#' Run QGIS algorithms.
#' See the [QGIS docs](https://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/index.html)
#' for a detailed description of the algorithms provided
#' 'out of the box' on QGIS (versions >= 3.14).
#'
#' @param algorithm A qualified algorit... | /R/qgis-run-algorithm.R | no_license | Memo1986/qgisprocess | R | false | false | 2,684 | r |
#' Run algorithms using 'qgis_process'
#'
#' Run QGIS algorithms.
#' See the [QGIS docs](https://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/index.html)
#' for a detailed description of the algorithms provided
#' 'out of the box' on QGIS (versions >= 3.14).
#'
#' @param algorithm A qualified algorit... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trimFilter.R
\name{TrimAndFilter}
\alias{TrimAndFilter}
\title{Trim low-quality bases out of each reads then remove low-quality reads}
\usage{
TrimAndFilter(
fl1,
fl2 = NULL,
shortreadRAM = 1e+08,
endTrimThrs = "?",
endTrimMeanThrs ... | /man/TrimAndFilter.Rd | no_license | jliu678/SeqWins | R | false | true | 2,523 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trimFilter.R
\name{TrimAndFilter}
\alias{TrimAndFilter}
\title{Trim low-quality bases out of each reads then remove low-quality reads}
\usage{
TrimAndFilter(
fl1,
fl2 = NULL,
shortreadRAM = 1e+08,
endTrimThrs = "?",
endTrimMeanThrs ... |
library(glmnet)
mydata = read.table("./TrainingSet/AvgRank/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.85,family="gaussian",standardize=TRUE)
sink('./Model/EN/AvgRank/autonomic_ganglia/auto... | /Model/EN/AvgRank/autonomic_ganglia/autonomic_ganglia_087.R | no_license | leon1003/QSMART | R | false | false | 385 | r | library(glmnet)
mydata = read.table("./TrainingSet/AvgRank/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.85,family="gaussian",standardize=TRUE)
sink('./Model/EN/AvgRank/autonomic_ganglia/auto... |
rm(list = ls())
library(diffnet)
library(ggplot2)
load(file = "../comparision/cancer/two.pathway.rda")
header = colnames(cancer)
p = ncol(cancer)
## ---------------------------- setting -------------------------------------
nlambda = 100
lambda.min.ratio = 0.3
max.iter = 1000
stop.tol = 1e-5
npn = T
perturb = F
corre... | /simulation/cancer.R | no_license | cescwang85/Diffnet | R | false | false | 4,117 | r | rm(list = ls())
library(diffnet)
library(ggplot2)
load(file = "../comparision/cancer/two.pathway.rda")
header = colnames(cancer)
p = ncol(cancer)
## ---------------------------- setting -------------------------------------
nlambda = 100
lambda.min.ratio = 0.3
max.iter = 1000
stop.tol = 1e-5
npn = T
perturb = F
corre... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layout.R
\name{check_detector_avail}
\alias{check_detector_avail}
\title{Checks whether \code{detector_name} is preconfigured.}
\usage{
check_detector_avail(detector_name)
}
\arguments{
\item{detector_name}{The name of the detector}
}
\value{... | /man/check_detector_avail.Rd | permissive | alan-turing-institute/DetectorChecker | R | false | true | 441 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layout.R
\name{check_detector_avail}
\alias{check_detector_avail}
\title{Checks whether \code{detector_name} is preconfigured.}
\usage{
check_detector_avail(detector_name)
}
\arguments{
\item{detector_name}{The name of the detector}
}
\value{... |
library(corpcor)
### Name: mpower
### Title: Compute the Power of a Real Symmetric Matrix
### Aliases: mpower
### Keywords: algebra
### ** Examples
# load corpcor library
library("corpcor")
# generate symmetric matrix
p = 10
n = 20
X = matrix(rnorm(n*p), nrow = n, ncol = p)
m = cor(X)
m %*% m
mpower(m, 2)
solve(... | /data/genthat_extracted_code/corpcor/examples/mpower.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 394 | r | library(corpcor)
### Name: mpower
### Title: Compute the Power of a Real Symmetric Matrix
### Aliases: mpower
### Keywords: algebra
### ** Examples
# load corpcor library
library("corpcor")
# generate symmetric matrix
p = 10
n = 20
X = matrix(rnorm(n*p), nrow = n, ncol = p)
m = cor(X)
m %*% m
mpower(m, 2)
solve(... |
limmafun <- function(mat, design, p.adjust = 'BH', cutoff = 0.05, allpairs = F) {
require(limma)
require(Biobase)
require(data.table)
data <- mat[,names(design)]
dataexp <- new("ExpressionSet", exprs=data)
designmatrix <- model.matrix(~ -1+factor(design))
rownames(designmatrix) <- names(design)
colna... | /HivePlots/GSVA/limmafun.R | permissive | bwbai/ATLANTiC | R | false | false | 19,704 | r | limmafun <- function(mat, design, p.adjust = 'BH', cutoff = 0.05, allpairs = F) {
require(limma)
require(Biobase)
require(data.table)
data <- mat[,names(design)]
dataexp <- new("ExpressionSet", exprs=data)
designmatrix <- model.matrix(~ -1+factor(design))
rownames(designmatrix) <- names(design)
colna... |
# Get working directory
session_info = sessionInfo()
platform = session_info$platform
directory = "af-werx"
if(length(grep("linux|apple", platform)) > 0){
Sys.getenv("USER")
dir = paste0("~/Desktop/", directory)
}else{
username = Sys.getenv("USERNAME")
dir=paste0("C:/Users/", username, "/Desktop/", directory)... | /shiny/day-1/6-single checkbox/ui.R | no_license | jamesK1000011/Data-Science | R | false | false | 786 | r | # Get working directory
session_info = sessionInfo()
platform = session_info$platform
directory = "af-werx"
if(length(grep("linux|apple", platform)) > 0){
Sys.getenv("USER")
dir = paste0("~/Desktop/", directory)
}else{
username = Sys.getenv("USERNAME")
dir=paste0("C:/Users/", username, "/Desktop/", directory)... |
## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## -----------------------------------------------------------------------------
library(merlin)
data("pbc")
pbc[1:11,c("id","years","status","status2","drug","serBilir","prothr... | /inst/doc/merlin.R | no_license | jpkrooney/merlin | R | false | false | 1,960 | r | ## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## -----------------------------------------------------------------------------
library(merlin)
data("pbc")
pbc[1:11,c("id","years","status","status2","drug","serBilir","prothr... |
# Exercise-1: practice with basic syntax
# Create a variable `hometown` that stores the city in which you were born
hometown <- "Quezon City"
# Assign your name to the variable `my.name`
my.name <- "Royce"
# Assign your height to a variable `my.height`
my.height <- 65
# Create a variable `puppies` equal to the number ... | /exercise-1/exercise.R | permissive | roabuda/ch5-r-intro | R | false | false | 830 | r | # Exercise-1: practice with basic syntax
# Create a variable `hometown` that stores the city in which you were born
hometown <- "Quezon City"
# Assign your name to the variable `my.name`
my.name <- "Royce"
# Assign your height to a variable `my.height`
my.height <- 65
# Create a variable `puppies` equal to the number ... |
intertek2rQTL <-
function(dta, P1, P2, markerID, P1c, P2c){
# Goal : Convert a genotypic matrix from the Intertek format to the R/qtl2 format.
# Input : dta . A data.frame containing the genotypic matrix in the intertek format.
# In this format, the first column is the ... | /scripts/Intertek2rQTL.R | no_license | darizasu/work | R | false | false | 5,170 | r | intertek2rQTL <-
function(dta, P1, P2, markerID, P1c, P2c){
# Goal : Convert a genotypic matrix from the Intertek format to the R/qtl2 format.
# Input : dta . A data.frame containing the genotypic matrix in the intertek format.
# In this format, the first column is the ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_command.R
\name{get_command}
\alias{get_command}
\title{Get the command line string used to execute the current program}
\usage{
get_command()
}
\description{
Get the command line string used to execute the current program
}
| /wsim.io/man/get_command.Rd | permissive | isciences/wsim | R | false | true | 307 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_command.R
\name{get_command}
\alias{get_command}
\title{Get the command line string used to execute the current program}
\usage{
get_command()
}
\description{
Get the command line string used to execute the current program
}
|
\name{dataf.geneexp}
\alias{dataf.geneexp}
\alias{geneexp}
\docType{data}
\title{
Gene Expression Profile Data
}
\description{
A subet of the Drosophila life cycle gene expression data of Arbeitman et al. (2002). The original data set contains 77 gene expression profiles during 58 sequential time points from th... | /fuzzedpackages/ddalpha/man/dataf.geneexp.Rd | no_license | akhikolla/testpackages | R | false | false | 2,180 | rd | \name{dataf.geneexp}
\alias{dataf.geneexp}
\alias{geneexp}
\docType{data}
\title{
Gene Expression Profile Data
}
\description{
A subet of the Drosophila life cycle gene expression data of Arbeitman et al. (2002). The original data set contains 77 gene expression profiles during 58 sequential time points from th... |
##data.frame
tem1<-read.table("Euler13.txt",colClasses = c("character"))
##vector
tem2<-tem1[[1]]
##list
tem3<-strsplit(tem2,"")
##data.frame
tem4<-as.data.frame(tem3)
##matrix
tem5<-as.matrix(tem4)
##字符阵转化成数值阵
tem6<-matrix(as.numeric(tem5),nrow = nrow(tem5))
View(tem6) | /R源码/读入数据.R | no_license | xuedisong/Rscripts | R | false | false | 312 | r | ##data.frame
tem1<-read.table("Euler13.txt",colClasses = c("character"))
##vector
tem2<-tem1[[1]]
##list
tem3<-strsplit(tem2,"")
##data.frame
tem4<-as.data.frame(tem3)
##matrix
tem5<-as.matrix(tem4)
##字符阵转化成数值阵
tem6<-matrix(as.numeric(tem5),nrow = nrow(tem5))
View(tem6) |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/shuffle.R
\name{shuffle}
\alias{shuffle}
\title{shuffle}
\usage{
shuffle(x)
}
\arguments{
\item{x}{Set of ranges to be shuffled}
}
\value{
A shuffled \code{GRanges} of the same length as \code{x}
}
\description{
Shuffle a set of \co... | /man/shuffle.Rd | no_license | timpeters82/aaRon | R | false | false | 413 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/shuffle.R
\name{shuffle}
\alias{shuffle}
\title{shuffle}
\usage{
shuffle(x)
}
\arguments{
\item{x}{Set of ranges to be shuffled}
}
\value{
A shuffled \code{GRanges} of the same length as \code{x}
}
\description{
Shuffle a set of \co... |
library(wrassp)
args = commandArgs(TRUE)
# args will be like
# ${wavfile} ${output}
# ${beginTime} ${endTime}
# ${windowShift} ${window} ${resolution}
# ${fftLength}
if (length(args) != 8) {
print("Wrong number of arguments!")
q("no", status=1)
}
res = cepstrum(args[1], toFile=F... | /tools/wrassp/g_cepstrum.R | no_license | Alveo/alveo-galaxy-tools | R | false | false | 629 | r |
library(wrassp)
args = commandArgs(TRUE)
# args will be like
# ${wavfile} ${output}
# ${beginTime} ${endTime}
# ${windowShift} ${window} ${resolution}
# ${fftLength}
if (length(args) != 8) {
print("Wrong number of arguments!")
q("no", status=1)
}
res = cepstrum(args[1], toFile=F... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getCoverage.R
\name{getCoverage}
\alias{getCoverage}
\title{Computes coverage of list of intervals}
\usage{
getCoverage(data, guess)
}
\arguments{
\item{data}{2-column data frame of confidence intervals}
\item{guess}{2-element vector of conf... | /ivdoctr/man/getCoverage.Rd | no_license | akhikolla/TestedPackages-NoIssues | R | false | true | 424 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getCoverage.R
\name{getCoverage}
\alias{getCoverage}
\title{Computes coverage of list of intervals}
\usage{
getCoverage(data, guess)
}
\arguments{
\item{data}{2-column data frame of confidence intervals}
\item{guess}{2-element vector of conf... |
context("language")
test_that("NULL is a valid language object", {
expect_true(is_lang(NULL))
})
test_that("is_call() pattern-matches", {
expect_true(is_call(quote(foo(bar)), "foo"))
expect_false(is_call(quote(foo(bar)), "bar"))
expect_true(is_call(quote(foo(bar)), quote(foo)))
expect_true(is_call(~foo(bar... | /tests/testthat/test-lang.R | no_license | rlugojr/rlang | R | false | false | 1,808 | r | context("language")
test_that("NULL is a valid language object", {
expect_true(is_lang(NULL))
})
test_that("is_call() pattern-matches", {
expect_true(is_call(quote(foo(bar)), "foo"))
expect_false(is_call(quote(foo(bar)), "bar"))
expect_true(is_call(quote(foo(bar)), quote(foo)))
expect_true(is_call(~foo(bar... |
context("fetchNASIS() -- requires local NASIS and ODBC connection")
# TODO: develop minimal test set for NASIS data, stored as static SQLite DB
dsn <- NULL
## helper functions used to skip tests that rely on special conditions
# http://r-pkgs.had.co.nz/tests.html
#
# * NASIS on the local machine
# * pedons / componen... | /tests/testthat/test-fetchNASIS.R | no_license | Emory-ENVS-SihiLab/soilDB | R | false | false | 5,060 | r | context("fetchNASIS() -- requires local NASIS and ODBC connection")
# TODO: develop minimal test set for NASIS data, stored as static SQLite DB
dsn <- NULL
## helper functions used to skip tests that rely on special conditions
# http://r-pkgs.had.co.nz/tests.html
#
# * NASIS on the local machine
# * pedons / componen... |
\name{triangle.pair.test}
\alias{triangle.pair.test}
\title{Make a Triangle test for two products}
\description{
Make a Triangle test for two products.
}
\usage{
triangle.pair.test (nb.good, nb.answer)
}
\arguments{
\item{nb.good}{number of panelists who identify the odd sample}
\item{nb.answer... | /man/triangle.pair.test.Rd | no_license | cran/SensoMineR | R | false | false | 1,228 | rd | \name{triangle.pair.test}
\alias{triangle.pair.test}
\title{Make a Triangle test for two products}
\description{
Make a Triangle test for two products.
}
\usage{
triangle.pair.test (nb.good, nb.answer)
}
\arguments{
\item{nb.good}{number of panelists who identify the odd sample}
\item{nb.answer... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/project-run.R
\name{mlflow_run}
\alias{mlflow_run}
\title{Run in MLflow}
\usage{
mlflow_run(entry_point = NULL, uri = ".", version = NULL,
param_list = NULL, experiment_id = NULL, mode = NULL,
cluster_spec = NULL, git_username = NULL, git... | /mlflow/R/mlflow/man/mlflow_run.Rd | permissive | sepidehhosseinzadeh/mlflow-cpp | R | false | true | 1,546 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/project-run.R
\name{mlflow_run}
\alias{mlflow_run}
\title{Run in MLflow}
\usage{
mlflow_run(entry_point = NULL, uri = ".", version = NULL,
param_list = NULL, experiment_id = NULL, mode = NULL,
cluster_spec = NULL, git_username = NULL, git... |
#' ---
#' title: "Regression and Other Stories: Arsenic"
#' author: "Andrew Gelman, Jennifer Hill, Aki Vehtari"
#' date: "`r format(Sys.Date())`"
#' ---
#' Average predictive comparisons for a logistic regression model:
#' wells in Bangladesh. See Chapter 14 in Regression and Other Stories.
#'
#' -------------
#'
#... | /Arsenic/arsenic_logistic_apc.R | no_license | FanwangM/ROS-Examples | R | false | false | 2,947 | r | #' ---
#' title: "Regression and Other Stories: Arsenic"
#' author: "Andrew Gelman, Jennifer Hill, Aki Vehtari"
#' date: "`r format(Sys.Date())`"
#' ---
#' Average predictive comparisons for a logistic regression model:
#' wells in Bangladesh. See Chapter 14 in Regression and Other Stories.
#'
#' -------------
#'
#... |
library(epicontacts)
### Name: subset_clusters_by_size
### Title: Subset clusters from epicontacts object by cluster size
### Aliases: subset_clusters_by_size
### ** Examples
if (require(outbreaks)) {
## build data
x <- make_epicontacts(ebola_sim$linelist, ebola_sim$contacts,
id="case_id", to... | /data/genthat_extracted_code/epicontacts/examples/subset_clusters_by_size.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 773 | r | library(epicontacts)
### Name: subset_clusters_by_size
### Title: Subset clusters from epicontacts object by cluster size
### Aliases: subset_clusters_by_size
### ** Examples
if (require(outbreaks)) {
## build data
x <- make_epicontacts(ebola_sim$linelist, ebola_sim$contacts,
id="case_id", to... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nicegee.R
\name{nicegee}
\alias{nicegee}
\title{Lisa's GEE Regression Table Function - fit must be geeglm type model}
\usage{
nicegee(df, fit, family = "gaussian", id, corstr = "exch",
intercept = FALSE, ref = FALSE, labels = NA, blanks = F... | /man/nicegee.Rd | no_license | lisaerein/daphne | R | false | true | 1,505 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nicegee.R
\name{nicegee}
\alias{nicegee}
\title{Lisa's GEE Regression Table Function - fit must be geeglm type model}
\usage{
nicegee(df, fit, family = "gaussian", id, corstr = "exch",
intercept = FALSE, ref = FALSE, labels = NA, blanks = F... |
# The .thresML is a minimum threshold below which the loglikelihood is not considered
# (i.e., if the calculated loglikelihood is lower to .thresML, it is set to .thresML for numerical reasons).
.thresML = -6000
BayesianMCMC <- function (xcont, xhist=NA, infhist=NA, suphist=NA, nbans=NA, seuil=NA,
... | /nsRFA/R/BayesianMCMC.R | no_license | ingted/R-Examples | R | false | false | 56,167 | r | # The .thresML is a minimum threshold below which the loglikelihood is not considered
# (i.e., if the calculated loglikelihood is lower to .thresML, it is set to .thresML for numerical reasons).
.thresML = -6000
BayesianMCMC <- function (xcont, xhist=NA, infhist=NA, suphist=NA, nbans=NA, seuil=NA,
... |
testthat::context("Extra tests for deparser")
testthat::test_that("Reaching end of deparser_js", {
testthat::expect_error(
deparse_js(parse_expr("123"), list())
)
})
testthat::test_that("Deparse dataURI", {
path <- system.file("test_files/test_image.png", package = "sketch")
expr <- parse_expr... | /tests/testthat/test_deparse.R | permissive | kcf-jackson/sketch | R | false | false | 1,846 | r | testthat::context("Extra tests for deparser")
testthat::test_that("Reaching end of deparser_js", {
testthat::expect_error(
deparse_js(parse_expr("123"), list())
)
})
testthat::test_that("Deparse dataURI", {
path <- system.file("test_files/test_image.png", package = "sketch")
expr <- parse_expr... |
## Put comments here that give an overall description of what your
## functions do
##This function creates a special "matrix" object that can cache its inverse.
## Write a short comment describing this function
## define the argument with default mode of "matrix"
## initialize inv as NULL; will hold value of matrix i... | /cachematrix.R | no_license | sushk15/ProgrammingAssignment2 | R | false | false | 1,189 | r | ## Put comments here that give an overall description of what your
## functions do
##This function creates a special "matrix" object that can cache its inverse.
## Write a short comment describing this function
## define the argument with default mode of "matrix"
## initialize inv as NULL; will hold value of matrix i... |
nice_plot <- function(X, min=NULL, max=NULL, beams=NULL) {
y <- X[,1] # first col with times
times <- as.numeric(unlist(y))
freqs <- X[,-1] # count beams
tot <- length(freqs)
beam <- seq(0,tot-1,by=1)
for (j in beam) {
x <- X[,j+2]
freqX <- as.numeric(unlist(x))
if (!is.null(beams)) {
if (... | /.github/workflows/nice-plot.R | no_license | shownu/harmonics | R | false | false | 741 | r | nice_plot <- function(X, min=NULL, max=NULL, beams=NULL) {
y <- X[,1] # first col with times
times <- as.numeric(unlist(y))
freqs <- X[,-1] # count beams
tot <- length(freqs)
beam <- seq(0,tot-1,by=1)
for (j in beam) {
x <- X[,j+2]
freqX <- as.numeric(unlist(x))
if (!is.null(beams)) {
if (... |
########## SPARKLYR - CLUSTER
library(tidyverse)
library(sparklyr)
Sys.setenv(SPARK_HOME = "/usr/hdp/current/spark2-client")
Sys.setenv(HADOOP_CONF_DIR = "/etc/hadoop/conf")
Sys.setenv(YARN_CONF_DIR = "/etc/hadoop/conf")
sc <- spark_connect(master = "yarn-client")
spark_version(sc)
#### CSV aus HDFS lesen
train_df <... | /Spark - Sparklyr auf cluster.R | no_license | dschradick/R-Toolbox | R | false | false | 1,911 | r | ########## SPARKLYR - CLUSTER
library(tidyverse)
library(sparklyr)
Sys.setenv(SPARK_HOME = "/usr/hdp/current/spark2-client")
Sys.setenv(HADOOP_CONF_DIR = "/etc/hadoop/conf")
Sys.setenv(YARN_CONF_DIR = "/etc/hadoop/conf")
sc <- spark_connect(master = "yarn-client")
spark_version(sc)
#### CSV aus HDFS lesen
train_df <... |
u### -----------------------------
### political scientists on Wikipedia
### simon munzert
### -----------------------------
## goals ------------------------
# build a ‘collaboration’ network of political scientists
## tasks ------------------------
# gather list of political scientists
# fetch Wikipedia e... | /wikipediaPolsci.r | no_license | SocialScienceDataLab/Intro-to-web-scraping-with-R | R | false | false | 2,966 | r | u### -----------------------------
### political scientists on Wikipedia
### simon munzert
### -----------------------------
## goals ------------------------
# build a ‘collaboration’ network of political scientists
## tasks ------------------------
# gather list of political scientists
# fetch Wikipedia e... |
#Lecture 3. R. mean, SD, variance
# assign data values
values <- c(1, 2, 3, 4)
mean(values)
median(values)
length(values)
sd(values)
var(values)
range(values)
| /Lecture 3- Measure of Dispersion/Lecture 3. R. mean, SD, variance.R | permissive | hejibo/Psychological-Statistics | R | false | false | 168 | r | #Lecture 3. R. mean, SD, variance
# assign data values
values <- c(1, 2, 3, 4)
mean(values)
median(values)
length(values)
sd(values)
var(values)
range(values)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graphFunctions.R
\name{functionalType<-}
\alias{functionalType<-}
\title{Assign a functional type to a spatio-temporal dataset}
\usage{
functionalType(obj, attr = "ALL", parent = TRUE) <- value
}
\arguments{
\item{obj}{The object that is anno... | /man/functionalType-set.Rd | no_license | MatthiasHinz/SpatialSemantics | R | false | true | 709 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graphFunctions.R
\name{functionalType<-}
\alias{functionalType<-}
\title{Assign a functional type to a spatio-temporal dataset}
\usage{
functionalType(obj, attr = "ALL", parent = TRUE) <- value
}
\arguments{
\item{obj}{The object that is anno... |
library(dendextend)
### Name: untangle_step_rotate_1side
### Title: Stepwise untangle one tree compared to another
### Aliases: untangle_step_rotate_1side
### ** Examples
## Not run:
##D dend1 <- USArrests[1:10,] %>% dist %>% hclust %>% as.dendrogram
##D set.seed(3525)
##D dend2 <- shuffle(dend1)
##D tanglegram(d... | /data/genthat_extracted_code/dendextend/examples/untangle_step_rotate_1side.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 574 | r | library(dendextend)
### Name: untangle_step_rotate_1side
### Title: Stepwise untangle one tree compared to another
### Aliases: untangle_step_rotate_1side
### ** Examples
## Not run:
##D dend1 <- USArrests[1:10,] %>% dist %>% hclust %>% as.dendrogram
##D set.seed(3525)
##D dend2 <- shuffle(dend1)
##D tanglegram(d... |
### R code from vignette source 'docmcEnglish.Rnw'
### Encoding: UTF-8
###################################################
### code chunk number 1: sh0
###################################################
set.seed(666)
options("width"=90,"digits"=3)
###################################################
### code chunk n... | /R/lib/mc2d/doc/docmcEnglish.R | no_license | BRICOMATA/Bricomata_ | R | false | false | 16,564 | r | ### R code from vignette source 'docmcEnglish.Rnw'
### Encoding: UTF-8
###################################################
### code chunk number 1: sh0
###################################################
set.seed(666)
options("width"=90,"digits"=3)
###################################################
### code chunk n... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting_utilities.R
\name{font}
\alias{font}
\title{Create a list of font settings for plots}
\usage{
font(
size = NULL,
color = NULL,
alpha = NULL,
nudge_x = NULL,
nudge_y = NULL,
angle = NULL,
family = NULL,
fontface = NULL... | /man/font.Rd | permissive | LudvigOlsen/cvms | R | false | true | 1,321 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting_utilities.R
\name{font}
\alias{font}
\title{Create a list of font settings for plots}
\usage{
font(
size = NULL,
color = NULL,
alpha = NULL,
nudge_x = NULL,
nudge_y = NULL,
angle = NULL,
family = NULL,
fontface = NULL... |
calcSproutClusters <- function(tconf, seeds)
{
clusters <- list(inds=list()) # Resulted sprout clusters.
n <- nrow(seeds$objs)
if (n == 0)
{
return(clusters)
}
clusterCount <- 0 # Sprout cluster's counter.
seedClusters <- calcSeedClusters(tconf, seeds) # Seed clusters.
isUpdated <- FALSE # Flag for ... | /calcSproutClusters.R | no_license | helgisol/mctracker2 | R | false | false | 5,983 | r | calcSproutClusters <- function(tconf, seeds)
{
clusters <- list(inds=list()) # Resulted sprout clusters.
n <- nrow(seeds$objs)
if (n == 0)
{
return(clusters)
}
clusterCount <- 0 # Sprout cluster's counter.
seedClusters <- calcSeedClusters(tconf, seeds) # Seed clusters.
isUpdated <- FALSE # Flag for ... |
#' @rdname is_r
#' @export
assert_is_r <- function(severity = getOption("assertive.severity", "stop"))
{
assert_engine(is_r, severity = severity)
}
#' @rdname is_batch_mode
#' @export
assert_is_batch_mode <- function(severity = getOption("assertive.sev... | /R/assert-is-r-mode.R | no_license | cran/assertive.reflection | R | false | false | 1,075 | r | #' @rdname is_r
#' @export
assert_is_r <- function(severity = getOption("assertive.severity", "stop"))
{
assert_engine(is_r, severity = severity)
}
#' @rdname is_batch_mode
#' @export
assert_is_batch_mode <- function(severity = getOption("assertive.sev... |
arr = 1:3
all_are_positive <- function(array) {
positive = arr[arr>0]
length(array) == length(positive)
}
if (all_are_positive(arr)) {
geometric_mean = prod(arr) ^ (1 / length(arr))
print(geometric_mean)
} else {
print("Not all numbers are positive")
}
| /2-various/4_geometric_mean.r | no_license | zalmanu/data-analysis-with-R | R | false | false | 265 | r | arr = 1:3
all_are_positive <- function(array) {
positive = arr[arr>0]
length(array) == length(positive)
}
if (all_are_positive(arr)) {
geometric_mean = prod(arr) ^ (1 / length(arr))
print(geometric_mean)
} else {
print("Not all numbers are positive")
}
|
\name{spqnnews}
\title{spqn News}
\encoding{UTF-8}
\section{Version 0.99}{
\itemize{
\item Submission to Bioconductor. This package implements the SpQN
method for normalizing correlation matrices, as described in Wang,
Hicks and Hansen (2020) bioRxiv.
}
}
| /inst/NEWS.Rd | no_license | hansenlab/spqn | R | false | false | 275 | rd | \name{spqnnews}
\title{spqn News}
\encoding{UTF-8}
\section{Version 0.99}{
\itemize{
\item Submission to Bioconductor. This package implements the SpQN
method for normalizing correlation matrices, as described in Wang,
Hicks and Hansen (2020) bioRxiv.
}
}
|
summaryPlotOTU <-
function(data,xgroup,facet=NA,type="bar",x.order=NA,whiskers="ci",otus=NA,log.base=10){
# smry=smm0$summary;xgroup="bank";type="line";whiskers="ci";facet="species";otus=NA;x.order=NA;log.base=10
smry=data
if(!is.na(otus[1])){ smry=smry[smry$otu %in% otus,] }
if (!is.na(x.order[1])) { smry[,xgroup]=... | /MCMC.OTU/R/summaryPlotOTU.R | no_license | ingted/R-Examples | R | false | false | 3,781 | r | summaryPlotOTU <-
function(data,xgroup,facet=NA,type="bar",x.order=NA,whiskers="ci",otus=NA,log.base=10){
# smry=smm0$summary;xgroup="bank";type="line";whiskers="ci";facet="species";otus=NA;x.order=NA;log.base=10
smry=data
if(!is.na(otus[1])){ smry=smry[smry$otu %in% otus,] }
if (!is.na(x.order[1])) { smry[,xgroup]=... |
library(pins)
library(keras)
# Pin it on RStudio Connect
pins::board_register_rsconnect()
pins::pin(
"saved_model",
"peptide_model",
"Peptide Prediction Model",
"rsconnect",
zip = TRUE
)
| /part3/immunotherapy-master/2_publish_model.R | no_license | graemeleehickey/Workshop-R-Tensorflow-Scientific-Computing | R | false | false | 198 | r | library(pins)
library(keras)
# Pin it on RStudio Connect
pins::board_register_rsconnect()
pins::pin(
"saved_model",
"peptide_model",
"Peptide Prediction Model",
"rsconnect",
zip = TRUE
)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pcf_anisotropic.R
\name{pcf_anisotropic_old}
\alias{pcf_anisotropic_old}
\title{Anisotropic pair correlation function, old version}
\usage{
pcf_anisotropic_old(
x,
r,
theta,
h,
stoyan = 0.15,
correction = "translation",
n_dir = ... | /man/pcf_anisotropic_old.Rd | no_license | antiphon/Kdirectional | R | false | true | 1,099 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pcf_anisotropic.R
\name{pcf_anisotropic_old}
\alias{pcf_anisotropic_old}
\title{Anisotropic pair correlation function, old version}
\usage{
pcf_anisotropic_old(
x,
r,
theta,
h,
stoyan = 0.15,
correction = "translation",
n_dir = ... |
#To Web Scrape "As a Whole" the entire US 50 States for the tables of Wages, Expenses, and Occupation
#Web crawling and scraping
library("rvest")
library("magrittr")
#Loading the library ggplot2
library(ggplot2)
#Loading the library plyr in order to use the ddply() function
library("plyr")
#Loading the library ... | /Fifty_States_Web_Scraping.R | no_license | mallen69/Project_Sprint_6 | R | false | false | 77,982 | r | #To Web Scrape "As a Whole" the entire US 50 States for the tables of Wages, Expenses, and Occupation
#Web crawling and scraping
library("rvest")
library("magrittr")
#Loading the library ggplot2
library(ggplot2)
#Loading the library plyr in order to use the ddply() function
library("plyr")
#Loading the library ... |
validate_rectangular_shape <- function(frame_names, frame_rest) {
if (length(frame_names) == 0 && length(frame_rest) == 0) return()
# Figure out the associated number of rows and number of columns,
# and validate that the supplied formula produces a rectangular
# structure.
if (length(frame_rest) %% length(f... | /Re3-readability/src/get_readability_stats/readability-snippets-r/snippet73.R | permissive | Re3-reproducibility-readability/21-05-Re3 | R | false | false | 451 | r | validate_rectangular_shape <- function(frame_names, frame_rest) {
if (length(frame_names) == 0 && length(frame_rest) == 0) return()
# Figure out the associated number of rows and number of columns,
# and validate that the supplied formula produces a rectangular
# structure.
if (length(frame_rest) %% length(f... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/report_mig_interannual.R
\name{charge,report_mig_interannual-method}
\alias{charge,report_mig_interannual-method}
\alias{charge.report_mig_interannual}
\title{loading method for report_mig_interannual class}
\usage{
\S4method{charge}{r... | /man/charge-report_mig_interannual-method.Rd | no_license | cran/stacomiR | R | false | true | 827 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/report_mig_interannual.R
\name{charge,report_mig_interannual-method}
\alias{charge,report_mig_interannual-method}
\alias{charge.report_mig_interannual}
\title{loading method for report_mig_interannual class}
\usage{
\S4method{charge}{r... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PIAmbiguous.r
\name{PIAmbiguous}
\alias{PIAmbiguous}
\title{Generate an instance of the PIAmbiguous PI Web API class}
\usage{
PIAmbiguous(reason = NULL)
}
\arguments{
\item{reason}{(string)}
}
\value{
PIAmbiguous
}
... | /man/PIAmbiguous.Rd | permissive | eddyrene/PI-Web-API-Client-R | R | false | true | 512 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PIAmbiguous.r
\name{PIAmbiguous}
\alias{PIAmbiguous}
\title{Generate an instance of the PIAmbiguous PI Web API class}
\usage{
PIAmbiguous(reason = NULL)
}
\arguments{
\item{reason}{(string)}
}
\value{
PIAmbiguous
}
... |
# This function calculate the frequency table for 1 variable and format the table
# Results qre saved in the "FreqTable" folder
# Version 0.2 date: 20141012
# Author: Carlos Velez email:carlos_velez@yahoo.com
FreqTable_1var <- function(x, var1, survey, area, round){
varfreq <- table(x)
varx <- as.matrix(var... | /FreqTable_1var.R | no_license | bedatadriven/activityinfo-washinfo | R | false | false | 804 | r | # This function calculate the frequency table for 1 variable and format the table
# Results qre saved in the "FreqTable" folder
# Version 0.2 date: 20141012
# Author: Carlos Velez email:carlos_velez@yahoo.com
FreqTable_1var <- function(x, var1, survey, area, round){
varfreq <- table(x)
varx <- as.matrix(var... |
library(ggplot2)
library(tidyverse)
library(colorspace)
options(digits=3)
fDat <- as.tibble(read.csv("fixations2.csv"))
dat <- as.tibble(read.csv("responses2.csv"))
dat$thoughtNoAttCap = factor(dat$thoughtNoAttCap, levels(dat$thoughtNoAttCap)[c(2,1)])
# plot basic results for distracter trials.
dat = filter(dat, di... | /Experiments/1_Original Experiment/analysis/3_analysis.R | no_license | Nian-Jingqing/AttCapAwareness | R | false | false | 4,370 | r | library(ggplot2)
library(tidyverse)
library(colorspace)
options(digits=3)
fDat <- as.tibble(read.csv("fixations2.csv"))
dat <- as.tibble(read.csv("responses2.csv"))
dat$thoughtNoAttCap = factor(dat$thoughtNoAttCap, levels(dat$thoughtNoAttCap)[c(2,1)])
# plot basic results for distracter trials.
dat = filter(dat, di... |
# load packages
library(tidyverse)
library(here)
library(lmerTest)
library(ggplot2)
library(dplyr)
library(hrbrthemes)
library(viridis)
library(gridExtra)
library(patchwork)
library(eegUtils)
# read in factor score data
temp_score_dat <- read_csv(here("data", "paper_two", "temp_fac_score_dat.csv"))
temp_spat_score_dat... | /scripts/paper_two/fac_dat_eda.R | no_license | ikahrilas/Kahrilas_Dissertation | R | false | false | 3,577 | r | # load packages
library(tidyverse)
library(here)
library(lmerTest)
library(ggplot2)
library(dplyr)
library(hrbrthemes)
library(viridis)
library(gridExtra)
library(patchwork)
library(eegUtils)
# read in factor score data
temp_score_dat <- read_csv(here("data", "paper_two", "temp_fac_score_dat.csv"))
temp_spat_score_dat... |
#' Bernardo and Ledoit ratio of the return distribution
#'
#' To calculate Bernardo and Ledoit ratio we take the sum of the subset of
#' returns that are above 0 and we divide it by the opposite of the sum of
#' the subset of returns that are below 0
#'
#' \deqn{BernardoLedoitRatio(R) = \frac{\frac{1}{n}\sum^{n}_... | /R/BernadoLedoitratio.R | no_license | ecjbosu/PerformanceAnalytics | R | false | false | 2,217 | r | #' Bernardo and Ledoit ratio of the return distribution
#'
#' To calculate Bernardo and Ledoit ratio we take the sum of the subset of
#' returns that are above 0 and we divide it by the opposite of the sum of
#' the subset of returns that are below 0
#'
#' \deqn{BernardoLedoitRatio(R) = \frac{\frac{1}{n}\sum^{n}_... |
#####################################
##### SOIL FUCTIONS for SAXTON & RAWLS (SR): SOIL WATER CHARACTERISTICS ESTIMATES
##### http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.452.9733&rep=rep1&type=pdf
##### by JRE- https://github.com/jrodriguez88
###########################################################... | /PT_Functions.R | no_license | oryza2000/ORYZA_Model_RTOOLS | R | false | false | 14,535 | r | #####################################
##### SOIL FUCTIONS for SAXTON & RAWLS (SR): SOIL WATER CHARACTERISTICS ESTIMATES
##### http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.452.9733&rep=rep1&type=pdf
##### by JRE- https://github.com/jrodriguez88
###########################################################... |
# Lab 1 -
# Plot3.R
#Assumes data dir is 1 level up
saved_dir = getwd()
setwd("../data/exdata-data-household_power_consumption")
# Data is exdata-data-household_power_consumption
datafolder <- "exdata-data-household_power_consumption"
datafile <- "household_power_consumption.txt"
data = read.csv(datafile, header = ... | /plot3.R | no_license | souaaz/ExData_Plotting1 | R | false | false | 937 | r | # Lab 1 -
# Plot3.R
#Assumes data dir is 1 level up
saved_dir = getwd()
setwd("../data/exdata-data-household_power_consumption")
# Data is exdata-data-household_power_consumption
datafolder <- "exdata-data-household_power_consumption"
datafile <- "household_power_consumption.txt"
data = read.csv(datafile, header = ... |
\name{fastmode}
\alias{fastmode}
\title{
Rapidly converging algorithm for calculating posterior modes
in linear mixed models
}
\description{
Computes the marginal posterior mode of the variance
parameters in linear mixed models using a rapidly converging
procedure described by Schafer (1998), which combines Fisher
scor... | /lmm/man/fastmode.Rd | no_license | jinghuazhao/R | R | false | false | 7,279 | rd | \name{fastmode}
\alias{fastmode}
\title{
Rapidly converging algorithm for calculating posterior modes
in linear mixed models
}
\description{
Computes the marginal posterior mode of the variance
parameters in linear mixed models using a rapidly converging
procedure described by Schafer (1998), which combines Fisher
scor... |
# Activity 1
print("hello R world")
#subtraction
200-136
a<-1125
#divide variable by 5
a/5
#create vector
myvec<-c(5,25,225,625,a)
#divide all numbers in the vector by 5
myvec/5
| /Activity 1/activity1_script.r | no_license | lbonin5/GEOG331 | R | false | false | 179 | r | # Activity 1
print("hello R world")
#subtraction
200-136
a<-1125
#divide variable by 5
a/5
#create vector
myvec<-c(5,25,225,625,a)
#divide all numbers in the vector by 5
myvec/5
|
#' @include desc_statby.R utilities_base.R utilities_color.R
NULL
#' @import ggplot2
#' @importFrom magrittr %>%
#' @importFrom dplyr group_by_
#' @importFrom dplyr group_by
#' @importFrom dplyr arrange_
#' @importFrom dplyr mutate
#' @importFrom dplyr do
#' @importFrom dplyr summarise
#' @importFrom dplyr everything
#... | /R/utilities.R | no_license | Abhiroop/ggpubr | R | false | false | 34,229 | r | #' @include desc_statby.R utilities_base.R utilities_color.R
NULL
#' @import ggplot2
#' @importFrom magrittr %>%
#' @importFrom dplyr group_by_
#' @importFrom dplyr group_by
#' @importFrom dplyr arrange_
#' @importFrom dplyr mutate
#' @importFrom dplyr do
#' @importFrom dplyr summarise
#' @importFrom dplyr everything
#... |
plotPower <-
function(x,
coefNum=1,
include="All",
yAxis=seq(from=0, to=100, by=20),
xAxis=NULL,
main=NULL,
legendXY=NULL)
{
## Checks
##
if(!is.element(class(x), c("tpsPower", "ccPower")))
stop("Error: 'x' is neither a 'tpsPower' or 'ccPower' objec... | /R/plotPower.R | no_license | cran/tpsDesign | R | false | false | 2,716 | r | plotPower <-
function(x,
coefNum=1,
include="All",
yAxis=seq(from=0, to=100, by=20),
xAxis=NULL,
main=NULL,
legendXY=NULL)
{
## Checks
##
if(!is.element(class(x), c("tpsPower", "ccPower")))
stop("Error: 'x' is neither a 'tpsPower' or 'ccPower' objec... |
# Combine multiple result tables, preserving grouping
mfdb_concatenate_results <- function (...) {
combined <- rbind(...)
for (column in names(combined)) {
x <- lapply(list(...), function (df) attr(df, column)) # Extract attribute list for each df
x <- do.call(c, x) # Concatenate the list of a... | /R/mfdb_helpers.R | no_license | gadget-framework/mfdb | R | false | false | 1,248 | r | # Combine multiple result tables, preserving grouping
mfdb_concatenate_results <- function (...) {
combined <- rbind(...)
for (column in names(combined)) {
x <- lapply(list(...), function (df) attr(df, column)) # Extract attribute list for each df
x <- do.call(c, x) # Concatenate the list of a... |
#Monte Carlo Sim
#https://www.youtube.com/watch?v=HOW5ul9WUhE&t=28s
library(triangle)
options(scipen = 999)
start.time<-Sys.time() ## start stopwatch
mydata<-lapply(1:1000, function(i) {
## Net Profit = Sales Volume * (Selling Price - Unit cost) - Fixed costs
## create random uniform integer for SalesVolume
DU... | /simulation/sim-pricing2.R | no_license | dupadhyaya/rorlp | R | false | false | 2,397 | r | #Monte Carlo Sim
#https://www.youtube.com/watch?v=HOW5ul9WUhE&t=28s
library(triangle)
options(scipen = 999)
start.time<-Sys.time() ## start stopwatch
mydata<-lapply(1:1000, function(i) {
## Net Profit = Sales Volume * (Selling Price - Unit cost) - Fixed costs
## create random uniform integer for SalesVolume
DU... |
#' Analytics
#'
#' @return An object of class \code{Analytics}.
#'
#' @export
Analytics <- R6::R6Class(
"Analytics",
inherit = Firebase,
public = list(
#' @details Initialise
#'
#' Initialise an analytics object.
#'
#' @param enable Whether to internally enable analytics
#' see `launch` method.
initialize = f... | /R/class-analytics.R | no_license | cran/firebase | R | false | false | 2,583 | r | #' Analytics
#'
#' @return An object of class \code{Analytics}.
#'
#' @export
Analytics <- R6::R6Class(
"Analytics",
inherit = Firebase,
public = list(
#' @details Initialise
#'
#' Initialise an analytics object.
#'
#' @param enable Whether to internally enable analytics
#' see `launch` method.
initialize = f... |
# Part 1: Generate random data to demonstrate the Central Limit Theorem
# Create a "population" of 10,000 values, uniformly distributed between 0 and 100
# Draw a histogran of your population to view its shape
# Use the `sample` function to draw 100 value from the population (without replacement)
# What is the dif... | /notebooks/nb-3-jimmybnguyen-master/part-1.R | no_license | jimmybnguyen/info370-w18-course | R | false | false | 686 | r | # Part 1: Generate random data to demonstrate the Central Limit Theorem
# Create a "population" of 10,000 values, uniformly distributed between 0 and 100
# Draw a histogran of your population to view its shape
# Use the `sample` function to draw 100 value from the population (without replacement)
# What is the dif... |
cat("\n COZIR1.1 Last edited: September 17, 2015.\n\n")
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Parses Sartorius balance data and creates a plot
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Critical problems:
#
# sampleTime interval checking. Currently works for sample interv... | /COZIR1.1.R | no_license | mgdUSDA/data-parser | R | false | false | 8,078 | r | cat("\n COZIR1.1 Last edited: September 17, 2015.\n\n")
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Parses Sartorius balance data and creates a plot
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Critical problems:
#
# sampleTime interval checking. Currently works for sample interv... |
# https://cran.r-project.org/web/packages/sparklyr/sparklyr.pdf
# Install packages we'll use
if(!require(pacman)) install.packages('pacman')
library(pacman)
# If you don't have this packages, the p_load function will auto install it all
pacman::p_load(sparklyr, dplyr, DBI, ggplot2)
# Install spark with version 2.1.... | /.Rproj.user/3A176422/sources/per/t/4BD9BE55-contents | no_license | chinhungtseng/TalkingData-AdTracking-Fraud-Detection-Challenge | R | false | false | 2,379 | # https://cran.r-project.org/web/packages/sparklyr/sparklyr.pdf
# Install packages we'll use
if(!require(pacman)) install.packages('pacman')
library(pacman)
# If you don't have this packages, the p_load function will auto install it all
pacman::p_load(sparklyr, dplyr, DBI, ggplot2)
# Install spark with version 2.1.... | |
library(ape)
testtree <- read.tree("13579_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="13579_0_unrooted.txt") | /codeml_files/newick_trees_processed/13579_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("13579_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="13579_0_unrooted.txt") |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
i_matrix <- NULL
set <- function(y) {
x <<- y
i_matrix <<- NULL
}
get <- function() x
setmean <- function(invertir) i_matri... | /cachematrix.R | no_license | yurica24/ProgrammingAssignment2 | R | false | false | 874 | 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()) {
i_matrix <- NULL
set <- function(y) {
x <<- y
i_matrix <<- NULL
}
get <- function() x
setmean <- function(invertir) i_matri... |
jomo.lmer <-
function(formula, data, level=rep(1,ncol(data)), beta.start=NULL, l2.beta.start=NULL, u.start=NULL, l1cov.start=NULL, l2cov.start=NULL, l1cov.prior=NULL, l2cov.prior=NULL, a.start=NULL, a.prior=NULL, nburn=1000, nbetween=1000, nimp=5, meth="common", output=1, out.iter=10) {
cat("This function is be... | /R/jomo.lmer.R | no_license | ck37/jomo | R | false | false | 31,102 | r | jomo.lmer <-
function(formula, data, level=rep(1,ncol(data)), beta.start=NULL, l2.beta.start=NULL, u.start=NULL, l1cov.start=NULL, l2cov.start=NULL, l1cov.prior=NULL, l2cov.prior=NULL, a.start=NULL, a.prior=NULL, nburn=1000, nbetween=1000, nimp=5, meth="common", output=1, out.iter=10) {
cat("This function is be... |
test_that("To convert from Geographic coordinate to Cartesian coordinate works", {
# Point name
Pto <- "St1"
# Longitude
g <- -71
m <- 18
s <- 44.86475
# Value in sexagesimal
sexa_long <- sexagesimal(g,m,s)
# Latitude
g <- -33
m <- 38
s <- 30.123456
# Value in sexagesimal
s... | /tests/testthat/test-cartesian.R | no_license | cran/GeodesiCL | R | false | false | 716 | r | test_that("To convert from Geographic coordinate to Cartesian coordinate works", {
# Point name
Pto <- "St1"
# Longitude
g <- -71
m <- 18
s <- 44.86475
# Value in sexagesimal
sexa_long <- sexagesimal(g,m,s)
# Latitude
g <- -33
m <- 38
s <- 30.123456
# Value in sexagesimal
s... |
This set of analyses contains the R codes for the breast cancer study.
<<Setwd >>=
## Here is the working directory
Mywd <- setwd("/Users/arindambose/GitHub/brca-study")
## Read the data into R
mydata <- read.csv("breastca.csv", header = TRUE, sep = ",")
mydata$hrtuse2 <- (mydata$declinehrtuse)^2
@
#print(names(my... | /hrtbrca.R | no_license | gongliangz/brca-study | R | false | false | 3,168 | r | This set of analyses contains the R codes for the breast cancer study.
<<Setwd >>=
## Here is the working directory
Mywd <- setwd("/Users/arindambose/GitHub/brca-study")
## Read the data into R
mydata <- read.csv("breastca.csv", header = TRUE, sep = ",")
mydata$hrtuse2 <- (mydata$declinehrtuse)^2
@
#print(names(my... |
# Principles of structured programming
# 27 February 2020
#Computational Bio
#Hanusia Higgins
# -------------------------------------------------------------------------
#Pseudocode!
# Get data
# Calculate stuff
# Summarize output
# Graph results
# Code will look (eventually) like this:
# get_data()
# calculate_s... | /structuredProgramming_2-27-20.R | permissive | Hanusia/HigginsBio381 | R | false | false | 367 | r | # Principles of structured programming
# 27 February 2020
#Computational Bio
#Hanusia Higgins
# -------------------------------------------------------------------------
#Pseudocode!
# Get data
# Calculate stuff
# Summarize output
# Graph results
# Code will look (eventually) like this:
# get_data()
# calculate_s... |
# boot: boot
spearman.ci <-
function(var1,var2,nrep=1000,conf.level=0.95){
if (length(var1)!=length(var2)) {stop(paste("'",deparse(substitute(var1)),"' and '",
deparse(substitute(var2)),"' lengths differ",sep=""))}
data.name <- paste(deparse(substitute(var1))," and ",deparse(substitute(var2)),"\n",nrep,"... | /R/spearman.ci.R | no_license | cran/RVAideMemoire | R | false | false | 1,140 | r | # boot: boot
spearman.ci <-
function(var1,var2,nrep=1000,conf.level=0.95){
if (length(var1)!=length(var2)) {stop(paste("'",deparse(substitute(var1)),"' and '",
deparse(substitute(var2)),"' lengths differ",sep=""))}
data.name <- paste(deparse(substitute(var1))," and ",deparse(substitute(var2)),"\n",nrep,"... |
################################################################################################################################################
############################################################### LENDINGCLUB ##################################################################
##############################... | /MCA-103 R Assignement/Q2.r | no_license | harshulmca17/Project | R | false | false | 8,824 | r | ################################################################################################################################################
############################################################### LENDINGCLUB ##################################################################
##############################... |
library(FastGP)
library(glmnet)
library(kernlab)
library(ranger)
cmdArgs <- commandArgs(trailingOnly = TRUE)
ii <- as.numeric(cmdArgs)
xx <- readRDS("../data/data.rds")
lvls <- unique(xx$cancer)
pair <- list()
for (i in 1:5) {
for (j in (i+1):6) {
name <- paste(lvls[i], "&", lvls[j], sep = " ")
p... | /sim_class_1/code/sim_data_corr_reg_phecode.R | no_license | blayes/ehr-data-analysis | R | false | false | 1,522 | r | library(FastGP)
library(glmnet)
library(kernlab)
library(ranger)
cmdArgs <- commandArgs(trailingOnly = TRUE)
ii <- as.numeric(cmdArgs)
xx <- readRDS("../data/data.rds")
lvls <- unique(xx$cancer)
pair <- list()
for (i in 1:5) {
for (j in (i+1):6) {
name <- paste(lvls[i], "&", lvls[j], sep = " ")
p... |
## complicated analysis
#' getting simplex endpoints
#'
#' @param V
#'
#' @return
#' @export
#'
#' @examples
getDenseEndpoints <- function(P, V=NULL, ...) {
# dimensionality checks
stopifnot(ncol(P) > nrow(P))
n <- nrow(P)
lower <- apply(P, 1, function(x) min(x))
upper <- apply(P, 1, function(... | /R/getDenseEnpoints.R | no_license | ctlab/ClusDec | R | false | false | 1,234 | r | ## complicated analysis
#' getting simplex endpoints
#'
#' @param V
#'
#' @return
#' @export
#'
#' @examples
getDenseEndpoints <- function(P, V=NULL, ...) {
# dimensionality checks
stopifnot(ncol(P) > nrow(P))
n <- nrow(P)
lower <- apply(P, 1, function(x) min(x))
upper <- apply(P, 1, function(... |
library("R.cache")
tmpdir <- tempdir()
setCacheRootPath(path=tmpdir)
setCacheRootPath(path=file.path(tmpdir, "subdir"))
setCacheRootPath(path=tmpdir)
## Cleanup
clearCache(recursive=TRUE)
| /R.cache/tests/setCacheRootPath.R | no_license | ingted/R-Examples | R | false | false | 199 | r | library("R.cache")
tmpdir <- tempdir()
setCacheRootPath(path=tmpdir)
setCacheRootPath(path=file.path(tmpdir, "subdir"))
setCacheRootPath(path=tmpdir)
## Cleanup
clearCache(recursive=TRUE)
|
#' List to data.frame
#'
#' Convert list with vectors of unequal length to dataframe, pad with NAs
#'
#' @return data.frame
#' @author Berry Boessenkool, \email{berry-b@@gmx.de}, Jan 2014
#' @seealso \code{\link{sapply}}. If you have a LARGE list each with the same number of values, use the (much!) faster: \code... | /berryFunctions/R/l2df.R | no_license | ingted/R-Examples | R | false | false | 2,287 | r | #' List to data.frame
#'
#' Convert list with vectors of unequal length to dataframe, pad with NAs
#'
#' @return data.frame
#' @author Berry Boessenkool, \email{berry-b@@gmx.de}, Jan 2014
#' @seealso \code{\link{sapply}}. If you have a LARGE list each with the same number of values, use the (much!) faster: \code... |
kernelGenerate <-
function(method = "rbf", Sigma = NULL, l = 1, p = 2){
# Generate kernel function.
#
# Args:
# method: A character string indicating which Kernel is to be computed.
# l: A numeric number indicating the hyperparameter of a specific kernel.
# p: For polynomial, p is the po... | /KMR0701/code/source/kernelGenerate.R | no_license | IrisTeng/CVEK-boot | R | false | false | 2,143 | r | kernelGenerate <-
function(method = "rbf", Sigma = NULL, l = 1, p = 2){
# Generate kernel function.
#
# Args:
# method: A character string indicating which Kernel is to be computed.
# l: A numeric number indicating the hyperparameter of a specific kernel.
# p: For polynomial, p is the po... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{rfinancej}
\alias{rfinancej}
\title{Get financial data in Japan}
\usage{
rfinancej(code = NA, type = "data.frame", start_date = Sys.Date() - 365,
end_date = Sys.Date(), frequency = "daily", src = "yahoo")
}
\arguments{
\item{code}{Dataset code on dif... | /man/RFinanceJ.Rd | permissive | hal2001/RFinanceJ | R | false | false | 860 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{rfinancej}
\alias{rfinancej}
\title{Get financial data in Japan}
\usage{
rfinancej(code = NA, type = "data.frame", start_date = Sys.Date() - 365,
end_date = Sys.Date(), frequency = "daily", src = "yahoo")
}
\arguments{
\item{code}{Dataset code on dif... |
##### Parse Yellowbrick XML data ######
library(xml2)
#library(XML)
library(tidyverse)
#Gets the value of each position text value
get_values <- function(boat_path){
datues <- xml_children(boat_path) %>% xml_text()
return(datues)
}
#Takes the boat data and reformats it
clean_boat_data <- function(dat){
num... | /src/parseXML.R | no_license | awarmack/BYCMACK2017 | R | false | false | 1,860 | r | ##### Parse Yellowbrick XML data ######
library(xml2)
#library(XML)
library(tidyverse)
#Gets the value of each position text value
get_values <- function(boat_path){
datues <- xml_children(boat_path) %>% xml_text()
return(datues)
}
#Takes the boat data and reformats it
clean_boat_data <- function(dat){
num... |
######################################################################
## test-loaddata.R
##
## this file tests loading data from the kt library
## TODO -- write these!
## check that the correct number and range of datasets is loaded
## check that the age.offset is handled correctly
## check that grabbing subsets w... | /tests/testthat/test-loaddata.R | no_license | dfeehan/mortfit | R | false | false | 346 | r | ######################################################################
## test-loaddata.R
##
## this file tests loading data from the kt library
## TODO -- write these!
## check that the correct number and range of datasets is loaded
## check that the age.offset is handled correctly
## check that grabbing subsets w... |
#家长平台
menu_book <- tabItem(tabName = "book",
fluidRow(
column(width = 12,
tabBox(title ="家长平台",width = 12,
id='tabSet_book',height = '300px',
tabPanel('基本信息',tagList(
... | /03_book_body.R | no_license | takewiki/iTLA | R | false | false | 5,066 | r | #家长平台
menu_book <- tabItem(tabName = "book",
fluidRow(
column(width = 12,
tabBox(title ="家长平台",width = 12,
id='tabSet_book',height = '300px',
tabPanel('基本信息',tagList(
... |
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
# Define UI for application that draws a histogram
ui <- fluidPage(
# Application title
... | /Test/app.R | no_license | radchenkoa5/Homework | R | false | false | 1,525 | r | #
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
# Define UI for application that draws a histogram
ui <- fluidPage(
# Application title
... |
Pnlty <- function(g0, g1, c0=rep(0,dim(g0)[1]), psi, pi, div){
# returns a penalty for explosive roots which is increasing in the
# size of the explosive roots made stable by pushing up div (0).
# All from gensysct.R
realsmall <- 1e-7
#A <- 1e+10
A <- 1e+12
qzout <- qz(g0,g1)
zeroax <- abs(diag(qzout$a)... | /Sims_svn/WoongYong/trunk/Pnlty.R | no_license | Allisterh/VAR_Sims_rfvar | R | false | false | 2,468 | r | Pnlty <- function(g0, g1, c0=rep(0,dim(g0)[1]), psi, pi, div){
# returns a penalty for explosive roots which is increasing in the
# size of the explosive roots made stable by pushing up div (0).
# All from gensysct.R
realsmall <- 1e-7
#A <- 1e+10
A <- 1e+12
qzout <- qz(g0,g1)
zeroax <- abs(diag(qzout$a)... |
######### handling configs, libraries and inputs ###########
## to run wrapped.R: Rscript --default-packages=methods,utils ${__tool_directory__}/nanonorm.R --rccfile "$i_rccfile" --output $o_output --outpdf $o_outpdf --codecount $codecount --background $background --samplecont $samplecont --othernorm $othernorm --boxp... | /nanonorm.R | no_license | mblue9/nanostringnorm | R | false | false | 4,203 | r | ######### handling configs, libraries and inputs ###########
## to run wrapped.R: Rscript --default-packages=methods,utils ${__tool_directory__}/nanonorm.R --rccfile "$i_rccfile" --output $o_output --outpdf $o_outpdf --codecount $codecount --background $background --samplecont $samplecont --othernorm $othernorm --boxp... |
library(plotly)
#strptime(d[2,4], "%Y-%m-%d %H:%M:%OS")
bucketMetrics <- read.csv('/Users/darshak/Documents/Projects/YALM/bucketMetrics_2018-04-21\ 165850.273438_Basic_policy.csv')
ay <- list(
tickfont = list(color = "red"),
overlaying = "y",
side = "right",
title = "No of Objs in Tier"
)
basic_plot <- p... | /Other/Graphs v2.R | no_license | NeeharikaSompalli/YALM | R | false | false | 5,471 | r | library(plotly)
#strptime(d[2,4], "%Y-%m-%d %H:%M:%OS")
bucketMetrics <- read.csv('/Users/darshak/Documents/Projects/YALM/bucketMetrics_2018-04-21\ 165850.273438_Basic_policy.csv')
ay <- list(
tickfont = list(color = "red"),
overlaying = "y",
side = "right",
title = "No of Objs in Tier"
)
basic_plot <- p... |
mbnd <-
function (pares, r, b, vlt, cx, lwd, ecol, directed, bw, alfa,
fds, flgcx, weighted, flgcr, hds, n)
{
ifelse(isTRUE(nrow(pares) > 2L) == TRUE, pares <- pares[c(1,
nrow(pares)), ], NA)
ifelse(isTRUE(ncol(pares) > 2L) == TRUE, pares <- pares[,
1:2], NA)
angp <- atan2((p... | /R/mbnd.R | no_license | mplex/multigraph | R | false | false | 7,952 | r | mbnd <-
function (pares, r, b, vlt, cx, lwd, ecol, directed, bw, alfa,
fds, flgcx, weighted, flgcr, hds, n)
{
ifelse(isTRUE(nrow(pares) > 2L) == TRUE, pares <- pares[c(1,
nrow(pares)), ], NA)
ifelse(isTRUE(ncol(pares) > 2L) == TRUE, pares <- pares[,
1:2], NA)
angp <- atan2((p... |
#' @name baruaChakravartySarkarIndex
#' @title Barua Chakravarty Sarkar Index
#' @description Calculates the Barua Chakravarty Sarkar Index for a specified simple TU game.
#' Note that in general the Barua Chakravarty Sarkar Index is not an efficient vector,
#' i.e. the sum of its entries is not always 1.
#' Henc... | /CoopGame/R/BaruaChakravartySarkarConcept.R | no_license | anwanjohannes/CoopGame | R | false | false | 2,646 | r | #' @name baruaChakravartySarkarIndex
#' @title Barua Chakravarty Sarkar Index
#' @description Calculates the Barua Chakravarty Sarkar Index for a specified simple TU game.
#' Note that in general the Barua Chakravarty Sarkar Index is not an efficient vector,
#' i.e. the sum of its entries is not always 1.
#' Henc... |
library(testthat)
library(gwsem)
test_check("gwsem")
| /fuzzedpackages/gwsem/tests/testthat.R | no_license | akhikolla/testpackages | R | false | false | 54 | r | library(testthat)
library(gwsem)
test_check("gwsem")
|
library('raster')
library('rgdal')
library('ggplot2')
getwd()
setwd('//dapadfs/workspace_cluster_3/bid-cc-agricultural-sector/')
rm(list=ls())
#Load map of Latin America
Map_LatinAmerica<-shapefile("03-Map_LatinAmerica/Latino_America.shp") ## Mapa de Latinoamerica
Map_LatinAmerica1<- fortify(Map_LatinAmeri... | /bid-cc-agricultural-sector/InputData_final/Mapas Zonas de Cultivo_Monfreda.r | no_license | CIAT-DAPA/dapa-climate-change | R | false | false | 7,075 | r | library('raster')
library('rgdal')
library('ggplot2')
getwd()
setwd('//dapadfs/workspace_cluster_3/bid-cc-agricultural-sector/')
rm(list=ls())
#Load map of Latin America
Map_LatinAmerica<-shapefile("03-Map_LatinAmerica/Latino_America.shp") ## Mapa de Latinoamerica
Map_LatinAmerica1<- fortify(Map_LatinAmeri... |
PointAreaLegend <- function() {
plot(c(0,1),c(0,1),type = 'n', axes = F,xlab = '', ylab = '')
legend(x = 0.25, y = 0.07, legend = c("0-1", 5, 10, 20, 100), fill = "white", pch = 19,
border = "white", bty = 'n', ncol = 5,
pt.cex = log(c(1, 5, 10, 20, 100),base = 6) + 1, inset = c(0, 0.07))... | /correlation_plots/plotting.R | no_license | tmaklin/baby-microbiome-paper-plots | R | false | false | 4,765 | r |
PointAreaLegend <- function() {
plot(c(0,1),c(0,1),type = 'n', axes = F,xlab = '', ylab = '')
legend(x = 0.25, y = 0.07, legend = c("0-1", 5, 10, 20, 100), fill = "white", pch = 19,
border = "white", bty = 'n', ncol = 5,
pt.cex = log(c(1, 5, 10, 20, 100),base = 6) + 1, inset = c(0, 0.07))... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{ExampleSequence}
\alias{ExampleSequence}
\title{Part of miRNA sequence data from miRBase}
\format{
A matrix with columns:
\describe{
\item{id}{name for the miRNA}
\item{sequences}{miRNA sequence}
}
}
\source{
\url{... | /man/ExampleSequence.Rd | permissive | Deemolotus/gscVisualizer | R | false | true | 488 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{ExampleSequence}
\alias{ExampleSequence}
\title{Part of miRNA sequence data from miRBase}
\format{
A matrix with columns:
\describe{
\item{id}{name for the miRNA}
\item{sequences}{miRNA sequence}
}
}
\source{
\url{... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/derivatives.r
\name{d_bernoulli}
\alias{d_bernoulli}
\title{Partial derivatives for binary items.}
\usage{
d_bernoulli(
parm,
p_item,
etable_item,
theta,
pred_data,
cov,
samp_size,
num_items,
num_quad
)
}
\arguments{
\item{p... | /man/d_bernoulli.Rd | permissive | wbelzak/regDIF | R | false | true | 1,014 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/derivatives.r
\name{d_bernoulli}
\alias{d_bernoulli}
\title{Partial derivatives for binary items.}
\usage{
d_bernoulli(
parm,
p_item,
etable_item,
theta,
pred_data,
cov,
samp_size,
num_items,
num_quad
)
}
\arguments{
\item{p... |
options(java.parameters = "-Xmx64g")
#.libPaths("C:/Users/installer/Documents/R/win-library/3.5")
library(RJDBC)
library(data.table)
library(tm)
library(reticulate)
library(scales)
library(tidyverse)
library(readxl)
library(tidytext)
library(text2vec)
library(Matrix.utils)
library(keras)
library(caret)
library(bit64)
l... | /data_load.R | no_license | UtilantData/Datapipe1 | R | false | false | 6,111 | r | options(java.parameters = "-Xmx64g")
#.libPaths("C:/Users/installer/Documents/R/win-library/3.5")
library(RJDBC)
library(data.table)
library(tm)
library(reticulate)
library(scales)
library(tidyverse)
library(readxl)
library(tidytext)
library(text2vec)
library(Matrix.utils)
library(keras)
library(caret)
library(bit64)
l... |
rm(list=ls())
setwd("C:/Users/rasim/Desktop/MPP1/MIT/PSC/") #Set your own working directory here
#install.packages("httr")
#install.packages("jsonlite") #important for reading data in
#library("httr")
#library("readxl")
library(jsonlite)
library(readr)
library(dplyr)
#my code to load the whole data is below.... | /network_analysis.R | no_license | traghuram/17.835_Group3 | R | false | false | 4,850 | r | rm(list=ls())
setwd("C:/Users/rasim/Desktop/MPP1/MIT/PSC/") #Set your own working directory here
#install.packages("httr")
#install.packages("jsonlite") #important for reading data in
#library("httr")
#library("readxl")
library(jsonlite)
library(readr)
library(dplyr)
#my code to load the whole data is below.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clone.R
\name{clone}
\alias{clone}
\alias{clone.lvec}
\title{Clone an lvec object}
\usage{
clone(x, ...)
\method{clone}{lvec}(x, ...)
}
\arguments{
\item{x}{\code{\link{lvec}} object to clone}
\item{...}{ignored; used to pass additional arg... | /man/clone.Rd | no_license | djvanderlaan/lvec | R | false | true | 954 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clone.R
\name{clone}
\alias{clone}
\alias{clone.lvec}
\title{Clone an lvec object}
\usage{
clone(x, ...)
\method{clone}{lvec}(x, ...)
}
\arguments{
\item{x}{\code{\link{lvec}} object to clone}
\item{...}{ignored; used to pass additional arg... |
#----------SETUP----------
# functions
library(tidyverse)
library(shiny)
library(shinythemes)
library(shinyWidgets)
library(here)
library(lubridate)
library(tmap)
library(sf)
#tmap setup
tmap_mode("view")
# data
## spatial
col_loc <- read_sf(here("data/loc.gpkg"))
samo_plants <- read_sf(here("data/desired_natives_sa... | /samo-seeds/app.R | no_license | brirose/samo-seeds | R | false | false | 7,937 | r | #----------SETUP----------
# functions
library(tidyverse)
library(shiny)
library(shinythemes)
library(shinyWidgets)
library(here)
library(lubridate)
library(tmap)
library(sf)
#tmap setup
tmap_mode("view")
# data
## spatial
col_loc <- read_sf(here("data/loc.gpkg"))
samo_plants <- read_sf(here("data/desired_natives_sa... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.mobile_operations.R
\name{export_bundle}
\alias{export_bundle}
\title{Generates customized software development kit (SDK) and or tool packages used to integrate mobile web or mobile app clients with backend AWS resources}
\usage{
export_... | /service/paws.mobile/man/export_bundle.Rd | permissive | CR-Mercado/paws | R | false | true | 913 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.mobile_operations.R
\name{export_bundle}
\alias{export_bundle}
\title{Generates customized software development kit (SDK) and or tool packages used to integrate mobile web or mobile app clients with backend AWS resources}
\usage{
export_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diagnosticPropertyPlot.R
\name{diagnosticPropertyPlot2}
\alias{diagnosticPropertyPlot2}
\title{Diagnostic Property Plot (lattice)}
\usage{
diagnosticPropertyPlot2(f, v, k, grid.label = "pedon_id", sort.vars = TRUE)
}
\arguments{
\item{f}{\cod... | /man/diagnosticPropertyPlot2.Rd | no_license | ncss-tech/sharpshootR | R | false | true | 2,656 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diagnosticPropertyPlot.R
\name{diagnosticPropertyPlot2}
\alias{diagnosticPropertyPlot2}
\title{Diagnostic Property Plot (lattice)}
\usage{
diagnosticPropertyPlot2(f, v, k, grid.label = "pedon_id", sort.vars = TRUE)
}
\arguments{
\item{f}{\cod... |
\name{get_param-ConsensusPartition-method}
\alias{get_param,ConsensusPartition-method}
\alias{get_param}
\title{
Get parameters
}
\description{
Get parameters
}
\usage{
\S4method{get_param}{ConsensusPartition}(object, k = object@k, unique = TRUE)
}
\arguments{
\item{object}{A \code{\link{ConsensusPartition-class}} o... | /man/get_param-ConsensusPartition-method.rd | permissive | liangdp1984/cola | R | false | false | 792 | rd | \name{get_param-ConsensusPartition-method}
\alias{get_param,ConsensusPartition-method}
\alias{get_param}
\title{
Get parameters
}
\description{
Get parameters
}
\usage{
\S4method{get_param}{ConsensusPartition}(object, k = object@k, unique = TRUE)
}
\arguments{
\item{object}{A \code{\link{ConsensusPartition-class}} o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.