content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/relabel.R
\name{fct_relabel}
\alias{fct_relabel}
\title{Automatically relabel factor levels, collapse as necessary}
\usage{
fct_relabel(.f, .fun, ...)
}
\arguments{
\item{.f}{A factor.}
\item{.fun}{A bare or character function name or an act... | /man/fct_relabel.Rd | no_license | alistaire47/forcats | R | false | true | 1,155 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/relabel.R
\name{fct_relabel}
\alias{fct_relabel}
\title{Automatically relabel factor levels, collapse as necessary}
\usage{
fct_relabel(.f, .fun, ...)
}
\arguments{
\item{.f}{A factor.}
\item{.fun}{A bare or character function name or an act... |
## Download the Data
filesPath <- "/Users/taejinjo/OneDrive/Data_Analytics/04.Exploratory Data Analysis/Week1/"
setwd(filesPath)
if(!file.exists("./data")){dir.create("./data")}
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl,destfile="./data/Dat... | /Plot1_4.R | no_license | taejinjo/ExData_Plotting1 | R | false | false | 2,947 | r | ## Download the Data
filesPath <- "/Users/taejinjo/OneDrive/Data_Analytics/04.Exploratory Data Analysis/Week1/"
setwd(filesPath)
if(!file.exists("./data")){dir.create("./data")}
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl,destfile="./data/Dat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/write.xlsx.R, R/write.xlsx2.R
\name{write.xlsx}
\alias{write.xlsx}
\alias{write.xlsx2}
\title{Write a data.frame to an Excel workbook.}
\usage{
write.xlsx(
x,
file,
sheetName = "Sheet1",
col.names = TRUE,
row.names = TRUE,
append ... | /man/write.xlsx.Rd | no_license | bdaubney/xlsx | R | false | true | 3,189 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/write.xlsx.R, R/write.xlsx2.R
\name{write.xlsx}
\alias{write.xlsx}
\alias{write.xlsx2}
\title{Write a data.frame to an Excel workbook.}
\usage{
write.xlsx(
x,
file,
sheetName = "Sheet1",
col.names = TRUE,
row.names = TRUE,
append ... |
#' BGM to map script
#' original code from Alexander Keth
#'
bgm_to_map <- function(bgm_file, bgm_string){
bgm <- readLines(con = bgm_file)
proj_in <- stringr::str_split(string = bgm[grep(pattern = "projection", x = bgm)], pattern = " ", n = 2)[[1]][2]
n_boxes <- str_split_twice(char = bgm[grep(pattern = "nbox"... | /NOBA/BGM to map.R | permissive | erikjsolsen/AtlantisNEUS_R | R | false | false | 1,235 | r | #' BGM to map script
#' original code from Alexander Keth
#'
bgm_to_map <- function(bgm_file, bgm_string){
bgm <- readLines(con = bgm_file)
proj_in <- stringr::str_split(string = bgm[grep(pattern = "projection", x = bgm)], pattern = " ", n = 2)[[1]][2]
n_boxes <- str_split_twice(char = bgm[grep(pattern = "nbox"... |
# load necessary packages
library(lubridate)
library(dplyr)
# create the directory if it doesn't exist
if(!file.exists("./data")){
dir.create("./data")
}
# download and unzip the 'DataSet.zip' file if it doesn't exist
if(!file.exists("./data/DataSet.zip")){
download.file("https://d396qusza40orc.cloudf... | /plot4.R | no_license | sonofposeidonnnn/EDAPROJECT1.1 | R | false | false | 2,323 | r | # load necessary packages
library(lubridate)
library(dplyr)
# create the directory if it doesn't exist
if(!file.exists("./data")){
dir.create("./data")
}
# download and unzip the 'DataSet.zip' file if it doesn't exist
if(!file.exists("./data/DataSet.zip")){
download.file("https://d396qusza40orc.cloudf... |
library(microbiome)
library(tidyverse)
source("sim_data_soil.R")
data("GlobalPatterns")
pseq = GlobalPatterns
# Simulations were evaluated for soil environments
meta.data = meta(pseq)
pseq.subset = subset_samples(pseq, SampleType == "Soil")
# Prune taxa
pseq.prune = prune_taxa(taxa_sums(pseq.subset) > 50, pseq.subset)... | /simulations/sim_soil/sim_deseq2.R | permissive | wnq13579/ANCOM-BC-Code-Archive | R | false | false | 3,816 | r | library(microbiome)
library(tidyverse)
source("sim_data_soil.R")
data("GlobalPatterns")
pseq = GlobalPatterns
# Simulations were evaluated for soil environments
meta.data = meta(pseq)
pseq.subset = subset_samples(pseq, SampleType == "Soil")
# Prune taxa
pseq.prune = prune_taxa(taxa_sums(pseq.subset) > 50, pseq.subset)... |
library(ape)
testtree <- read.tree("11090_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="11090_0_unrooted.txt") | /codeml_files/newick_trees_processed_and_cleaned/11090_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("11090_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="11090_0_unrooted.txt") |
# Diferencias entre tibbles y dataframes
library(tidyverse)
library(datos)
# los tibbles se muestran por consola, sin sobrepasar el ancho y con un máximo de elementos por pantalla
tibble(
a = lubridate::now() + runif(1e3) * 86400,
b = lubridate::today() + runif(1e3) * 30,
c = 1:1e3,
d = runif(1e3),
e = sam... | /Tema 03 - Data Analysis y Tibbles/T03_09_diferencias tibbles y dataframes.R | no_license | carlos4Dev/CursoDeRparaBigDatayDataScience | R | false | false | 1,139 | r | # Diferencias entre tibbles y dataframes
library(tidyverse)
library(datos)
# los tibbles se muestran por consola, sin sobrepasar el ancho y con un máximo de elementos por pantalla
tibble(
a = lubridate::now() + runif(1e3) * 86400,
b = lubridate::today() + runif(1e3) * 30,
c = 1:1e3,
d = runif(1e3),
e = sam... |
##' @title Get thesis dependencies
##'
##' For use in `render_with_deps()`
##' @return
##' @author Shir Dekel
##' @export
get_thesis_deps <- function() {
front_matter <-
file.path("rmd", "front_matter") %>%
list.files(full.names = TRUE)
rmd <-
file.path("_bookdown.yml") %>%
yaml::read_yaml() %>%
... | /R/get_thesis_deps.R | no_license | shirdekel/phd_thesis | R | false | false | 507 | r | ##' @title Get thesis dependencies
##'
##' For use in `render_with_deps()`
##' @return
##' @author Shir Dekel
##' @export
get_thesis_deps <- function() {
front_matter <-
file.path("rmd", "front_matter") %>%
list.files(full.names = TRUE)
rmd <-
file.path("_bookdown.yml") %>%
yaml::read_yaml() %>%
... |
# NB: Several objects used in testing are defined in
# tests/testthat/helper-make-test-data.R
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Validity
###
context("MethPat validity methods")
test_that(".valid.MethPat.rowRanges works for empty MTuples", {
expect_error(MethPat(rowRa... | /tests/testthat/test-MethPat-class.R | no_license | PeteHaitch/MethylationTuples | R | false | false | 19,290 | r | # NB: Several objects used in testing are defined in
# tests/testthat/helper-make-test-data.R
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Validity
###
context("MethPat validity methods")
test_that(".valid.MethPat.rowRanges works for empty MTuples", {
expect_error(MethPat(rowRa... |
calculateVariance <- function(X,Q,R,U,V,K){
n = dim(X)[1]
p = dim(X)[2]
QXR = Q %*% X %*% R
denomenator = sum(diag(t(X) %*% QXR))
var = rep(0,K)
if(K >1){
for(i in 1:K){
if(sum(abs(U[,i])) != 0 && sum(abs(V[,i])) != 0){
Pu = U[,1:i] %*% solve(t(U[,1:i]) %*% Q %*% U[,1:i]) %*% t(U[,1:i])
Pv ... | /sGPCA/R/calculateVariance.R | no_license | ingted/R-Examples | R | false | false | 879 | r | calculateVariance <- function(X,Q,R,U,V,K){
n = dim(X)[1]
p = dim(X)[2]
QXR = Q %*% X %*% R
denomenator = sum(diag(t(X) %*% QXR))
var = rep(0,K)
if(K >1){
for(i in 1:K){
if(sum(abs(U[,i])) != 0 && sum(abs(V[,i])) != 0){
Pu = U[,1:i] %*% solve(t(U[,1:i]) %*% Q %*% U[,1:i]) %*% t(U[,1:i])
Pv ... |
piusBenchmark = function(MVec = NULL, NVec = NULL, numSubgroupsVec = NULL, lambdaVec = NULL,
univVec = NULL, iStrength = 1, sigmaMax = 0.1, thresholdMult = 10 ^ (-1),
maxSteps = 10 ^ 4, tStep = 10 ^ (-2), intTime = 1, interSmplMult = 0.01,
... | /piusBenchmark.r | permissive | JamesRekow/Canine_Cohort_GLV_Model | R | false | false | 1,273 | r |
piusBenchmark = function(MVec = NULL, NVec = NULL, numSubgroupsVec = NULL, lambdaVec = NULL,
univVec = NULL, iStrength = 1, sigmaMax = 0.1, thresholdMult = 10 ^ (-1),
maxSteps = 10 ^ 4, tStep = 10 ^ (-2), intTime = 1, interSmplMult = 0.01,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/objective-dispersion.R
\name{dispersion_objective}
\alias{dispersion_objective}
\title{Cluster dispersion}
\usage{
dispersion_objective(x, clusters)
}
\arguments{
\item{x}{The data input. Can be one of two structures: (1) A
feature matrix whe... | /man/dispersion_objective.Rd | permissive | ManaLama/anticlust | R | false | true | 1,965 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/objective-dispersion.R
\name{dispersion_objective}
\alias{dispersion_objective}
\title{Cluster dispersion}
\usage{
dispersion_objective(x, clusters)
}
\arguments{
\item{x}{The data input. Can be one of two structures: (1) A
feature matrix whe... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/xml_structure.R
\name{xml_structure}
\alias{html_structure}
\alias{xml_structure}
\title{Show the structure of an html/xml document.}
\usage{
xml_structure(x, indent = 2)
html_structure(x, indent = 2)
}
\arguments{
\item{x}{HTML/XML ... | /man/xml_structure.Rd | no_license | darrkj/xml2 | R | false | false | 969 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/xml_structure.R
\name{xml_structure}
\alias{html_structure}
\alias{xml_structure}
\title{Show the structure of an html/xml document.}
\usage{
xml_structure(x, indent = 2)
html_structure(x, indent = 2)
}
\arguments{
\item{x}{HTML/XML ... |
# ANY UNIT RECTANGLE CAN BE DIVIDED INTO A FINITE NUMBER OF SMALLER RECTANGLES
# FOR EXAMPLE, A 3x2 RECTANGLE CAN BE DIVIDED INTO 18 RECTANGLES
# NO RECTANGLE IS DIVIDED INTO EXACTLY 2,000,000 BUT FIND THE CLOSEST SOLUTION
# SOLVES IN ~5 SECONDS
subdivide <- function(x,y){
# TAKE RECTANGLE SIDES AND RETURN NUMBER... | /Problems_76_to_100/Euler085.R | permissive | lawphill/ProjectEuler | R | false | false | 1,099 | r | # ANY UNIT RECTANGLE CAN BE DIVIDED INTO A FINITE NUMBER OF SMALLER RECTANGLES
# FOR EXAMPLE, A 3x2 RECTANGLE CAN BE DIVIDED INTO 18 RECTANGLES
# NO RECTANGLE IS DIVIDED INTO EXACTLY 2,000,000 BUT FIND THE CLOSEST SOLUTION
# SOLVES IN ~5 SECONDS
subdivide <- function(x,y){
# TAKE RECTANGLE SIDES AND RETURN NUMBER... |
#' @importFrom rcmdcheck compare_checks
try_compare_checks <- function(old, new, package, version, maintainer) {
if (inherits(old, "error") || inherits(new, "error")) {
structure(
list(
old = old,
new = new,
cmp = NULL,
package = package,
version = version,
... | /R/compare.R | permissive | bbolker/revdepcheck-1 | R | false | false | 2,251 | r |
#' @importFrom rcmdcheck compare_checks
try_compare_checks <- function(old, new, package, version, maintainer) {
if (inherits(old, "error") || inherits(new, "error")) {
structure(
list(
old = old,
new = new,
cmp = NULL,
package = package,
version = version,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mcl.R
\name{mcl}
\alias{mcl}
\title{Run mcl.}
\usage{
mcl(mcl_input, mcl_output, i_value, e_value, other_args = NULL, ...)
}
\arguments{
\item{mcl_input}{Character vector of length one; the path to the input file
for mcl clustering.}
\item{m... | /man/mcl.Rd | permissive | joelnitta/baitfindR | R | false | true | 1,729 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mcl.R
\name{mcl}
\alias{mcl}
\title{Run mcl.}
\usage{
mcl(mcl_input, mcl_output, i_value, e_value, other_args = NULL, ...)
}
\arguments{
\item{mcl_input}{Character vector of length one; the path to the input file
for mcl clustering.}
\item{m... |
#' hospitals.
#'
#' @name hospitals
#' @docType package
NULL
| /R/hospitals-package.r | no_license | jjchern/hospitals | R | false | false | 61 | r | #' hospitals.
#'
#' @name hospitals
#' @docType package
NULL
|
########################################
# Gaussian process
########################################
# Element-wise matrix autocorrelation function
cov.m <- function(rows, k, d) {
params <- k$params
k <- k$k
# Covariance of the elements from matrix d
k(d[rows[1],], d[rows[2],], params)
}
# Matrix autocorrelat... | /rgp.R | no_license | bglazer/rgp | R | false | false | 8,691 | r | ########################################
# Gaussian process
########################################
# Element-wise matrix autocorrelation function
cov.m <- function(rows, k, d) {
params <- k$params
k <- k$k
# Covariance of the elements from matrix d
k(d[rows[1],], d[rows[2],], params)
}
# Matrix autocorrelat... |
dist.multiPhylo <- function(x, method="geodesic", force.multi2di = FALSE,
outgroup = NULL, convert.multifurcating = FALSE, use.random.resolution =
FALSE, scale = NULL, verbose = FALSE)
{
if(length(x) < 2)
return(matrix())
if(class(x) == "multiPhylo") # ideally, we will have this
{
... | /distory/R/dist.multiPhylo.R | no_license | ingted/R-Examples | R | false | false | 6,239 | r | dist.multiPhylo <- function(x, method="geodesic", force.multi2di = FALSE,
outgroup = NULL, convert.multifurcating = FALSE, use.random.resolution =
FALSE, scale = NULL, verbose = FALSE)
{
if(length(x) < 2)
return(matrix())
if(class(x) == "multiPhylo") # ideally, we will have this
{
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coersion-tk_xts.R
\name{tk_xts}
\alias{tk_xts}
\alias{tk_xts_}
\title{Coerce time series objects and tibbles with date/date-time columns to xts.}
\usage{
tk_xts(data, select = NULL, date_var = NULL, silent = FALSE, ...)
tk_xts_(data, select ... | /man/tk_xts.Rd | no_license | business-science/timetk | R | false | true | 3,416 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coersion-tk_xts.R
\name{tk_xts}
\alias{tk_xts}
\alias{tk_xts_}
\title{Coerce time series objects and tibbles with date/date-time columns to xts.}
\usage{
tk_xts(data, select = NULL, date_var = NULL, silent = FALSE, ...)
tk_xts_(data, select ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model.R
\name{as.omega.model}
\alias{as.omega.model}
\title{Extract Omegas from Model}
\usage{
\method{as.omega}{model}(x, ...)
}
\arguments{
\item{x}{model}
\item{...}{passed arguments}
}
\value{
omega (subset of model)
}
\d... | /man/as.omega.model.Rd | no_license | cran/nonmemica | R | false | true | 463 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model.R
\name{as.omega.model}
\alias{as.omega.model}
\title{Extract Omegas from Model}
\usage{
\method{as.omega}{model}(x, ...)
}
\arguments{
\item{x}{model}
\item{...}{passed arguments}
}
\value{
omega (subset of model)
}
\d... |
\name{maxPWMScore-methods}
\docType{methods}
\alias{maxPWMScore-methods}
\title{ ~~ Methods for Function \code{maxPWMScore} ~~}
\description{
Accessor method for \code{maxPWMScore}
}
\section{Methods}{
\describe{
\item{\code{maxPWMScore(object)}}{
%% ~~describe this method here~~
}
}}
\keyword{methods}
\keyword{ ~... | /man/maxPWMScore-methods.Rd | no_license | patrickCNMartin/ChIPanalyser | R | false | false | 353 | rd | \name{maxPWMScore-methods}
\docType{methods}
\alias{maxPWMScore-methods}
\title{ ~~ Methods for Function \code{maxPWMScore} ~~}
\description{
Accessor method for \code{maxPWMScore}
}
\section{Methods}{
\describe{
\item{\code{maxPWMScore(object)}}{
%% ~~describe this method here~~
}
}}
\keyword{methods}
\keyword{ ~... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EOO_functions.R
\name{getAreaEOO}
\alias{getAreaEOO}
\title{Calculates area of the created EOO polygon.}
\usage{
getAreaEOO(EOO.polygon)
}
\arguments{
\item{EOO.polygon}{An object of class SpatialPolygons, usually the output
from \code{makeEO... | /man/getAreaEOO.Rd | no_license | xtbgtraining/redlistr | R | false | true | 940 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EOO_functions.R
\name{getAreaEOO}
\alias{getAreaEOO}
\title{Calculates area of the created EOO polygon.}
\usage{
getAreaEOO(EOO.polygon)
}
\arguments{
\item{EOO.polygon}{An object of class SpatialPolygons, usually the output
from \code{makeEO... |
RF_output <- function(dataFrameTrain, dataFrameTest, targetVecTrain, targetVecTest, featureSelected, nTree = 100, title = "Random Forest ROC Curve"){
#package
require(randomForest)
require(ROCR)
require(R.utils)
sourceDirectory("/Users/yuezhao/Desktop/projects/R_lib_jason/", modifiedOnly=TRUE)
data_rf_train <- as.dat... | /RF_output.R | no_license | jasonzhao0307/R_lib_jason | R | false | false | 1,951 | r | RF_output <- function(dataFrameTrain, dataFrameTest, targetVecTrain, targetVecTest, featureSelected, nTree = 100, title = "Random Forest ROC Curve"){
#package
require(randomForest)
require(ROCR)
require(R.utils)
sourceDirectory("/Users/yuezhao/Desktop/projects/R_lib_jason/", modifiedOnly=TRUE)
data_rf_train <- as.dat... |
install_load <- function (package1, ...) {
# convert arguments to vector
packages <- c(package1, ...)
# start loop to determine if each package is installed
for(package in packages){
# if package is installed locally, load
if(package %in% rownames(installed.packages()))
do... | /install_load.R | no_license | wdewithub/Getting-cleaning-Data_Wk4_Assignment | R | false | false | 523 | r | install_load <- function (package1, ...) {
# convert arguments to vector
packages <- c(package1, ...)
# start loop to determine if each package is installed
for(package in packages){
# if package is installed locally, load
if(package %in% rownames(installed.packages()))
do... |
#QUESTION 1
#Neither of the hypothesis are true
#exp(𝑈𝑖) = 2 or 3 - could see a state with triple the smoking
#
smokeFile = Pmisc::downloadIfOld("http://pbrown.ca/teaching/appliedstats/data/smoke.RData")
#Loading required namespace: R.utils
load(smokeFile)
smoke = smoke[smoke$Age > 9, ] #getting rid of 9 year olds... | /Assignment 4.R | no_license | FionaMcLean/UK_road_fatalities_analysis | R | false | false | 10,242 | r | #QUESTION 1
#Neither of the hypothesis are true
#exp(𝑈𝑖) = 2 or 3 - could see a state with triple the smoking
#
smokeFile = Pmisc::downloadIfOld("http://pbrown.ca/teaching/appliedstats/data/smoke.RData")
#Loading required namespace: R.utils
load(smokeFile)
smoke = smoke[smoke$Age > 9, ] #getting rid of 9 year olds... |
countrypair_df = data.frame(Date = c(as.Date("2000-01-01"),
as.Date("2001-01-01")),
CountryPair = c("A-B", "B-C"),
Val = c(1,2))
country_df = data.frame(Date = rep(c(as.Date("2000-01-01"),
... | /tests/append_countrypair_test.R | no_license | MichaelGurkov/GlobalFinancialCycleSynch | R | false | false | 904 | r | countrypair_df = data.frame(Date = c(as.Date("2000-01-01"),
as.Date("2001-01-01")),
CountryPair = c("A-B", "B-C"),
Val = c(1,2))
country_df = data.frame(Date = rep(c(as.Date("2000-01-01"),
... |
\name{CausalImpact}
\alias{CausalImpact}
\title{Inferring causal impact using structural time-series models}
\description{
\code{CausalImpact()} performs causal inference through
counterfactual predictions using a Bayesian structural
time-series model.
See the package documentation
(http://google.github.io/C... | /man/CausalImpact.Rd | permissive | dexterpante/CausalImpact | R | false | false | 11,225 | rd | \name{CausalImpact}
\alias{CausalImpact}
\title{Inferring causal impact using structural time-series models}
\description{
\code{CausalImpact()} performs causal inference through
counterfactual predictions using a Bayesian structural
time-series model.
See the package documentation
(http://google.github.io/C... |
# theme_psychro {{{
#' Custom theme for psychrometric chart.
#'
#' @param asp Aspect ratio of plot. Defaults to NULL.
#'
#' @return A ggplot2 theme.
#'
#' @keywords internal
#' @author Hongyuan Jia
#' @importFrom ggplot2 element_blank element_line element_rect element_text theme theme_bw
#' @examples
#' theme_psychro()... | /R/theme.R | permissive | ariel32/ggpsychro | R | false | false | 2,259 | r | # theme_psychro {{{
#' Custom theme for psychrometric chart.
#'
#' @param asp Aspect ratio of plot. Defaults to NULL.
#'
#' @return A ggplot2 theme.
#'
#' @keywords internal
#' @author Hongyuan Jia
#' @importFrom ggplot2 element_blank element_line element_rect element_text theme theme_bw
#' @examples
#' theme_psychro()... |
#' Get an aggregate value from the indegree of nodes
#' @description Get a single,
#' aggregate value from the
#' indegree values for all nodes
#' in a graph, or, a subset of
#' graph nodes.
#' @param graph a graph object of
#' class \code{dgr_graph}.
#' @param agg the aggregation
#' function to use for summarizing
#' ... | /R/get_agg_degree_in.R | permissive | OleksiyAnokhin/DiagrammeR | R | false | false | 3,343 | r | #' Get an aggregate value from the indegree of nodes
#' @description Get a single,
#' aggregate value from the
#' indegree values for all nodes
#' in a graph, or, a subset of
#' graph nodes.
#' @param graph a graph object of
#' class \code{dgr_graph}.
#' @param agg the aggregation
#' function to use for summarizing
#' ... |
#' Rational Number
#'
#' Data type and functions to work with rational numbers.
#'
#' @param num (integer) numerator
#' @param denom (integer) denominator
#'
#' @details ...
#'
#' @value ...
#'
#' @export
#' @examples
#' rat <- rational(1:3, 3:5)
#' rat + 1
rational <- function(num, denom) {
out <- mapply(c, nu... | /package/R/rational.R | no_license | compStat/programming-course | R | false | false | 689 | r | #' Rational Number
#'
#' Data type and functions to work with rational numbers.
#'
#' @param num (integer) numerator
#' @param denom (integer) denominator
#'
#' @details ...
#'
#' @value ...
#'
#' @export
#' @examples
#' rat <- rational(1:3, 3:5)
#' rat + 1
rational <- function(num, denom) {
out <- mapply(c, nu... |
library(dplyr)
library(Seurat)
library(SeuratData)
library(patchwork)
library(edgeR)
library(limma)
library(scater)
library(miloR)
library(statmod)
library(MultinomialCI)
# Loading the data
data_dir_old <- '/Users/eliel/Library/CloudStorage/OneDrive-Technion/R Code/10XData/01_Ovary_Old_2_Oct_19'
data_dir_... | /BatchCorrection_MILO.R | no_license | SavirLab/AgingOvarianImmuneMilieu | R | false | false | 12,372 | r | library(dplyr)
library(Seurat)
library(SeuratData)
library(patchwork)
library(edgeR)
library(limma)
library(scater)
library(miloR)
library(statmod)
library(MultinomialCI)
# Loading the data
data_dir_old <- '/Users/eliel/Library/CloudStorage/OneDrive-Technion/R Code/10XData/01_Ovary_Old_2_Oct_19'
data_dir_... |
cat( #Dale-Madsen model for lee with 2 stages
"model{
#data inputs:
# nYears
# nSites
# nAges
# y dim=c(nSites,nYears,nAges,nPasses)
# siteWidth dim=c(nSites,nYears) standardized to have mean zero and sd 1
#Priors
#initial abundance parameters
for(a in 1:nAges){
for(b in 1:3){
betaI... | /analyze/constructDailMadsenCovariates.R | no_license | evanchildress/lee | R | false | false | 3,418 | r | cat( #Dale-Madsen model for lee with 2 stages
"model{
#data inputs:
# nYears
# nSites
# nAges
# y dim=c(nSites,nYears,nAges,nPasses)
# siteWidth dim=c(nSites,nYears) standardized to have mean zero and sd 1
#Priors
#initial abundance parameters
for(a in 1:nAges){
for(b in 1:3){
betaI... |
d<-read.csv2("household_power_consumption.txt",dec=".",sep=";",na.strings = "?",colClasses = c("character","character","numeric","numeric","numeric","numeric","numeric","numeric","numeric"))
d$Date<-strptime(paste(d$Date,d$Time,sep=" "),format = "%d/%m/%Y %H:%M:%S")
d<-d[,-2]
d<-d[as.Date(d$Date) %in% c(as.Date("200... | /plot4.R | no_license | hafdraven/CourseraDataPlotting | R | false | false | 1,024 | r | d<-read.csv2("household_power_consumption.txt",dec=".",sep=";",na.strings = "?",colClasses = c("character","character","numeric","numeric","numeric","numeric","numeric","numeric","numeric"))
d$Date<-strptime(paste(d$Date,d$Time,sep=" "),format = "%d/%m/%Y %H:%M:%S")
d<-d[,-2]
d<-d[as.Date(d$Date) %in% c(as.Date("200... |
#rm(list=ls())
data1<-read.delim("household.txt",sep = ";")
s<-split(data1,data1$Date)
a1<-s$`1/2/2007`
a1<-transform(a1, Date=as.Date(Date))
a2<-s$`2/2/2007`
a2<-transform(a2, Date=as.Date(Date))
data2<-a1
dates<-as.character(data2$Date)
times<-as.character(data2$Time)
data2$Date.time<-paste(dates,times,sep = " ... | /figure/plot3.R | no_license | andbrand22/ExData_Plotting1 | R | false | false | 788 | r | #rm(list=ls())
data1<-read.delim("household.txt",sep = ";")
s<-split(data1,data1$Date)
a1<-s$`1/2/2007`
a1<-transform(a1, Date=as.Date(Date))
a2<-s$`2/2/2007`
a2<-transform(a2, Date=as.Date(Date))
data2<-a1
dates<-as.character(data2$Date)
times<-as.character(data2$Time)
data2$Date.time<-paste(dates,times,sep = " ... |
# loading packages
library(shiny)
library(haven)
library(tidyverse)
library(shinythemes)
library(maps)
library(mapproj)
# server
server <- function(input, output) {
# data set
pgsf <- read_dta("PGSFV2.dta")
# relevant variables
pgsf_app <- pgsf %>%
select("county_id", "county_lab", "start",
... | /server.R | no_license | faclass/App | R | false | false | 1,368 | r |
# loading packages
library(shiny)
library(haven)
library(tidyverse)
library(shinythemes)
library(maps)
library(mapproj)
# server
server <- function(input, output) {
# data set
pgsf <- read_dta("PGSFV2.dta")
# relevant variables
pgsf_app <- pgsf %>%
select("county_id", "county_lab", "start",
... |
wine_color = wine %>%
group_by(color)%>%
select(-ID)%>%
summarize_all(mean)%>%
column_to_rownames(var = "color")
wine_qual = wine %>%
group_by(quality)%>%
select(-ID)%>%
summarize_all(mean)%>%
column_to_rownames(var = "quality")
pca_color = prcomp(wine_color, rank=5, scale=TRUE)
loadings_color = pca_c... | /hw4/scratch_4.R | no_license | hannahjonesut/HannahHW | R | false | false | 3,211 | r | wine_color = wine %>%
group_by(color)%>%
select(-ID)%>%
summarize_all(mean)%>%
column_to_rownames(var = "color")
wine_qual = wine %>%
group_by(quality)%>%
select(-ID)%>%
summarize_all(mean)%>%
column_to_rownames(var = "quality")
pca_color = prcomp(wine_color, rank=5, scale=TRUE)
loadings_color = pca_c... |
#
# (c) 2012 -- 2014 Georgios Gousios <gousiosg@gmail.com>
#
# BSD licensed, see LICENSE in top level dir
#
# Predicting merge_time of pull requests
source(file = "R/packages.R")
source(file = "R/cmdline.R")
source(file = "R/utils.R")
source(file = "R/classification.R")
library(pROC)
library(sqldf)
merge.time.model... | /R/merge-time.R | permissive | igorsteinmacher/pullreqs | R | false | false | 4,103 | r | #
# (c) 2012 -- 2014 Georgios Gousios <gousiosg@gmail.com>
#
# BSD licensed, see LICENSE in top level dir
#
# Predicting merge_time of pull requests
source(file = "R/packages.R")
source(file = "R/cmdline.R")
source(file = "R/utils.R")
source(file = "R/classification.R")
library(pROC)
library(sqldf)
merge.time.model... |
\name{as_conc}
\alias{as_conc}
\title{
Coerce data frame to a concordance object
}
\description{
Coerces a data frame to an object of the class \code{conc}.
}
\usage{
as_conc(x,
left = NA,
match = NA,
right = NA,
keep_original = FALSE,
...)
}
\arguments{
\item{x}{
a data fr... | /man/as_conc.Rd | no_license | wai-wong-reimagine/mclm | R | false | false | 1,499 | rd | \name{as_conc}
\alias{as_conc}
\title{
Coerce data frame to a concordance object
}
\description{
Coerces a data frame to an object of the class \code{conc}.
}
\usage{
as_conc(x,
left = NA,
match = NA,
right = NA,
keep_original = FALSE,
...)
}
\arguments{
\item{x}{
a data fr... |
#####################################################################################
### PLSR models AISA ################################################################
### Anna K Schweiger July 31 2020 ###################################################
### with lines of code and the VIPjh function from Shawn P. Se... | /PLSR_WoodRiver.R | permissive | annakat/PLSR_WoodRiver | R | false | false | 16,513 | r | #####################################################################################
### PLSR models AISA ################################################################
### Anna K Schweiger July 31 2020 ###################################################
### with lines of code and the VIPjh function from Shawn P. Se... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/books.R
\name{books}
\alias{books}
\title{Data frame of Ming and Qing novels}
\usage{
books()
}
\value{
A data frame with two columns: \code{text} and \code{book}
}
\description{
Returns a data frame of Ming and Qing novels with
only 2 column... | /man/books.Rd | permissive | boltomli/mingqingxiaoshuor | R | false | true | 505 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/books.R
\name{books}
\alias{books}
\title{Data frame of Ming and Qing novels}
\usage{
books()
}
\value{
A data frame with two columns: \code{text} and \code{book}
}
\description{
Returns a data frame of Ming and Qing novels with
only 2 column... |
##Peer reviewed programming assignment for the course R programming as part of the
##data science specialisation on Coursera
##Date: 14-09-2020
##Author: Janine
##github: Neurogenbat
##I will now write a function that creates a matrix that can cache its inverse
makeChacheMatrix <- fubction(x = matrix()){
inv <-... | /cachematrix.R | no_license | Neurogenbat/ProgrammingAssignment2 | R | false | false | 1,140 | r | ##Peer reviewed programming assignment for the course R programming as part of the
##data science specialisation on Coursera
##Date: 14-09-2020
##Author: Janine
##github: Neurogenbat
##I will now write a function that creates a matrix that can cache its inverse
makeChacheMatrix <- fubction(x = matrix()){
inv <-... |
testlist <- list(x = c(1289093589L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), y = integer(0))
result <- do.call(diffrprojects... | /diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609962904-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 362 | r | testlist <- list(x = c(1289093589L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), y = integer(0))
result <- do.call(diffrprojects... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vcc.fci.R
\name{vcc.fci}
\alias{vcc.fci}
\title{First-echo Cover Index of Vertical Canopy Cover}
\usage{
vcc.fci(las = NA, thresh.val = 1.25, silent = FALSE)
}
\arguments{
\item{las}{Path or name of LAS file. Defaults to NA.}
\item{thresh.va... | /man/vcc.fci.Rd | permissive | fdbesanto2/gapfraction | R | false | true | 1,046 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vcc.fci.R
\name{vcc.fci}
\alias{vcc.fci}
\title{First-echo Cover Index of Vertical Canopy Cover}
\usage{
vcc.fci(las = NA, thresh.val = 1.25, silent = FALSE)
}
\arguments{
\item{las}{Path or name of LAS file. Defaults to NA.}
\item{thresh.va... |
\name{OrdKrig_optim_krige}
\alias{OrdKrig_optim_krige}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Optimization function local ordinary kriging
}
\description{
Optimization function performing 5-fold validation and returning RMSE of estimates for local ordinary kriging.
}
\usage{
OrdKrig_opti... | /man/OrdKrig_optim_krige.Rd | no_license | andbal/SpatialInterpol | R | false | false | 2,085 | rd | \name{OrdKrig_optim_krige}
\alias{OrdKrig_optim_krige}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Optimization function local ordinary kriging
}
\description{
Optimization function performing 5-fold validation and returning RMSE of estimates for local ordinary kriging.
}
\usage{
OrdKrig_opti... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
loglh <- function(Y_fit, Y) {
.Call(`_fect_loglh`, Y_fit, Y)
}
loglh_ub <- function(Y_fit, Y, I) {
.Call(`_fect_loglh_ub`, Y_fit, Y, I)
}
data_ub_adj <- function(I_data, da... | /R/RcppExports.R | no_license | danrthomas/fect | R | false | false | 3,699 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
loglh <- function(Y_fit, Y) {
.Call(`_fect_loglh`, Y_fit, Y)
}
loglh_ub <- function(Y_fit, Y, I) {
.Call(`_fect_loglh_ub`, Y_fit, Y, I)
}
data_ub_adj <- function(I_data, da... |
library(e1071)
get_csv_and_use_it_for_testing<- function(name){
data_set <- read.csv(sprintf("./%s.csv",name))
y <- take_lables_from_data_set(data_set)
X <- take_set_from_data_set(data_set)
spliting <- sample(1:nrow(data_set))
X_ <- split.data.frame(as.data.frame(X[spliting,]),rep(1:5))
y_ <- split.dat... | /projekt2/svm.R | no_license | michalMilewski-8/knnAlgorithImplementationAndBenchmarking | R | false | false | 1,697 | r | library(e1071)
get_csv_and_use_it_for_testing<- function(name){
data_set <- read.csv(sprintf("./%s.csv",name))
y <- take_lables_from_data_set(data_set)
X <- take_set_from_data_set(data_set)
spliting <- sample(1:nrow(data_set))
X_ <- split.data.frame(as.data.frame(X[spliting,]),rep(1:5))
y_ <- split.dat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dynamodb_operations.R
\name{dynamodb_describe_table}
\alias{dynamodb_describe_table}
\title{Returns information about the table, including the current status of the
table, when it was created, the primary key schema, and any indexes on
the ta... | /cran/paws.database/man/dynamodb_describe_table.Rd | permissive | sanchezvivi/paws | R | false | true | 1,213 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dynamodb_operations.R
\name{dynamodb_describe_table}
\alias{dynamodb_describe_table}
\title{Returns information about the table, including the current status of the
table, when it was created, the primary key schema, and any indexes on
the ta... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 80928
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 80928
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc02-nonuniform-... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Miller-Marin/trafficlight-controller/tlc02-nonuniform-depth-133/tlc02-nonuniform-depth-133.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 697 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 80928
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 80928
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc02-nonuniform-... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/regression.R
\name{BinaryLogit}
\alias{BinaryLogit}
\title{\code{BinaryLogit} Binary Logit Regression.}
\usage{
BinaryLogit(formula, data, subset = NULL, weights = NULL, ...)
}
\arguments{
\item{formula}{An object of class \code{\link... | /man/BinaryLogit.Rd | no_license | xtmwang/flipMultivariates | R | false | false | 885 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/regression.R
\name{BinaryLogit}
\alias{BinaryLogit}
\title{\code{BinaryLogit} Binary Logit Regression.}
\usage{
BinaryLogit(formula, data, subset = NULL, weights = NULL, ...)
}
\arguments{
\item{formula}{An object of class \code{\link... |
###########################
##Liss panel data study
##predicting attrition
##raw data file: Peter Lugtig 18-2-2014
##clean data
###########################
##read spss file:
library("foreign")
liss.dat <- read.spss("Participation_panelmember_fieldworkperiod.sav", use.value.labels = F, to.data.frame = T)
... | /liss.R | no_license | L-Ippel/EstimatingShrinkageFactors_CSDA | R | false | false | 3,523 | r | ###########################
##Liss panel data study
##predicting attrition
##raw data file: Peter Lugtig 18-2-2014
##clean data
###########################
##read spss file:
library("foreign")
liss.dat <- read.spss("Participation_panelmember_fieldworkperiod.sav", use.value.labels = F, to.data.frame = T)
... |
library(ape)
testtree <- read.tree("10090_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="10090_0_unrooted.txt") | /codeml_files/newick_trees_processed/10090_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("10090_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="10090_0_unrooted.txt") |
library(checkarg)
### Name: isNonZeroIntegerOrInfVectorOrNull
### Title: Wrapper for the checkarg function, using specific parameter
### settings.
### Aliases: isNonZeroIntegerOrInfVectorOrNull
### ** Examples
isNonZeroIntegerOrInfVectorOrNull(2)
# returns TRUE (argument is valid)
isNonZeroIntegerOrInfVectorOr... | /data/genthat_extracted_code/checkarg/examples/isNonZeroIntegerOrInfVectorOrNull.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 903 | r | library(checkarg)
### Name: isNonZeroIntegerOrInfVectorOrNull
### Title: Wrapper for the checkarg function, using specific parameter
### settings.
### Aliases: isNonZeroIntegerOrInfVectorOrNull
### ** Examples
isNonZeroIntegerOrInfVectorOrNull(2)
# returns TRUE (argument is valid)
isNonZeroIntegerOrInfVectorOr... |
\name{getQuantilesParams}
\alias{getQuantilesParams}
\title{
A function to extract the quantiles and parameters
}
\description{
This extracts the quantiles and parameters.
}
\usage{
getQuantilesParams(fit.i, qFunc = qLOGNO, quantiles = seq(0.006,
0.996, length.out = 1000), linksq = c(identity, exp, NULL,
NULL), free... | /man/getQuantilesParams.Rd | no_license | scarpino/binequality | R | false | false | 1,163 | rd | \name{getQuantilesParams}
\alias{getQuantilesParams}
\title{
A function to extract the quantiles and parameters
}
\description{
This extracts the quantiles and parameters.
}
\usage{
getQuantilesParams(fit.i, qFunc = qLOGNO, quantiles = seq(0.006,
0.996, length.out = 1000), linksq = c(identity, exp, NULL,
NULL), free... |
library(magclass)
### Name: mcalc
### Title: mcalc
### Aliases: mcalc mcalc<-
### ** Examples
data(population_magpie)
population_magpie
mcalc(population_magpie,X12 ~ A2*B1,append=TRUE)
population_magpie
mcalc(population_magpie,`Nearly B1` ~ 0.5*A2 + 99.5*B1)
| /data/genthat_extracted_code/magclass/examples/mcalc.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 275 | r | library(magclass)
### Name: mcalc
### Title: mcalc
### Aliases: mcalc mcalc<-
### ** Examples
data(population_magpie)
population_magpie
mcalc(population_magpie,X12 ~ A2*B1,append=TRUE)
population_magpie
mcalc(population_magpie,`Nearly B1` ~ 0.5*A2 + 99.5*B1)
|
\name{tracks}
\alias{tracks}
\alias{alignPlots}
\alias{align.plots}
\alias{Tracks-class}
\alias{xlim}
\alias{xlim,Tracks-method}
\alias{xlim,numeric-method}
\alias{xlim,IRanges-method}
\alias{xlim,GRanges-method}
\alias{xlim<-}
\alias{xlim<-,Tracks,numeric-method}
\alias{xlim<-,Tracks,IRanges-method}
\alias{xlim<-,Trac... | /man/tracks.Rd | no_license | dronga/ggbio | R | false | false | 12,903 | rd | \name{tracks}
\alias{tracks}
\alias{alignPlots}
\alias{align.plots}
\alias{Tracks-class}
\alias{xlim}
\alias{xlim,Tracks-method}
\alias{xlim,numeric-method}
\alias{xlim,IRanges-method}
\alias{xlim,GRanges-method}
\alias{xlim<-}
\alias{xlim<-,Tracks,numeric-method}
\alias{xlim<-,Tracks,IRanges-method}
\alias{xlim<-,Trac... |
library('shiny')
library("shinythemes")
# To load some ui elements
source("firearms.R")
ui <- fluidPage(theme = shinytheme("flatly"),
navbarPage("United States Crime Analysis",
fluid = TRUE,
#############
#### Home ###
#############
tabPan... | /ui.R | no_license | daniellee0/usa-crime-analysis | R | false | false | 20,937 | r | library('shiny')
library("shinythemes")
# To load some ui elements
source("firearms.R")
ui <- fluidPage(theme = shinytheme("flatly"),
navbarPage("United States Crime Analysis",
fluid = TRUE,
#############
#### Home ###
#############
tabPan... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.R
\name{generate.results}
\alias{generate.results}
\title{Generates clustering results}
\usage{
generate.results(g_clusters, distance.matrix)
}
\arguments{
\item{g_clusters}{A object of class igraph containing all component connected (cc... | /man/generate.results.Rd | no_license | cran/mstknnclust | R | false | true | 1,192 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.R
\name{generate.results}
\alias{generate.results}
\title{Generates clustering results}
\usage{
generate.results(g_clusters, distance.matrix)
}
\arguments{
\item{g_clusters}{A object of class igraph containing all component connected (cc... |
library(plotly)
setwd("/Users/Talal/Tesi/familiarity/R/AllCodeNGram")
Codedata <- read.csv("allCodeNgram.csv")
p <- plot_ly(codeData ,y= ~android, name = 'Android',type = 'box') %>%
add_trace(y = ~swing, name = 'Swing Code') %>%
add_trace(y = ~swift, name = 'Swift Code') %>%
add_trace(y = ~perl, name = 'Perl Cod... | /R/AllCodeNGram/allCodeNgram.R | no_license | talalelafchal/familiarity | R | false | false | 473 | r | library(plotly)
setwd("/Users/Talal/Tesi/familiarity/R/AllCodeNGram")
Codedata <- read.csv("allCodeNgram.csv")
p <- plot_ly(codeData ,y= ~android, name = 'Android',type = 'box') %>%
add_trace(y = ~swing, name = 'Swing Code') %>%
add_trace(y = ~swift, name = 'Swift Code') %>%
add_trace(y = ~perl, name = 'Perl Cod... |
############
# A script to process Bills and Bills Details data for analysis
# Project: Texas Bipartisanship by Mark Clayton Hand
# Script Author: Igor Holas
# Date: 06-20-2017
###########
# use sponsors csv
# -- import repub value from people_small
# -- calculate mean repub score per bill_id
# use create bill_facts... | /clean_bill_details.R | no_license | iholas/tx_lege | R | false | false | 1,438 | r | ############
# A script to process Bills and Bills Details data for analysis
# Project: Texas Bipartisanship by Mark Clayton Hand
# Script Author: Igor Holas
# Date: 06-20-2017
###########
# use sponsors csv
# -- import repub value from people_small
# -- calculate mean repub score per bill_id
# use create bill_facts... |
context("showArticles")
test_that("showArticles", {
meta <- data.frame(id=as.character(1:3), date=as.Date(c("1960-01-01","1987-06-25","2014-08-06")), title=c("Title 1", "Title 2", "Title 3"), page=c(24,60,1), stringsAsFactors=FALSE)
text <- list("1"="Text 1", "2"="Text 2", "3"="Text 3")
corpus <- list(met... | /tests/testthat/test_showArticles.R | no_license | mm28ajos/tmT | R | false | false | 830 | r | context("showArticles")
test_that("showArticles", {
meta <- data.frame(id=as.character(1:3), date=as.Date(c("1960-01-01","1987-06-25","2014-08-06")), title=c("Title 1", "Title 2", "Title 3"), page=c(24,60,1), stringsAsFactors=FALSE)
text <- list("1"="Text 1", "2"="Text 2", "3"="Text 3")
corpus <- list(met... |
#' Wiggle style
#'
#' 'Wiggle' is a theme style that adds an amount of cumulative uniform noise to
#' interpolated lines, making them wiggle a bit. The functions are used in the
#' following way: \describe{
#' \item{\code{wiggle()}}{is a function factory that produces a function that
#' is subsequently used in elem... | /R/style_wiggle.R | permissive | gejielin/elementalist | R | false | false | 3,935 | r | #' Wiggle style
#'
#' 'Wiggle' is a theme style that adds an amount of cumulative uniform noise to
#' interpolated lines, making them wiggle a bit. The functions are used in the
#' following way: \describe{
#' \item{\code{wiggle()}}{is a function factory that produces a function that
#' is subsequently used in elem... |
data <- read.csv("data.csv", header=TRUE, sep=";",dec=",")
library(ggplot2)
levels(data$Langue) <- c("D", "F", "D")
# relation bivariée
png(filename="figure1.png", width=500, height=500)
ggplot(data, aes(x=EtrTaux2012, y=VotTaux2014)) + geom_point(aes(size=Pop2012)) + geom_smooth(aes(group=1),method="lm") + theme_bw(... | /script.R | no_license | joelgombin/VotationCH | R | false | false | 1,323 | r | data <- read.csv("data.csv", header=TRUE, sep=";",dec=",")
library(ggplot2)
levels(data$Langue) <- c("D", "F", "D")
# relation bivariée
png(filename="figure1.png", width=500, height=500)
ggplot(data, aes(x=EtrTaux2012, y=VotTaux2014)) + geom_point(aes(size=Pop2012)) + geom_smooth(aes(group=1),method="lm") + theme_bw(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generate_values.R
\name{generate_sobol_set}
\alias{generate_sobol_set}
\title{Generate Sobol Set}
\usage{
generate_sobol_set(n, dim, seed = 0)
}
\arguments{
\item{n}{The number of values (per dimension) to extract.}
\item{dim}{The number of ... | /man/generate_sobol_set.Rd | permissive | KirillShaman/spacefillr | R | false | true | 1,082 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generate_values.R
\name{generate_sobol_set}
\alias{generate_sobol_set}
\title{Generate Sobol Set}
\usage{
generate_sobol_set(n, dim, seed = 0)
}
\arguments{
\item{n}{The number of values (per dimension) to extract.}
\item{dim}{The number of ... |
# Coursera and Johns Hopkins University
# Data Science Specialization
# Course04 : Exploratory Data Analysis
# Project01 : ExData_Plotting1
# 2019-02-27
data_raw <- read.table(file="household_power_consumption.txt",head=TRUE,sep=";",colClasses=c("character","character","character","character","character","character","... | /Cleaning_Data.R | no_license | NamWoo/ExData_Plotting1 | R | false | false | 1,243 | r | # Coursera and Johns Hopkins University
# Data Science Specialization
# Course04 : Exploratory Data Analysis
# Project01 : ExData_Plotting1
# 2019-02-27
data_raw <- read.table(file="household_power_consumption.txt",head=TRUE,sep=";",colClasses=c("character","character","character","character","character","character","... |
library(tidyverse)
library(effsize)
library(plyr)
library(reshape2)
library(caret)
library(glmnet)
options(scipen=999)
setwd("C:\\Users\\winbase\\MIDS\\w203\\w203_lab3")
crime_data = read.csv("crime_v2.csv")
#clean data, dropping all NA rows
crime_data = crime_data[which(crime_data$county != 'NA'),]
# what is wron... | /lasso_ridge_elasticnet_jn.R | no_license | joshuajnoble/w203_lab3 | R | false | false | 3,015 | r |
library(tidyverse)
library(effsize)
library(plyr)
library(reshape2)
library(caret)
library(glmnet)
options(scipen=999)
setwd("C:\\Users\\winbase\\MIDS\\w203\\w203_lab3")
crime_data = read.csv("crime_v2.csv")
#clean data, dropping all NA rows
crime_data = crime_data[which(crime_data$county != 'NA'),]
# what is wron... |
# BSD_2_clause
map_page <- {
tabPanel(
title="Map",
tags$head(
tags$link(
href='https://fonts.googleapis.com/css?family=Open+Sans:300,400',
rel='stylesheet',
type='text/css'
),
tags$link(
href='http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesom... | /map_page.R | no_license | jacob-ogre/NMFS_WC_salmon | R | false | false | 649 | r | # BSD_2_clause
map_page <- {
tabPanel(
title="Map",
tags$head(
tags$link(
href='https://fonts.googleapis.com/css?family=Open+Sans:300,400',
rel='stylesheet',
type='text/css'
),
tags$link(
href='http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesom... |
#! This file was automatically produced by the testextra package.
#! Changes will be overwritten.
context('tests extracted from file `testing_blocks.R`')
#line 103 "/rdtf/parsetools/R/testing_blocks.R"
test_that('extract_test_block', {#!@testing
pd <- get_parse_data(parse(text={'
if(F){#!@testing
# a m... | /tests/testthat/test-testing_blocks.R | no_license | RDocTaskForce/parsetools | R | false | false | 7,439 | r | #! This file was automatically produced by the testextra package.
#! Changes will be overwritten.
context('tests extracted from file `testing_blocks.R`')
#line 103 "/rdtf/parsetools/R/testing_blocks.R"
test_that('extract_test_block', {#!@testing
pd <- get_parse_data(parse(text={'
if(F){#!@testing
# a m... |
exon.len<-10.439090
intron.len<-317.326271
pdf("intron_exon_cpg_ct.pdf",8,2)
layout(matrix(1:4,nrow = 1,byrow = T))
par(mar=c(4,4,4,1),mgp=c(2,.5,0))
#==========================cpg data==================
exp.exon<-scan("data/exp_exon.txt",what="s")
exp.exon<-as.numeric(exp.exon)/c(100,100,100,10,100,100)/exon.len
ex... | /Fig5_epigenetics/A-D_intron_exon_mut/intron_exon_cpg_ct.R | no_license | fanghu-hku/MMR | R | false | false | 1,247 | r | exon.len<-10.439090
intron.len<-317.326271
pdf("intron_exon_cpg_ct.pdf",8,2)
layout(matrix(1:4,nrow = 1,byrow = T))
par(mar=c(4,4,4,1),mgp=c(2,.5,0))
#==========================cpg data==================
exp.exon<-scan("data/exp_exon.txt",what="s")
exp.exon<-as.numeric(exp.exon)/c(100,100,100,10,100,100)/exon.len
ex... |
############S#################
## TRAIT CHANGE OVER SPACE ##
############S#################
rm(list=ls())
#Detach packages####
detachAllPackages <- function() {
basic.packages <- c("package:stats","package:graphics","package:grDevices","package:utils","package:datasets","package:methods","package:base")... | /7. New_Soil_moisture_interaction_scaled_FINAL_tea_int_septeas_year_2.R | no_license | gejielin/Tundra_teabag_experiment | R | false | false | 31,396 | r | ############S#################
## TRAIT CHANGE OVER SPACE ##
############S#################
rm(list=ls())
#Detach packages####
detachAllPackages <- function() {
basic.packages <- c("package:stats","package:graphics","package:grDevices","package:utils","package:datasets","package:methods","package:base")... |
# not a real question,not constructive,off topic,open,too localized
# 38522,20897,20847,89176,8910
sample.priors <- c(0.21598860680003587,0.11716717502467032,0.11688683053736432,0.5,0.049957387637929486)
| /sample-priors.R | no_license | dsmvwld/Kaggle-StackOverflow | R | false | false | 204 | r | # not a real question,not constructive,off topic,open,too localized
# 38522,20897,20847,89176,8910
sample.priors <- c(0.21598860680003587,0.11716717502467032,0.11688683053736432,0.5,0.049957387637929486)
|
#caveendish measurements on density of earth(1798)
cavendish<-c(5.5,5.57,5.42,5.61,5.53,5.47,4.88,5.62,5.63,4.07,
5.29,5.34,5.26,5.44,5.46,5.55,5.34,5.3,5.36,5.79,5.75,5.29,5.1,
5.86,5.58,5.27,5.85,5.65,5.39)
#empirical distribution function ecdf()
plot(ecdf(cavendish),xlab="density of the earth",ylab="cummulat... | /Fall2013/programming/empirical11-26-2013.R | no_license | NanaAkwasiAbayieBoateng/MemphisClasses | R | false | false | 1,759 | r | #caveendish measurements on density of earth(1798)
cavendish<-c(5.5,5.57,5.42,5.61,5.53,5.47,4.88,5.62,5.63,4.07,
5.29,5.34,5.26,5.44,5.46,5.55,5.34,5.3,5.36,5.79,5.75,5.29,5.1,
5.86,5.58,5.27,5.85,5.65,5.39)
#empirical distribution function ecdf()
plot(ecdf(cavendish),xlab="density of the earth",ylab="cummulat... |
## While using UCI HAR dataset, I acknowledge the following publication:
##
## Davide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra
## and Jorge L. Reyes-Ortiz. Human Activity Recognition on Smartphones
## using a Multiclass Hardware-Friendly Support Vector Machine.
## International Workshop of Ambient Assisted... | /Getting and Cleaning Data - Course Project/run_analysis.R | no_license | JAMorello/datasciencecoursera | R | false | false | 5,290 | r | ## While using UCI HAR dataset, I acknowledge the following publication:
##
## Davide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra
## and Jorge L. Reyes-Ortiz. Human Activity Recognition on Smartphones
## using a Multiclass Hardware-Friendly Support Vector Machine.
## International Workshop of Ambient Assisted... |
#. Recognize handwritten digits using Random Forests
#. Author: @ dspk
#. IMPORTANT USAGE INSTRUCTIONS:
#. Get the data for the MNIST database of handwritten digits
#. Arrange the data in a list named Usedat with two fields:
#. X : a matrix of all the images so that a single row contains a single image
#. y : the lab... | /RandomForestDigitRec.R | no_license | dspk/Rcode | R | false | false | 4,449 | r | #. Recognize handwritten digits using Random Forests
#. Author: @ dspk
#. IMPORTANT USAGE INSTRUCTIONS:
#. Get the data for the MNIST database of handwritten digits
#. Arrange the data in a list named Usedat with two fields:
#. X : a matrix of all the images so that a single row contains a single image
#. y : the lab... |
<<<<<<< HEAD
####Written by: AM Cook
####Purpose: to find the first two moments of a distrbution from quantile breaks (defined by the upper and lower percent)
####Date: February 10, 2012
####Note: Gamma distribution returns shape and scale rather than rate (as per winbugs distribution) for use in r rate... | /silverhake/src/_Rfunctions/find.moments.r | no_license | jgmunden/ecomod | R | false | false | 4,695 | r | <<<<<<< HEAD
####Written by: AM Cook
####Purpose: to find the first two moments of a distrbution from quantile breaks (defined by the upper and lower percent)
####Date: February 10, 2012
####Note: Gamma distribution returns shape and scale rather than rate (as per winbugs distribution) for use in r rate... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/future.batchtools-package.R
\docType{package}
\name{future.batchtools}
\alias{future.batchtools}
\alias{future.batchtools-package}
\title{future.batchtools: A Future for batchtools}
\description{
The \pkg{future.batchtools} package implements... | /man/future.batchtools.Rd | no_license | jeremyrcoyle/future.batchtools | R | false | true | 924 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/future.batchtools-package.R
\docType{package}
\name{future.batchtools}
\alias{future.batchtools}
\alias{future.batchtools-package}
\title{future.batchtools: A Future for batchtools}
\description{
The \pkg{future.batchtools} package implements... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{choose_files}
\alias{choose_files}
\title{Cross-platform choose files function}
\usage{
choose_files(
caption = "Select files",
default = "",
multi = TRUE,
filters = NULL
)
}
\arguments{
\item{caption}{Caption for th... | /man/choose_files.Rd | permissive | joshrud/phenoptrReports | R | false | true | 671 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{choose_files}
\alias{choose_files}
\title{Cross-platform choose files function}
\usage{
choose_files(
caption = "Select files",
default = "",
multi = TRUE,
filters = NULL
)
}
\arguments{
\item{caption}{Caption for th... |
Codcodom <-
function(x) {return(as.factor(Codadd(x)))}
| /globalGSA/R/Codcodom.R | no_license | ingted/R-Examples | R | false | false | 57 | r | Codcodom <-
function(x) {return(as.factor(Codadd(x)))}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/drive_examples.R
\name{drive_examples}
\alias{drive_examples}
\alias{drive_examples_local}
\alias{drive_examples_remote}
\alias{drive_example_local}
\alias{drive_example_remote}
\title{Example files}
\usage{
drive_examples_local(matches)
dri... | /man/drive_examples.Rd | permissive | tidyverse/googledrive | R | false | true | 1,659 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/drive_examples.R
\name{drive_examples}
\alias{drive_examples}
\alias{drive_examples_local}
\alias{drive_examples_remote}
\alias{drive_example_local}
\alias{drive_example_remote}
\title{Example files}
\usage{
drive_examples_local(matches)
dri... |
# This srcipt is an Exploratory Data Analysis script
# The script evaluates a single households electricity house usage for two days in a year
# The script creates an Exploratory line graph of the sub meter reading instaled at the house
#
#Load the required library functions
library(dplyr)
# The function assumes that ... | /plot3.R | no_license | knjenga/ExData_Proj1 | R | false | false | 1,783 | r | # This srcipt is an Exploratory Data Analysis script
# The script evaluates a single households electricity house usage for two days in a year
# The script creates an Exploratory line graph of the sub meter reading instaled at the house
#
#Load the required library functions
library(dplyr)
# The function assumes that ... |
plot4 <- function(){
data = read_data()
plot4_internal(data)
}
plot4_internal <- function(data){
png(file ="plot4.png")
par(mfrow = c(2, 2))
#plot1
t = subset(data, select=c(Time,Global_active_power))
t$Global_active_power = as.numeric(as.character(t$Global_active_power))
plot(t,type="l",xlab="",... | /plot4.R | no_license | darily/ExData_Plotting1 | R | false | false | 1,887 | r | plot4 <- function(){
data = read_data()
plot4_internal(data)
}
plot4_internal <- function(data){
png(file ="plot4.png")
par(mfrow = c(2, 2))
#plot1
t = subset(data, select=c(Time,Global_active_power))
t$Global_active_power = as.numeric(as.character(t$Global_active_power))
plot(t,type="l",xlab="",... |
library(shiny)
library(tidyverse)
library(rlang)
library(sf)
library(tmap)
# prepare data -------------------------------------------------------------
data<-read_csv(here::here("data","FSNAU_proc.csv"))
shapes<-sf::st_read("./shapefile", "Som_Admbnda_Adm2_UNDP")
shapes1<-shapes%>%
rename(regions=admin1Name,... | /app2.R | no_license | yorokoby/simulation_withgit2 | R | false | false | 3,514 | r |
library(shiny)
library(tidyverse)
library(rlang)
library(sf)
library(tmap)
# prepare data -------------------------------------------------------------
data<-read_csv(here::here("data","FSNAU_proc.csv"))
shapes<-sf::st_read("./shapefile", "Som_Admbnda_Adm2_UNDP")
shapes1<-shapes%>%
rename(regions=admin1Name,... |
#ASSIGNMENT#1
#QUESTION2A
mydata <- read.table("C:/Users/Joann/Documents/R Directory/Weight_birth.csv",
header=TRUE)
#QUESTION2B
smokedata <- subset(mydata, SMOKE < 1, select=c(ID:LOW))
#print(smokedata)
mean1 <- mean(smokedata$BWT)
#print(mean1)
#sprintf("The mean weight of children born to smo... | /birthData.R | no_license | gpconsiglio/SCINETcourse2 | R | false | false | 1,436 | r | #ASSIGNMENT#1
#QUESTION2A
mydata <- read.table("C:/Users/Joann/Documents/R Directory/Weight_birth.csv",
header=TRUE)
#QUESTION2B
smokedata <- subset(mydata, SMOKE < 1, select=c(ID:LOW))
#print(smokedata)
mean1 <- mean(smokedata$BWT)
#print(mean1)
#sprintf("The mean weight of children born to smo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/key-helpers.R
\name{check_set_equality}
\alias{check_set_equality}
\title{Test if the value sets of two different columns in two different tables are the same}
\usage{
check_set_equality(t1, c1, t2, c2)
}
\arguments{
\item{t1}{The data frame ... | /man/check_set_equality.Rd | permissive | bbecane/dm | R | false | true | 1,254 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/key-helpers.R
\name{check_set_equality}
\alias{check_set_equality}
\title{Test if the value sets of two different columns in two different tables are the same}
\usage{
check_set_equality(t1, c1, t2, c2)
}
\arguments{
\item{t1}{The data frame ... |
## Exploratory Data Analysis Week 1. Course Project 1.
## Step 0. Estimate memory required to read entire file
# Prior to loading the dataset into R, determine how much memory is required to read the entire file.
# Formula: memory required = no. of column * no. of rows * 8 bytes/numeric
# One gigabyte has 10^9 bytes... | /plot4.R | no_license | conniehon/ExData_Plotting1 | R | false | false | 3,634 | r | ## Exploratory Data Analysis Week 1. Course Project 1.
## Step 0. Estimate memory required to read entire file
# Prior to loading the dataset into R, determine how much memory is required to read the entire file.
# Formula: memory required = no. of column * no. of rows * 8 bytes/numeric
# One gigabyte has 10^9 bytes... |
library(simTool)
### Name: evalGrids
### Title: Workhorse for simulation studies
### Aliases: evalGrids
### ** Examples
rng = function(data, ...) {
ret = range(data)
names(ret) = c("min", "max")
ret
}
# call runif(n=1), runif(n=2), runif(n=3)
# and range on the three "datasets"
# generated by runif(n=1), runif(n=... | /data/genthat_extracted_code/simTool/examples/evalGrids.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 2,961 | r | library(simTool)
### Name: evalGrids
### Title: Workhorse for simulation studies
### Aliases: evalGrids
### ** Examples
rng = function(data, ...) {
ret = range(data)
names(ret) = c("min", "max")
ret
}
# call runif(n=1), runif(n=2), runif(n=3)
# and range on the three "datasets"
# generated by runif(n=1), runif(n=... |
library(marg)
### Name: rsm
### Title: Fit a Regression-Scale Model
### Aliases: rsm
### Keywords: models regression
### ** Examples
## House Price Data
data(houses)
houses.rsm <- rsm(price ~ ., family = student(5), data = houses)
## model fit including all covariates
houses.rsm <- rsm(price ~ ., family = student(5... | /data/genthat_extracted_code/marg/examples/rsm.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,910 | r | library(marg)
### Name: rsm
### Title: Fit a Regression-Scale Model
### Aliases: rsm
### Keywords: models regression
### ** Examples
## House Price Data
data(houses)
houses.rsm <- rsm(price ~ ., family = student(5), data = houses)
## model fit including all covariates
houses.rsm <- rsm(price ~ ., family = student(5... |
\name{lambda.pcut.cv1}
\alias{lambda.pcut.cv1}
\title{ Choose the Tuning Parameter of the Ridge Inverse and
Thresholding Level of the Empirical p-Values.}
\description{ Calculate total prediction error for test data after
fitting partial correlations from train data for all
values... | /man/lambda.pcut.cv1.Rd | no_license | cran/GGMridge | R | false | false | 2,011 | rd | \name{lambda.pcut.cv1}
\alias{lambda.pcut.cv1}
\title{ Choose the Tuning Parameter of the Ridge Inverse and
Thresholding Level of the Empirical p-Values.}
\description{ Calculate total prediction error for test data after
fitting partial correlations from train data for all
values... |
library(lubridate); library(tidyverse); library(shiny); library(nycflights13); library(ggthemes)
ui <- bootstrapPage( ## Define the UI
sliderInput(inputId = 'hr', label = 'Scheduled departure hour: ', min = 0, max = 23, value = 12),
sliderInput(inputId = 'min', label = 'Scheduled departure minute: ', min = 0, max ... | /Assignments/Assignment 2/app.r | permissive | mariobonifacio/R4D | R | false | false | 1,406 | r | library(lubridate); library(tidyverse); library(shiny); library(nycflights13); library(ggthemes)
ui <- bootstrapPage( ## Define the UI
sliderInput(inputId = 'hr', label = 'Scheduled departure hour: ', min = 0, max = 23, value = 12),
sliderInput(inputId = 'min', label = 'Scheduled departure minute: ', min = 0, max ... |
/Nuova cartella/cluster.r | no_license | maria-natale/Progetto_SAD | R | false | false | 6,995 | r | ||
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Lasso/oesophagus.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.01,family="gaussian",standardize=TRUE)
sink('./oesophagus_007.txt',append=TRU... | /Model/EN/Lasso/oesophagus/oesophagus_007.R | no_license | esbgkannan/QSMART | R | false | false | 352 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Lasso/oesophagus.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.01,family="gaussian",standardize=TRUE)
sink('./oesophagus_007.txt',append=TRU... |
library(tidyverse)
bits_2018_w <- read_rds(path = "../../datos_salida/bits_2018_weights.rdata")
edos <- c("Nacional", sort(unique(bits_2018_w$edo)))
leer_tabs_clase <- function(mi_edo) {
mi_edo_top_file <- list.files("../../datos_salida/estimaciones/estimaciones_clase_edo_top",
pattern = paste0(mi_edo, "... | /5-resultados/scripts/crear_datos.R | no_license | tereom/madmex_pixel_sample | R | false | false | 1,720 | r | library(tidyverse)
bits_2018_w <- read_rds(path = "../../datos_salida/bits_2018_weights.rdata")
edos <- c("Nacional", sort(unique(bits_2018_w$edo)))
leer_tabs_clase <- function(mi_edo) {
mi_edo_top_file <- list.files("../../datos_salida/estimaciones/estimaciones_clase_edo_top",
pattern = paste0(mi_edo, "... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_cypher.R
\name{send_cypher}
\alias{send_cypher}
\title{Send a cypher file to be executed}
\usage{
send_cypher(
path,
con,
type = c("row", "graph"),
output = c("r", "json"),
include_stats = TRUE,
meta = FALSE
)
}
\arguments{
\... | /man/send_cypher.Rd | permissive | gregleleu/neo4r | R | false | true | 814 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_cypher.R
\name{send_cypher}
\alias{send_cypher}
\title{Send a cypher file to be executed}
\usage{
send_cypher(
path,
con,
type = c("row", "graph"),
output = c("r", "json"),
include_stats = TRUE,
meta = FALSE
)
}
\arguments{
\... |
## Matrix calc package can be used
## command is.singular.matrix()function checks if the matrix passed is invertible
## The can be used to result is TRUE or FALSE.
## This function sets and gets the passed matrix and its inverse.
## it will handle declaration of local variables and free variables
makeCacheMatrix <- ... | /cachematrix.R | no_license | Taneesha/ProgrammingAssignment2 | R | false | false | 1,402 | r |
## Matrix calc package can be used
## command is.singular.matrix()function checks if the matrix passed is invertible
## The can be used to result is TRUE or FALSE.
## This function sets and gets the passed matrix and its inverse.
## it will handle declaration of local variables and free variables
makeCacheMatrix <- ... |
qat_call_save_set_addup <-
function(resultlist_part, element = -999, dim_mv=1, time = NULL, height = NULL, lat = NULL, lon = NULL, vec1 = NULL, vec2 = NULL, vec3 = NULL, vec4 = NULL, baseunit = NULL, savelist = list(), savelistcounter = 1) {
## functionality: calling save function for qat_save_set_addup_1d
## author: A... | /R/qat_call_save_set_addup.R | no_license | cran/qat | R | false | false | 871 | r | qat_call_save_set_addup <-
function(resultlist_part, element = -999, dim_mv=1, time = NULL, height = NULL, lat = NULL, lon = NULL, vec1 = NULL, vec2 = NULL, vec3 = NULL, vec4 = NULL, baseunit = NULL, savelist = list(), savelistcounter = 1) {
## functionality: calling save function for qat_save_set_addup_1d
## author: A... |
library(rqdatatable)
### Name: ex_data_table.relop_order_expr
### Title: Order rows by expression.
### Aliases: ex_data_table.relop_order_expr
### ** Examples
dL <- build_frame(
"x", "y" |
2L , "b" |
-4L , "a" |
3L , "c" )
rquery_pipeline <- local_td(dL) %.>%
order_expr(., abs(x))
ex_data_table(rq... | /data/genthat_extracted_code/rqdatatable/examples/ex_data_table.relop_order_expr.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 339 | r | library(rqdatatable)
### Name: ex_data_table.relop_order_expr
### Title: Order rows by expression.
### Aliases: ex_data_table.relop_order_expr
### ** Examples
dL <- build_frame(
"x", "y" |
2L , "b" |
-4L , "a" |
3L , "c" )
rquery_pipeline <- local_td(dL) %.>%
order_expr(., abs(x))
ex_data_table(rq... |
\name{USstate}
\alias{USstate}
\docType{data}
\title{
US state dataset}
\description{
FIPS codes for the US states
}
\usage{data(USstate)}
\format{
A data.frame with 50 rows on 3 variables.
}
\details{
The dataset refers to the FIPS codes for the US states. The variables are \code{fips} (FIPS State Numeric Code), \code... | /man/USstate.Rd | no_license | cran/datasetsICR | R | false | false | 665 | rd | \name{USstate}
\alias{USstate}
\docType{data}
\title{
US state dataset}
\description{
FIPS codes for the US states
}
\usage{data(USstate)}
\format{
A data.frame with 50 rows on 3 variables.
}
\details{
The dataset refers to the FIPS codes for the US states. The variables are \code{fips} (FIPS State Numeric Code), \code... |
check_version <- function() {
rv <- package_version(paste(R.Version()$major, R.Version()$minor, sep = "."))
if (rv < package_version("3.2.3")) {
message(sprintf(readRDS(.get_path("pattern.Rds")), rv, "3.3.3"))
}
if (packageVersion("swirl") <= package_version("101.5.9")) {
message(readRDS(.get_path... | /00-Hello-QTLCourse/customTests.R | no_license | wush978/QTLCourse | R | false | false | 370 | r | check_version <- function() {
rv <- package_version(paste(R.Version()$major, R.Version()$minor, sep = "."))
if (rv < package_version("3.2.3")) {
message(sprintf(readRDS(.get_path("pattern.Rds")), rv, "3.3.3"))
}
if (packageVersion("swirl") <= package_version("101.5.9")) {
message(readRDS(.get_path... |
Chart$methods(
# Set the default parameters
get_params = function(){
params$port <<- params$port %or% 8000
params$font <<- params$font %or% "Rockwell, Helvetica, Arial, sans"
params$title <<- params$title %or% params$main %or% internal$file$names$template # alias (main)
params$... | /R/Chart_params.R | no_license | freyreeste/clickme | R | false | false | 1,379 | r | Chart$methods(
# Set the default parameters
get_params = function(){
params$port <<- params$port %or% 8000
params$font <<- params$font %or% "Rockwell, Helvetica, Arial, sans"
params$title <<- params$title %or% params$main %or% internal$file$names$template # alias (main)
params$... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.