content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
library(data.table)
library(dplyr)
library(tidyverse)
library(sf)
library(tidyverse) # for reading in data, graphing, and cleaning
library(tidymodels) # for modeling ... tidily
library(glmnet) # for regularized regression, including LASSO
library(naniar) # for examining missing valu... | /app3.R | permissive | sli0317/final_project | R | false | false | 15,474 | r | library(data.table)
library(dplyr)
library(tidyverse)
library(sf)
library(tidyverse) # for reading in data, graphing, and cleaning
library(tidymodels) # for modeling ... tidily
library(glmnet) # for regularized regression, including LASSO
library(naniar) # for examining missing valu... |
# Gradient Descent for linear regression
# Requires feature_scaling function
#setwd("~/Data_Science//R_stuff//my_functions//linear_regression")
source("../my_functions/linear_regression/feature_scaling.r")
gradient_descent <- function(df,target,alpha=0.0001,it,scaling=T) {
J_out<-file(paste("J.dat",Sys.time()),"w")... | /my_functions/linear_regression/gradient_decent.r | no_license | raghulmz/R-Works | R | false | false | 1,332 | r | # Gradient Descent for linear regression
# Requires feature_scaling function
#setwd("~/Data_Science//R_stuff//my_functions//linear_regression")
source("../my_functions/linear_regression/feature_scaling.r")
gradient_descent <- function(df,target,alpha=0.0001,it,scaling=T) {
J_out<-file(paste("J.dat",Sys.time()),"w")... |
Data_Simulator <- function(data, n, unique.num, outliers.remove){
require(doParallel)
if(n < 1){return("n must be a positive integer")}
if(unique.num < 1){return("unique.num must be a positive integer")}
#Identify numerical and categorical predictors
#Low unique-count numerics will be turned into factors
#A... | /DataSimulator.r | no_license | frankfredj/Artificial-Data-Simulator | R | false | false | 6,372 | r | Data_Simulator <- function(data, n, unique.num, outliers.remove){
require(doParallel)
if(n < 1){return("n must be a positive integer")}
if(unique.num < 1){return("unique.num must be a positive integer")}
#Identify numerical and categorical predictors
#Low unique-count numerics will be turned into factors
#A... |
# Shai Knight-Winnig 2017
rm(list = ls()) #clear environment
#Import functions for Probit operations:
source('Probit_Fns.R')
#Initialize variables and generate data to be used in all trials:
n <- 200 #Number of observations in 'sample'
t <- 500 #Number of trials in simulation
true_theta <- c(1.25)
true_beta <- c(... | /Endog_Grid_Point.R | no_license | knightskw/Microeconometrics-II | R | false | false | 2,008 | r | # Shai Knight-Winnig 2017
rm(list = ls()) #clear environment
#Import functions for Probit operations:
source('Probit_Fns.R')
#Initialize variables and generate data to be used in all trials:
n <- 200 #Number of observations in 'sample'
t <- 500 #Number of trials in simulation
true_theta <- c(1.25)
true_beta <- c(... |
# ----------------------------------------------------------------
# $Author: thm $
# $Date: 2011-12-01 14:26:10 +0100 (Thu, 01 Dec 2011) $
# $Rev: 200 $
# ----------------------------------------------------------------
AverageWuxDataFrame <- function(x, INDEX, fun = "mean") {
##
## Args:
## x: WUX data frame from... | /R/AverageWuxDataFrame.R | no_license | cran/wux | R | false | false | 1,509 | r |
# ----------------------------------------------------------------
# $Author: thm $
# $Date: 2011-12-01 14:26:10 +0100 (Thu, 01 Dec 2011) $
# $Rev: 200 $
# ----------------------------------------------------------------
AverageWuxDataFrame <- function(x, INDEX, fun = "mean") {
##
## Args:
## x: WUX data frame from... |
#' Import and Merge Web of Science Files into a Data Frame
#'
#' This function imports and if there is more than one file in the user selected
#' directory automatically merges Web of Science files. This is all put into a
#' data frame. Moreover, all duplicated records are automatically removed.
#'
#' @usage import_... | /R/import_wos_files.R | permissive | lucaspedroni/scimeetr | R | false | false | 4,155 | r | #' Import and Merge Web of Science Files into a Data Frame
#'
#' This function imports and if there is more than one file in the user selected
#' directory automatically merges Web of Science files. This is all put into a
#' data frame. Moreover, all duplicated records are automatically removed.
#'
#' @usage import_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{sim_res}
\alias{sim_res}
\title{The Mplus output for the three models fitted in the simulation study.}
\format{
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 3 rows and 2 colum... | /man/sim_res.Rd | permissive | nkims/IRtreesInORM | R | false | true | 477 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{sim_res}
\alias{sim_res}
\title{The Mplus output for the three models fitted in the simulation study.}
\format{
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 3 rows and 2 colum... |
\name{outliers}
\alias{outliers}
\title{Define Outliers in a Data Frame}
\description{
This function is an interface to create a data frame defining
the type, observation and weight of outliers. The output is properly designed to
be used as input to other functions such as \code{\link{outliers.effects}}
and \code{... | /man/outliers-data-frame.Rd | no_license | cran/tsoutliers | R | false | false | 841 | rd | \name{outliers}
\alias{outliers}
\title{Define Outliers in a Data Frame}
\description{
This function is an interface to create a data frame defining
the type, observation and weight of outliers. The output is properly designed to
be used as input to other functions such as \code{\link{outliers.effects}}
and \code{... |
require(gplots)
require(RColorBrewer)
require(cba)
hcopt <- function(d, HC=NULL, method = "ward", members = NULL)
{
if ( is.null(HC) ) {
HC <- hclust(d,method=method,members=members)
}
ORD <- order.optimal(d,merge=HC$merge)
HC$merge <- ORD$merge
HC$order <- ORD$order
HC
}
sc... | /dvlp/barplot_enhanced_heatmap_example/heatmap.2g.R | no_license | tetomonti/CBMRtools | R | false | false | 25,463 | r | require(gplots)
require(RColorBrewer)
require(cba)
hcopt <- function(d, HC=NULL, method = "ward", members = NULL)
{
if ( is.null(HC) ) {
HC <- hclust(d,method=method,members=members)
}
ORD <- order.optimal(d,merge=HC$merge)
HC$merge <- ORD$merge
HC$order <- ORD$order
HC
}
sc... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods_Prefiltered.R
\docType{methods}
\name{show,Prefiltered-method}
\alias{show,Prefiltered-method}
\title{Prefiltering summary}
\usage{
\S4method{show}{Prefiltered}(object)
}
\arguments{
\item{object}{output of prefilter function}
}
\desc... | /man/show-Prefiltered-method.Rd | no_license | sunny-zq/PICS | R | false | true | 365 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods_Prefiltered.R
\docType{methods}
\name{show,Prefiltered-method}
\alias{show,Prefiltered-method}
\title{Prefiltering summary}
\usage{
\S4method{show}{Prefiltered}(object)
}
\arguments{
\item{object}{output of prefilter function}
}
\desc... |
##==========================================
## Name Convention in the rbms package
##
## FUNCTION: ts_snake_function()
## ARGUMENT: CamelNotation
## OBJECT: object_snake_name
## VARIABLE NAME: UPPER_CASE
##
## Date: 31.01.2021
##
## rbms_toolbox: useful functions for the rbms ... | /R/rbms_toolbox.r | no_license | AlessandroMari/rbms | R | false | false | 5,024 | r | ##==========================================
## Name Convention in the rbms package
##
## FUNCTION: ts_snake_function()
## ARGUMENT: CamelNotation
## OBJECT: object_snake_name
## VARIABLE NAME: UPPER_CASE
##
## Date: 31.01.2021
##
## rbms_toolbox: useful functions for the rbms ... |
##############################################
## Set Intersect and Venn Diagram Functions ##
##############################################
## Author: Thomas Girke
## Last update: Jan 5, 2015
##############################################
## Class and Method Definitions for VENNset ##
################################... | /R/overLapper.R | no_license | singuyenmai/Utilities | R | false | false | 28,657 | r | ##############################################
## Set Intersect and Venn Diagram Functions ##
##############################################
## Author: Thomas Girke
## Last update: Jan 5, 2015
##############################################
## Class and Method Definitions for VENNset ##
################################... |
#Astrid M Manuel
#03/08/2019
#This script produces edge and node files of top networks resulting from EW_dmGWAS
#files that result are input for graphing top modules in Cytoscape
#read in results of EW_dmGWAS permutation, as well as edge and node files that were input for EW_dmGWAS
setwd("C://Users//amanuel1//... | /getSignificantNetworks_PLChronicIMSGC.R | no_license | fangfang0906/EW_dmGWAS-Java | R | false | false | 3,545 | r | #Astrid M Manuel
#03/08/2019
#This script produces edge and node files of top networks resulting from EW_dmGWAS
#files that result are input for graphing top modules in Cytoscape
#read in results of EW_dmGWAS permutation, as well as edge and node files that were input for EW_dmGWAS
setwd("C://Users//amanuel1//... |
dist = function(p1, p2) sqrt(sum((p1 - p2) ^ 2)) #Евклидово расстояние
distances = function(points, u) apply(points, 1, dist, u) #Расстояние от всех points до точки u
sumByClass = function(class, arr) sum(arr[names(arr) == class]) #Суммирует значения каждого класса
plot.limits = function(arr, deviation = 0) c(min(arr) ... | /src/PF.R | no_license | Mikel4u4u/SMPR | R | false | false | 4,599 | r | dist = function(p1, p2) sqrt(sum((p1 - p2) ^ 2)) #Евклидово расстояние
distances = function(points, u) apply(points, 1, dist, u) #Расстояние от всех points до точки u
sumByClass = function(class, arr) sum(arr[names(arr) == class]) #Суммирует значения каждого класса
plot.limits = function(arr, deviation = 0) c(min(arr) ... |
#### Purpose: Munge HMD and associated data
#### Author: Ronald Richman
#### License: MIT
require(data.table)
require(dplyr)
require(ggplot2)
require(reshape2)
require(ChainLadder)
require(ggpubr)
require(patchwork)
require(scales)
require(MortalityLaws)
### Place the files for mx from the HMD in this directory and t... | /Mortality example/munge_HMD.R | permissive | ttlearning/Mind-the-Gap | R | false | false | 3,857 | r | #### Purpose: Munge HMD and associated data
#### Author: Ronald Richman
#### License: MIT
require(data.table)
require(dplyr)
require(ggplot2)
require(reshape2)
require(ChainLadder)
require(ggpubr)
require(patchwork)
require(scales)
require(MortalityLaws)
### Place the files for mx from the HMD in this directory and t... |
# Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... | /mepstrends/hc_use/json/code/r/totEXP__sop__mnhlth__.r | permissive | HHS-AHRQ/MEPS-summary-tables | R | false | false | 2,019 | r | # Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... |
checkinput_multilevel_formula <- function(formula){
err.msg <- .checkinputhelper_formula_basicstructure(formula=formula)
if(length(err.msg)>0)
return(err.msg)
F.formula <- as.Formula(formula)
# Formula should be of structure: y~X1+X2+(1+X3|CID)+(1+X1) | endo(X2)
# as Formula, this is exactly 2 parts
... | /R/f_checkinput_multilevel.R | no_license | mmeierer/REndo | R | false | false | 8,880 | r | checkinput_multilevel_formula <- function(formula){
err.msg <- .checkinputhelper_formula_basicstructure(formula=formula)
if(length(err.msg)>0)
return(err.msg)
F.formula <- as.Formula(formula)
# Formula should be of structure: y~X1+X2+(1+X3|CID)+(1+X1) | endo(X2)
# as Formula, this is exactly 2 parts
... |
library(lubridate)
# library(dplyr)
library(maptools)
# Load 'rgdal' package, which is used to read/write shapefiles and rasters
library(rgdal)
source("C:/Users/CaracterizaciónD/Documents/GitHub/pacoche/code/TEAM_code.R")
# source("C:/Users/Diego/Documents/CodigoR/ULEAM/Infor_Caract/code/calendar.R")
load(file = "dat... | /Machalilla_paper/code/machalilla_paper.R | no_license | faunamanabi/machalilla | R | false | false | 19,349 | r |
library(lubridate)
# library(dplyr)
library(maptools)
# Load 'rgdal' package, which is used to read/write shapefiles and rasters
library(rgdal)
source("C:/Users/CaracterizaciónD/Documents/GitHub/pacoche/code/TEAM_code.R")
# source("C:/Users/Diego/Documents/CodigoR/ULEAM/Infor_Caract/code/calendar.R")
load(file = "dat... |
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(saasCNV)
# Define UI for application that draws a histogram
shinyUI... | /cnv.data/ui.R | no_license | Dyyyyy/saasCNV | R | false | false | 952 | r | #
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(saasCNV)
# Define UI for application that draws a histogram
shinyUI... |
args <- commandArgs(TRUE)
table=read.table(file=args[1],header=FALSE,sep="")
# print(table)
g_range<-range(0,table[4])
plot(table[3], type="o", col="blue", ylim=g_range, axes="FALSE", ann="FALSE")
axis(1, at=1:5, lab=t"")
axis(2)#, las=2)
box()
title(main="Fuel",col.main="green",font.main="4")
title(xlab="Year")
titl... | /codon_plot.R | no_license | rhilt13/scripts | R | false | false | 360 | r |
args <- commandArgs(TRUE)
table=read.table(file=args[1],header=FALSE,sep="")
# print(table)
g_range<-range(0,table[4])
plot(table[3], type="o", col="blue", ylim=g_range, axes="FALSE", ann="FALSE")
axis(1, at=1:5, lab=t"")
axis(2)#, las=2)
box()
title(main="Fuel",col.main="green",font.main="4")
title(xlab="Year")
titl... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/psi_Opt.R
\name{psi_Opt}
\alias{psi_Opt}
\alias{Psi_Opt}
\alias{rho_Opt}
\alias{psip_Opt}
\alias{wgt_Opt}
\title{Optimal Psi}
\usage{
psi_Opt(x, cc)
Psi_Opt(x, cc)
rho_Opt(x, cc)
psip_Opt(x, cc)
wgt_Opt(x, cc)
}
\arguments{
\item{x}{a num... | /man/psi_Opt.Rd | no_license | kjellpk/optimalRhoPsi | R | false | true | 1,984 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/psi_Opt.R
\name{psi_Opt}
\alias{psi_Opt}
\alias{Psi_Opt}
\alias{rho_Opt}
\alias{psip_Opt}
\alias{wgt_Opt}
\title{Optimal Psi}
\usage{
psi_Opt(x, cc)
Psi_Opt(x, cc)
rho_Opt(x, cc)
psip_Opt(x, cc)
wgt_Opt(x, cc)
}
\arguments{
\item{x}{a num... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pm10.R
\docType{data}
\name{pm10}
\alias{pm10}
\title{Tibble con i dati di pm10 per 29 stazioni della regione VENETO}
\format{
Un tibble con 8 colonne e 21197 osservazioni
}
\usage{
pm10
}
\description{
Tibble con i dati di pm10 per 29 stazio... | /man/pm10.Rd | permissive | progettopulvirus/veneto | R | false | true | 365 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pm10.R
\docType{data}
\name{pm10}
\alias{pm10}
\title{Tibble con i dati di pm10 per 29 stazioni della regione VENETO}
\format{
Un tibble con 8 colonne e 21197 osservazioni
}
\usage{
pm10
}
\description{
Tibble con i dati di pm10 per 29 stazio... |
# A data.table is a data.frame. It inherits and builds on top of it.
# data.tables never use or need row names.
# Load data.table
library(data.table)
# Create the data.table X
X <- data.table(X = c("a", "b", "c"), value = c(0.5, 1.0, 1.5))
# View X
X
# ====//==== ====//==== ====//==== ====//==== ====//==== ====//==... | /Datacamp - R - Data Analyst/14 - data manipulation R/manipulation-1.R | no_license | Kallil12/anotacoes-cursos-online | R | false | false | 2,394 | r | # A data.table is a data.frame. It inherits and builds on top of it.
# data.tables never use or need row names.
# Load data.table
library(data.table)
# Create the data.table X
X <- data.table(X = c("a", "b", "c"), value = c(0.5, 1.0, 1.5))
# View X
X
# ====//==== ====//==== ====//==== ====//==== ====//==== ====//==... |
## Put comments here that give an overall description of what your
## functions do
## This function is used to create a special object that stores a matix and caches its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv_m<-NULL
set<-function(y){
x<<-y
inv_m<<-NULL
}
get<-function() x
setinv<... | /cachematrix.R | no_license | AniketRajput98/ProgrammingAssignment2 | R | false | false | 774 | r | ## Put comments here that give an overall description of what your
## functions do
## This function is used to create a special object that stores a matix and caches its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv_m<-NULL
set<-function(y){
x<<-y
inv_m<<-NULL
}
get<-function() x
setinv<... |
# Import ----
library(rio)
library(readxl)
library(readr)
# Data ----
library(dplyr)
library(data.table)
library(stringr)
library(magrittr)
library(purrr)
library(fastDummies)
library(lubridate)
library(stringr)
library(scales)
library(tseries)
library(xts)
library(zoo)
library(sophisthse)
# Plots ----
library(gg... | /lib.R | no_license | vishalbelsare/investment_forecasting | R | false | false | 960 | r | # Import ----
library(rio)
library(readxl)
library(readr)
# Data ----
library(dplyr)
library(data.table)
library(stringr)
library(magrittr)
library(purrr)
library(fastDummies)
library(lubridate)
library(stringr)
library(scales)
library(tseries)
library(xts)
library(zoo)
library(sophisthse)
# Plots ----
library(gg... |
library(rvest)
url <- paste0("https://thongtindoanhnghiep.co/tim-kiem?location=&kwd=phong+kham+da+khoa&p=", c(1:101))
data <- data.frame(NULL, stringsAsFactors = FALSE)
for (i in 1:length(url)) {
fl <- read_html(url[i])
Name <- fl %>%
html_nodes("h2 a") %>%
html_text()
Prov <... | /phongkham.R | no_license | ntdung96/WebsiteParsing | R | false | false | 620 | r | library(rvest)
url <- paste0("https://thongtindoanhnghiep.co/tim-kiem?location=&kwd=phong+kham+da+khoa&p=", c(1:101))
data <- data.frame(NULL, stringsAsFactors = FALSE)
for (i in 1:length(url)) {
fl <- read_html(url[i])
Name <- fl %>%
html_nodes("h2 a") %>%
html_text()
Prov <... |
##############################################
######## Visualisation of parameter space ####
##############################################
setwd("/Users/qadirga/Documents/Project 3/Manuscript/Visualization examples")
resxy<-100
x<-y<-seq(0,1,length=resxy)
#### Based on the inequality obtained in the Appendix ####
... | /Figure 1 of the manuscript/parameter_space_visualization.R | no_license | ghulamabdul/Asymm_cross_cov | R | false | false | 7,717 | r | ##############################################
######## Visualisation of parameter space ####
##############################################
setwd("/Users/qadirga/Documents/Project 3/Manuscript/Visualization examples")
resxy<-100
x<-y<-seq(0,1,length=resxy)
#### Based on the inequality obtained in the Appendix ####
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cdp-class.R
\docType{class}
\name{cdp-class}
\alias{cdp-class}
\alias{print.cdp}
\alias{plot.cdp}
\alias{summary.cdp}
\alias{fitted.cdp}
\alias{residuals.cdp}
\alias{predict.cdp}
\title{Class and Methods for Multiscale Codependence Analysis (... | /man/cdp-class.Rd | no_license | guenardg/codep | R | false | true | 6,419 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cdp-class.R
\docType{class}
\name{cdp-class}
\alias{cdp-class}
\alias{print.cdp}
\alias{plot.cdp}
\alias{summary.cdp}
\alias{fitted.cdp}
\alias{residuals.cdp}
\alias{predict.cdp}
\title{Class and Methods for Multiscale Codependence Analysis (... |
# Function to read and export data in different formats
# Author: raffaella.paparcone
###############################################################################
library(RCurl)
library(XML)
library(sqldf)
library(stringr)
#-----------------------OLD Reading function -------------------------#
Get_df <- function... | /GettingData.R | no_license | raffipapi/FirstRepository | R | false | false | 1,654 | r | # Function to read and export data in different formats
# Author: raffaella.paparcone
###############################################################################
library(RCurl)
library(XML)
library(sqldf)
library(stringr)
#-----------------------OLD Reading function -------------------------#
Get_df <- function... |
#' get_saved_tracks
#'
#' Creates a dataframe of all of the tracks you have saved (liked)
#'
#' @param select_key_cols Boolean. Sets whether to select key columns of interest or alternatively to leave all columns as is. Defaults to TRUE
#' @param rename_key_cols Boolean. Sets whether to rename the key columns to more ... | /R/get_tracks.R | permissive | condwanaland/spotty | R | false | false | 3,066 | r | #' get_saved_tracks
#'
#' Creates a dataframe of all of the tracks you have saved (liked)
#'
#' @param select_key_cols Boolean. Sets whether to select key columns of interest or alternatively to leave all columns as is. Defaults to TRUE
#' @param rename_key_cols Boolean. Sets whether to rename the key columns to more ... |
#load cart library for cross validation, read data, drop density.
require(caret)
mydata <- read.csv('Bodyfatproject.csv.')
mydata$Density <- NULL
#Using predictors Age, Weight and Height:
model <- train(bodyfat~Age + Weight + Height, mydata, method = "lm", trControl = trainControl(method = "cv", number = 10, ... | /codelisting.r | permissive | dallasmcgroarty/Body-Fat-Prediction-Project | R | false | false | 2,922 | r | #load cart library for cross validation, read data, drop density.
require(caret)
mydata <- read.csv('Bodyfatproject.csv.')
mydata$Density <- NULL
#Using predictors Age, Weight and Height:
model <- train(bodyfat~Age + Weight + Height, mydata, method = "lm", trControl = trainControl(method = "cv", number = 10, ... |
## ----include=FALSE, echo=FALSE, eval=TRUE--------------------------------
library(knitr)
options(width=300)
knitr::opts_chunk$set(
fig.width = 7, fig.height = 5,
fig.align = "center",
fig.path = "figures/04_",
size = "tiny",
echo = TRUE, eval=TRUE,
warning = FALSE, message = FALSE,
results = TRUE,... | /slides/04_distributions_discretes.R | no_license | jvanheld/stat1 | R | false | false | 14,196 | r | ## ----include=FALSE, echo=FALSE, eval=TRUE--------------------------------
library(knitr)
options(width=300)
knitr::opts_chunk$set(
fig.width = 7, fig.height = 5,
fig.align = "center",
fig.path = "figures/04_",
size = "tiny",
echo = TRUE, eval=TRUE,
warning = FALSE, message = FALSE,
results = TRUE,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Gargle-class.R
\name{gargle2.0_token}
\alias{gargle2.0_token}
\title{Generate a gargle token}
\usage{
gargle2.0_token(
email = gargle_oauth_email(),
app = gargle_app(),
package = "gargle",
scope = NULL,
user_params = NULL,
type = ... | /man/gargle2.0_token.Rd | permissive | samterfa/gargle2 | R | false | true | 2,483 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Gargle-class.R
\name{gargle2.0_token}
\alias{gargle2.0_token}
\title{Generate a gargle token}
\usage{
gargle2.0_token(
email = gargle_oauth_email(),
app = gargle_app(),
package = "gargle",
scope = NULL,
user_params = NULL,
type = ... |
#' Plot `covidcast_signal` object as choropleths, bubbles, or time series
#'
#' Several plot types are provided, including choropleth plots (maps), bubble
#' plots, and time series plots showing the change of signals over time, for a
#' data frame returned by `covidcast_signal()`. (Only the latest issue from the
#' dat... | /R-packages/covidcast/R/plot.R | no_license | maskegger/covidcast | R | false | false | 34,863 | r | #' Plot `covidcast_signal` object as choropleths, bubbles, or time series
#'
#' Several plot types are provided, including choropleth plots (maps), bubble
#' plots, and time series plots showing the change of signals over time, for a
#' data frame returned by `covidcast_signal()`. (Only the latest issue from the
#' dat... |
#Generates random binary trees with n nodes
library("phytools", lib.loc="~/R/win-library/3.4")
for(n in 6:20) {
d<-c()
t=unroot(rtree(n))
s=paste('./Test Trees/','d',n,'.m',sep='')
cat(paste('n=',n,';\n\n',"d = [ ",sep=''),file=s,append=FALSE)
for(i in 1:(n-1)) {
for(j in (i+1):n) {
d<-c(d,length(n... | /tree_generator.R | no_license | arodgers11/R | R | false | false | 531 | r | #Generates random binary trees with n nodes
library("phytools", lib.loc="~/R/win-library/3.4")
for(n in 6:20) {
d<-c()
t=unroot(rtree(n))
s=paste('./Test Trees/','d',n,'.m',sep='')
cat(paste('n=',n,';\n\n',"d = [ ",sep=''),file=s,append=FALSE)
for(i in 1:(n-1)) {
for(j in (i+1):n) {
d<-c(d,length(n... |
library(radiant)
app_title <- "HIDAP"
shinyUI(navbarPage(app_title, id = "nav_radiant", inverse = TRUE,
collapsible = TRUE,
#tabPanel("Dashboard", withMathJax(), uiOutput("ui_dashboard")),
#tabPanel("Dashboard", withMathJax(), uiOutput("ui_dashboard")), book
tabPanel("Design", withMathJax(), uiOut... | /inst/hidap/ui.R | no_license | lukawanjohi/hidap | R | false | false | 1,602 | r | library(radiant)
app_title <- "HIDAP"
shinyUI(navbarPage(app_title, id = "nav_radiant", inverse = TRUE,
collapsible = TRUE,
#tabPanel("Dashboard", withMathJax(), uiOutput("ui_dashboard")),
#tabPanel("Dashboard", withMathJax(), uiOutput("ui_dashboard")), book
tabPanel("Design", withMathJax(), uiOut... |
GenData_GeneralMissing <- function(N,seed,alpha,theta,beta1,beta2,beta3,sd.e=1,sd.x=1)
{
set.seed(seed)
p = length(theta) - 1
Sigma = diag(1,3)
Sigma[1,2] = Sigma[2,1] = Sigma[2,3] = Sigma[3,2] = Sigma[1,3] = Sigma[3,1] = 0.5
cSigma = chol(Sigma)
err = matrix(rnorm(3*N),N,3) %*% cSigma
Xp_1 = matr... | /SimData/GenData_GeneralMissing.R | no_license | changgee/MIDist | R | false | false | 1,967 | r |
GenData_GeneralMissing <- function(N,seed,alpha,theta,beta1,beta2,beta3,sd.e=1,sd.x=1)
{
set.seed(seed)
p = length(theta) - 1
Sigma = diag(1,3)
Sigma[1,2] = Sigma[2,1] = Sigma[2,3] = Sigma[3,2] = Sigma[1,3] = Sigma[3,1] = 0.5
cSigma = chol(Sigma)
err = matrix(rnorm(3*N),N,3) %*% cSigma
Xp_1 = matr... |
#' Table of default parameters
#'
#' A table of the default parameters entered to \code{\link{compute_design_performance}}.
#'
#' @details Each row of this table corresponds to one input to \code{\link{compute_design_performance}}, and contains: (1) the name of the argument passed to \code{\link{compute_design_performa... | /interAdapt/R/Command_Line_Version_of_Adaptive_Group_Sequential_Design.R | no_license | ingted/R-Examples | R | false | false | 58,666 | r | #' Table of default parameters
#'
#' A table of the default parameters entered to \code{\link{compute_design_performance}}.
#'
#' @details Each row of this table corresponds to one input to \code{\link{compute_design_performance}}, and contains: (1) the name of the argument passed to \code{\link{compute_design_performa... |
\name{ukwf}
\docType{data}
\alias{ukwf}
\title{United Kindom Workforce (1955.1-1988.4)}
\description{
United Kindom workforce. Sample: 1955.1 - 1988.4. Remark: Consisting of workforce in employment and
unemployment. This time series is part of the data set used in the book Franses (1996).
}
\forma... | /partsm/man/ukwf.Rd | no_license | MatthieuStigler/partsm | R | false | false | 834 | rd | \name{ukwf}
\docType{data}
\alias{ukwf}
\title{United Kindom Workforce (1955.1-1988.4)}
\description{
United Kindom workforce. Sample: 1955.1 - 1988.4. Remark: Consisting of workforce in employment and
unemployment. This time series is part of the data set used in the book Franses (1996).
}
\forma... |
r4ds_members <- readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-07-16/r4ds_members.csv")
column_names <- c('year', 'month', 'dates', 'conf_name', 'conf_link', 'city', 'country', 'fancyname')
r_events <- readr::read_csv("https://jumpingrivers.github.io/meetingsR/even... | /cache/kuprinaga|tidytuesday-r4ds|get_data.R | permissive | a-rosenberg/github-content-scraper | R | false | false | 586 | r | r4ds_members <- readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-07-16/r4ds_members.csv")
column_names <- c('year', 'month', 'dates', 'conf_name', 'conf_link', 'city', 'country', 'fancyname')
r_events <- readr::read_csv("https://jumpingrivers.github.io/meetingsR/even... |
iris$Nonsense <- rnorm(nrow(iris))
print(iris)
write.csv(iris, file = 'iris.csv')
# on another computer
iris <- read.csv('iris.csv')
| /why-serialize.r | no_license | drakulic/ad-hoc-lectures | R | false | false | 134 | r | iris$Nonsense <- rnorm(nrow(iris))
print(iris)
write.csv(iris, file = 'iris.csv')
# on another computer
iris <- read.csv('iris.csv')
|
rm(list = ls())
library(rgl)
set.seed(2018)
########################## Function to plot Decision Boundries #################################
decisionplot <- function(model, data, class = NULL, predict_type = "class",
resolution = 100, showgrid = TRUE, ...) {
if(!is.null(class)) cl... | /Perceptron.r | no_license | Allisterh/NeuralNetworks | R | false | false | 11,267 | r | rm(list = ls())
library(rgl)
set.seed(2018)
########################## Function to plot Decision Boundries #################################
decisionplot <- function(model, data, class = NULL, predict_type = "class",
resolution = 100, showgrid = TRUE, ...) {
if(!is.null(class)) cl... |
library(tidyverse)
library(tidygraph)
library(ggraph)
g <- play_geometry(100, .2, torus = FALSE)
g %>%
ggraph() +
geom_edge_link(alpha = 0.01) +
geom_node_point(color = "#f2f8ff") +
theme_void()
ggsave("img/background-network.png", dpi = 300, width = 6, height = 6) | /assets/background.R | no_license | PhilChodrow/philchodrow.github.io | R | false | false | 277 | r | library(tidyverse)
library(tidygraph)
library(ggraph)
g <- play_geometry(100, .2, torus = FALSE)
g %>%
ggraph() +
geom_edge_link(alpha = 0.01) +
geom_node_point(color = "#f2f8ff") +
theme_void()
ggsave("img/background-network.png", dpi = 300, width = 6, height = 6) |
project_hours_ui<-function(){
library(shiny)
library(DT)
shinyUI(fluidPage(
titlePanel("Applied Engineering Weekly Breakdown"),
sidebarLayout(
# sidebarPanel(
dateInput('dates','Select Week',daysofweekdisabled=c(0,6)),
# ),
mainPanel(
textOutput("weekc... | /R/project_hours_ui.R | no_license | JARS3N/LLP | R | false | false | 381 | r | project_hours_ui<-function(){
library(shiny)
library(DT)
shinyUI(fluidPage(
titlePanel("Applied Engineering Weekly Breakdown"),
sidebarLayout(
# sidebarPanel(
dateInput('dates','Select Week',daysofweekdisabled=c(0,6)),
# ),
mainPanel(
textOutput("weekc... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clustering.R
\name{k_means}
\alias{k_means}
\title{Our implementation of the k-means algorithm}
\usage{
k_means(x, centers = 5)
}
\arguments{
\item{x}{numeric matrix of data, where rows are samples}
\item{centers}{the number of groups}
}
\va... | /man/k_means.Rd | no_license | g-l-mansell/RcppRidge | R | false | true | 472 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clustering.R
\name{k_means}
\alias{k_means}
\title{Our implementation of the k-means algorithm}
\usage{
k_means(x, centers = 5)
}
\arguments{
\item{x}{numeric matrix of data, where rows are samples}
\item{centers}{the number of groups}
}
\va... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calcZScale.R
\name{calcZScale}
\alias{calcZScale}
\title{Calculate a z scale for plotting data on a map.}
\usage{
calcZScale(z, logtr = FALSE, satfac = 1.1)
}
\arguments{
\item{z}{- data vector to calculate scale from}
\item{logtr}{- flag (T... | /man/calcZScale.Rd | permissive | wStockhausen/wtsGMT | R | false | true | 571 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calcZScale.R
\name{calcZScale}
\alias{calcZScale}
\title{Calculate a z scale for plotting data on a map.}
\usage{
calcZScale(z, logtr = FALSE, satfac = 1.1)
}
\arguments{
\item{z}{- data vector to calculate scale from}
\item{logtr}{- flag (T... |
#******************************************
#
# (C) Copyright IBM Corp. 2014
#
# Author: Bradley J Eck
#
#******************************************
context("epanet.inp s3 object")
test_that("net1.inp reads correctly",
{
Net1 <- suppressWarnings( read.inp( "Net1.inp") )
expect_that( class(Net1), ... | /tests/testthat/test_epanet.inp-s3.r | no_license | Mariosmsk/epanetReader | R | false | false | 2,596 | r | #******************************************
#
# (C) Copyright IBM Corp. 2014
#
# Author: Bradley J Eck
#
#******************************************
context("epanet.inp s3 object")
test_that("net1.inp reads correctly",
{
Net1 <- suppressWarnings( read.inp( "Net1.inp") )
expect_that( class(Net1), ... |
png(filename="average_open_rate_click_20_40.png",width=1800,height=950,res=300)
new_total<-read.csv("location country code statistics open click between 0.2 0.4.csv",head=TRUE)
new_total1<-read.csv("location country code statistics open click.csv",head=TRUE)
data_1<-(new_total1$stats_avg_open_rate)
data_2<-(new_total1$... | /average open click rate between 2050.R | no_license | kop3110/Blendo_task | R | false | false | 680 | r | png(filename="average_open_rate_click_20_40.png",width=1800,height=950,res=300)
new_total<-read.csv("location country code statistics open click between 0.2 0.4.csv",head=TRUE)
new_total1<-read.csv("location country code statistics open click.csv",head=TRUE)
data_1<-(new_total1$stats_avg_open_rate)
data_2<-(new_total1$... |
direct<-"/Users/Yuezhou/Local Documents/R programs/Bioinformatics courses/Explortary data analysis/Week1 peer-graded assignment"
setwd(direct)
#read the txt file from 31/1/2007 to 3/2/2007
electric_file<-read.table("household_power_consumption.txt", skip = grep("31/1/2007", readLines("household_power_consumption.txt"))... | /Electric power consumption_Plot4.R | no_license | Yuezhou01/exploratory-data-analysis_project1 | R | false | false | 1,540 | r | direct<-"/Users/Yuezhou/Local Documents/R programs/Bioinformatics courses/Explortary data analysis/Week1 peer-graded assignment"
setwd(direct)
#read the txt file from 31/1/2007 to 3/2/2007
electric_file<-read.table("household_power_consumption.txt", skip = grep("31/1/2007", readLines("household_power_consumption.txt"))... |
library(tidyverse)
library(stringr)
library(mygene)
di <- "/f/mulinlab/huan/All_result/"
tfs <- read_tsv(file.path(di, "three_source_gene_role.txt"))
en <- tfs$Gene_symbol%>%unique()#%>%data.frame()
df.0 <- queryMany(en, scopes="symbol", fields=c("ensembl.gene"), species="human")
df.1 <- as_tibble(df.0) #%>% group_b... | /Huan_link_all_script/All_result_ICGC/drug_moa_before/All_result_ICGC/trans_role_gene_symbol_ensg1.R | no_license | Lhhuan/drug_repurposing | R | false | false | 509 | r | library(tidyverse)
library(stringr)
library(mygene)
di <- "/f/mulinlab/huan/All_result/"
tfs <- read_tsv(file.path(di, "three_source_gene_role.txt"))
en <- tfs$Gene_symbol%>%unique()#%>%data.frame()
df.0 <- queryMany(en, scopes="symbol", fields=c("ensembl.gene"), species="human")
df.1 <- as_tibble(df.0) #%>% group_b... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apply_graph_theme.R
\name{apply_graph_theme}
\alias{apply_graph_theme}
\title{Apply multiple DiagrammeR global graph attributes}
\usage{
apply_graph_theme(graph, ...)
}
\arguments{
\item{graph}{The \link[DiagrammeR:DiagrammeR]{Diagra... | /man/apply_graph_theme.Rd | no_license | cran/justifier | R | false | true | 1,821 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apply_graph_theme.R
\name{apply_graph_theme}
\alias{apply_graph_theme}
\title{Apply multiple DiagrammeR global graph attributes}
\usage{
apply_graph_theme(graph, ...)
}
\arguments{
\item{graph}{The \link[DiagrammeR:DiagrammeR]{Diagra... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_Features.R
\name{allFeaturesHelper}
\alias{allFeaturesHelper}
\title{Calculate the features in computeFeatures function}
\usage{
allFeaturesHelper(
grl,
RFP,
RNA,
tx,
fiveUTRs,
cds,
threeUTRs,
faFile,
riboStart,
ri... | /man/allFeaturesHelper.Rd | permissive | Roleren/ORFik | R | false | true | 2,679 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_Features.R
\name{allFeaturesHelper}
\alias{allFeaturesHelper}
\title{Calculate the features in computeFeatures function}
\usage{
allFeaturesHelper(
grl,
RFP,
RNA,
tx,
fiveUTRs,
cds,
threeUTRs,
faFile,
riboStart,
ri... |
#' Compare a document to another document
#'
#' Compares a document to another document to find similar sentences. The cosine
#' similarity is used to compare both documents.
#'
#' @param x File name/path of the PDF.
#' @param source File name/path of the source which should be compared to the
#' document x (source has... | /R/compare.R | no_license | bAmpT/antiplugr | R | false | false | 4,469 | r | #' Compare a document to another document
#'
#' Compares a document to another document to find similar sentences. The cosine
#' similarity is used to compare both documents.
#'
#' @param x File name/path of the PDF.
#' @param source File name/path of the source which should be compared to the
#' document x (source has... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 5036
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 5036
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query30_query10_1344n/query30_query10_1344n.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 713 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 5036
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 5036
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 7
c Performing E1-Autarky iteration.
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query04_trueque_1344n.qdimacs
c output filename /tmp/dc... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query04_trueque_1344n/query04_trueque_1344n.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 657 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 7
c Performing E1-Autarky iteration.
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query04_trueque_1344n.qdimacs
c output filename /tmp/dc... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AQUA-ELP-Methods.R
\name{set_ELP_MacroPatch}
\alias{set_ELP_MacroPatch}
\title{Aquatic Eceology ELP: Setter for \code{\link{ELP}} in \code{\link{MacroPatch}}}
\usage{
set_ELP_MacroPatch(ELP)
}
\arguments{
\item{ELP}{new object of class \code{... | /MASH-MACRO/man/set_ELP_MacroPatch.Rd | no_license | Chipdelmal/MASH-Main | R | false | true | 441 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AQUA-ELP-Methods.R
\name{set_ELP_MacroPatch}
\alias{set_ELP_MacroPatch}
\title{Aquatic Eceology ELP: Setter for \code{\link{ELP}} in \code{\link{MacroPatch}}}
\usage{
set_ELP_MacroPatch(ELP)
}
\arguments{
\item{ELP}{new object of class \code{... |
#' The following tests require push permissions for a given repository and
#' ensure that you can
#' - create a new release
#' - upload files to the release
#' - delete files from the release
#' - delete the release
skippy <- function(auth = FALSE){
skip_if_offline("api.github.com")
if(auth) skip_if(Sys.getenv("TA... | /tests/testthat/test-with_auth.R | no_license | cran/piggyback | R | false | false | 5,694 | r | #' The following tests require push permissions for a given repository and
#' ensure that you can
#' - create a new release
#' - upload files to the release
#' - delete files from the release
#' - delete the release
skippy <- function(auth = FALSE){
skip_if_offline("api.github.com")
if(auth) skip_if(Sys.getenv("TA... |
\name{GallagherInv}
\alias{GallagherInv}
\title{1 minus Gallagher index}
\description{Calculates 1 minus the Gallagher index.}
\usage{GallagherInv(Z,R)}
\arguments{
\item{Z}{Population vector}
\item{R}{Vector for the representatives}
}
\details{The representation score is calculated as: 1 - (sqrt(sum((Z-R)... | /pkg/man/GallagherInv.Rd | no_license | r-forge/polrep | R | false | false | 420 | rd | \name{GallagherInv}
\alias{GallagherInv}
\title{1 minus Gallagher index}
\description{Calculates 1 minus the Gallagher index.}
\usage{GallagherInv(Z,R)}
\arguments{
\item{Z}{Population vector}
\item{R}{Vector for the representatives}
}
\details{The representation score is calculated as: 1 - (sqrt(sum((Z-R)... |
# no warnings here (production)
#options(warn=-1)
# load libraries
library(grid)
library(ggplot2)
library(gridExtra)
library(extrafont)
library(MASS)
library(naturalsort)
library(scales)
# turn warnings back on
#options(warn=1)
# load own sources
source("config.R")
source("multiplot.R")
source("weighted_ttest.R")
... | /copy_number/R/libraries.R | permissive | alces-flight/qiaseq-dna | R | false | false | 432 | r | # no warnings here (production)
#options(warn=-1)
# load libraries
library(grid)
library(ggplot2)
library(gridExtra)
library(extrafont)
library(MASS)
library(naturalsort)
library(scales)
# turn warnings back on
#options(warn=1)
# load own sources
source("config.R")
source("multiplot.R")
source("weighted_ttest.R")
... |
### assign-1: pollutantmean function
### Author: Amie Lindaas
### Date: Nov 16, 2014
### assumption: a folder called 'specdata' exists in the working directory
### assumption: 'specdata' contains 332 csv files, in NNN.csv format
pollutantmean <- function(directory, pollutant, id = 1:332) {
## 'directory' is a chara... | /pollutantmean.R | no_license | amielindaas/Rprogramming | R | false | false | 1,119 | r | ### assign-1: pollutantmean function
### Author: Amie Lindaas
### Date: Nov 16, 2014
### assumption: a folder called 'specdata' exists in the working directory
### assumption: 'specdata' contains 332 csv files, in NNN.csv format
pollutantmean <- function(directory, pollutant, id = 1:332) {
## 'directory' is a chara... |
context("Rounding")
test_that("floor_date works for each time element",{
x <- as.POSIXct("2009-08-03 12:01:59.23", tz = "UTC")
expect_identical(floor_date(x, "second"), as.POSIXct(
"2009-08-03 12:01:59", tz = "UTC"))
expect_identical(floor_date(x, "minute"), as.POSIXct(
"2009-08-03 12:01:00", tz = "UTC"))... | /tests/testthat/test-round.R | no_license | zhao-hailei/lubridate | R | false | false | 18,888 | r | context("Rounding")
test_that("floor_date works for each time element",{
x <- as.POSIXct("2009-08-03 12:01:59.23", tz = "UTC")
expect_identical(floor_date(x, "second"), as.POSIXct(
"2009-08-03 12:01:59", tz = "UTC"))
expect_identical(floor_date(x, "minute"), as.POSIXct(
"2009-08-03 12:01:00", tz = "UTC"))... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qual_control.R
\name{scan_col}
\alias{scan_col}
\title{Easier extraction of data from data table columns using regex}
\usage{
scan_col(pattern, s, dtypes = NULL, names = NULL)
}
\description{
Easier extraction of data from data table columns ... | /man/scan_col.Rd | no_license | TransmissibleCancerGroup/dftdLowCov | R | false | true | 334 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qual_control.R
\name{scan_col}
\alias{scan_col}
\title{Easier extraction of data from data table columns using regex}
\usage{
scan_col(pattern, s, dtypes = NULL, names = NULL)
}
\description{
Easier extraction of data from data table columns ... |
# devtools::load_all('~/code/readtext/')
# options(error=traceback)
context("test filename extension case")
test_that("test case for txt files with glob", {
expect_equal(
length(as.character(readtext( '../data/TXTcaps/*.TXT'))),
2
)
# Expect no warning
expect_warning( readtext( '../da... | /tests/testthat/test-readtext-uppercaseextensions.R | no_license | quanteda/readtext | R | false | false | 624 | r | # devtools::load_all('~/code/readtext/')
# options(error=traceback)
context("test filename extension case")
test_that("test case for txt files with glob", {
expect_equal(
length(as.character(readtext( '../data/TXTcaps/*.TXT'))),
2
)
# Expect no warning
expect_warning( readtext( '../da... |
#Loading required packages
#install.packages('tidyverse')
library(tidyverse)
#install.packages('ggplot2')
library(ggplot2)
#install.packages('caret')
library(caret)
#install.packages('caretEnsemble')
library(caretEnsemble)
#install.packages('psych')
library(psych)
#install.packages('Amelia')
library(Amelia)
#install.pa... | /naivebayes.R | no_license | ADHIKSHA/R_scripts | R | false | false | 2,275 | r | #Loading required packages
#install.packages('tidyverse')
library(tidyverse)
#install.packages('ggplot2')
library(ggplot2)
#install.packages('caret')
library(caret)
#install.packages('caretEnsemble')
library(caretEnsemble)
#install.packages('psych')
library(psych)
#install.packages('Amelia')
library(Amelia)
#install.pa... |
## ----variance---------------------------------------------------------------------------------------------------------------
###Identify parameters with different intra-individual variance in sick than in healthy (changing_with_without)
##Use only main covid-ip cohort vs controls
#Higher variance in sick: parameters ... | /scripts/test_variance.R | no_license | misita-falcon/covidip_analysis | R | false | false | 3,386 | r | ## ----variance---------------------------------------------------------------------------------------------------------------
###Identify parameters with different intra-individual variance in sick than in healthy (changing_with_without)
##Use only main covid-ip cohort vs controls
#Higher variance in sick: parameters ... |
#!/usr/bin/env Rscript
library(rmarkdown)
library(knitr)
library(purrr)
# Root HTML Output dir
html_root_output <- normalizePath("output")
# All output will be written a subdir with the smrtlink host name as the directory name
generate_output <- function(smrtlink_system) {
rmd_ds <- "notebooks/SmrtLinkDataSetSumma... | /bin/generate_html.R | permissive | mpkocher/smrtlink-system-stats | R | false | false | 1,387 | r | #!/usr/bin/env Rscript
library(rmarkdown)
library(knitr)
library(purrr)
# Root HTML Output dir
html_root_output <- normalizePath("output")
# All output will be written a subdir with the smrtlink host name as the directory name
generate_output <- function(smrtlink_system) {
rmd_ds <- "notebooks/SmrtLinkDataSetSumma... |
library(readr)
library(dplyr)
library(stringr)
format_survey_schema <- function(x) {
#'
#' Formats the survey schema file for the 2018 Kaggle ML & DS Survey
#' Challenge into a tidy, analysis-friendly format.
#'
#' @param x Character. Path to Kaggle survey schema file.
#... | /R/import_schema.R | no_license | datawranglerai/kaggle-ML_DS_survey_2018 | R | false | false | 2,921 | r | library(readr)
library(dplyr)
library(stringr)
format_survey_schema <- function(x) {
#'
#' Formats the survey schema file for the 2018 Kaggle ML & DS Survey
#' Challenge into a tidy, analysis-friendly format.
#'
#' @param x Character. Path to Kaggle survey schema file.
#... |
#' Show a resource.
#'
#' @export
#'
#' @param id (character) Resource identifier.
#' @template args
#' @examples \dontrun{
#' resource_show(id = "e179e910-27fb-44f4-a627-99822af49ffa", as = "table")
#' resource_show(id = "05ff2255-c38a-40c9-b657-4ccb55ab2feb",
#' url = "http://data.nhm.ac.uk")
#' }
resou... | /R/resource_show.R | permissive | nujcharee/ckanr | R | false | false | 520 | r | #' Show a resource.
#'
#' @export
#'
#' @param id (character) Resource identifier.
#' @template args
#' @examples \dontrun{
#' resource_show(id = "e179e910-27fb-44f4-a627-99822af49ffa", as = "table")
#' resource_show(id = "05ff2255-c38a-40c9-b657-4ccb55ab2feb",
#' url = "http://data.nhm.ac.uk")
#' }
resou... |
lm.nri <- function(formula, preddata=NULL, ...)
{
lm_apply_lh <- function(response, ...)
{
formula <- get("formula", envir= environment_apply)
predictors <- get("predictors", envir= environment_apply)
data <- cbind(data.frame(response=response), predictors)
model <- lm(formula = formula, data = data... | /R/nri_lm.R | no_license | arturochian/hsdar | R | false | false | 5,152 | r | lm.nri <- function(formula, preddata=NULL, ...)
{
lm_apply_lh <- function(response, ...)
{
formula <- get("formula", envir= environment_apply)
predictors <- get("predictors", envir= environment_apply)
data <- cbind(data.frame(response=response), predictors)
model <- lm(formula = formula, data = data... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/knitrSetup.r
\name{knitrSetup}
\alias{knitrSetup}
\title{Set knitr up the way I like it}
\usage{
knitrSetup(flavor = "tex", rootDir = getwd(), use.tikz = FALSE,
cache.use.time = FALSE, fig.folder = "graphics", fig.prefix = "fig_",
cache.f... | /man/knitrSetup.Rd | no_license | imouzon/usefulR | R | false | true | 1,131 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/knitrSetup.r
\name{knitrSetup}
\alias{knitrSetup}
\title{Set knitr up the way I like it}
\usage{
knitrSetup(flavor = "tex", rootDir = getwd(), use.tikz = FALSE,
cache.use.time = FALSE, fig.folder = "graphics", fig.prefix = "fig_",
cache.f... |
################################################################
# Bootstrap CI Helper Functions.
# Computes bootstrap confidence intervals with the sensible defaults.
# 2014 Pierre Dragicevic
################################################################
# For more details
# See http://www.mayin.org/ajayshah... | /bootstrap_macros.R | no_license | ekaydeecee/HCI-stats | R | false | false | 5,666 | r | ################################################################
# Bootstrap CI Helper Functions.
# Computes bootstrap confidence intervals with the sensible defaults.
# 2014 Pierre Dragicevic
################################################################
# For more details
# See http://www.mayin.org/ajayshah... |
#' weighted mean
#'
#' \code{wtd_mean} returns the weighted mean of a variable. It's a tidy-compatible
#' wrapper around stats::weighted.mean().
#'
#' @param df The data source
#' @param variable the variable, it should be numeric
#' @param weight The weighting variable
#'
#' @return a numeric value
#' @export
#' @impo... | /R/SummaryStatistics.R | no_license | jdjohn215/pollster | R | false | false | 3,058 | r | #' weighted mean
#'
#' \code{wtd_mean} returns the weighted mean of a variable. It's a tidy-compatible
#' wrapper around stats::weighted.mean().
#'
#' @param df The data source
#' @param variable the variable, it should be numeric
#' @param weight The weighting variable
#'
#' @return a numeric value
#' @export
#' @impo... |
getwd()
setwd('C:\\Users\\Skyler Richmond\\Desktop\\Evolution\\Tasks\\Task_08')
library('phytools')
tree <-read.tree('https://jonsmithcell.com/data/anoliis.tre')
plot(tree, type="fan")
tree$tip.label
Question 1: There are 82 tips on the tree and branch lengths are present.
data <- read.csv("https://jonsmitchell.com/da... | /Task_08/task08.r | no_license | skylerrichmond/Tasks | R | false | false | 2,407 | r | getwd()
setwd('C:\\Users\\Skyler Richmond\\Desktop\\Evolution\\Tasks\\Task_08')
library('phytools')
tree <-read.tree('https://jonsmithcell.com/data/anoliis.tre')
plot(tree, type="fan")
tree$tip.label
Question 1: There are 82 tips on the tree and branch lengths are present.
data <- read.csv("https://jonsmitchell.com/da... |
`plotTimeCourse` <- function (x
,tc.identifier=c("sample","stimulation","inhibition","stim_concentration")
,tc.reference=NULL
,plot.split="experiment",file=NULL
,arrays2rm=c("protein","Blank"),plotformat="stderr"
,log=TRUE,
color=NULL, xlim=NULL, ylim=NULL) {
## select the measurements in t... | /R/plotTimeCourse.R | no_license | cran/RPPanalyzer | R | false | false | 10,729 | r | `plotTimeCourse` <- function (x
,tc.identifier=c("sample","stimulation","inhibition","stim_concentration")
,tc.reference=NULL
,plot.split="experiment",file=NULL
,arrays2rm=c("protein","Blank"),plotformat="stderr"
,log=TRUE,
color=NULL, xlim=NULL, ylim=NULL) {
## select the measurements in t... |
library(locfit)
### Name: lscv
### Title: Least Squares Cross Validation Statistic.
### Aliases: lscv
### Keywords: htest
### ** Examples
# approximate calculation for a kernel density estimate
data(geyser, package="locfit")
lscv(~lp(geyser,h=1,deg=0), ev=lfgrid(100,ll=1,ur=6), kern="gauss")
# same computation, exa... | /data/genthat_extracted_code/locfit/examples/lscv.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 358 | r | library(locfit)
### Name: lscv
### Title: Least Squares Cross Validation Statistic.
### Aliases: lscv
### Keywords: htest
### ** Examples
# approximate calculation for a kernel density estimate
data(geyser, package="locfit")
lscv(~lp(geyser,h=1,deg=0), ev=lfgrid(100,ll=1,ur=6), kern="gauss")
# same computation, exa... |
# 1. Create remaining necessary objects
geodfcomprwg$id.total <- 1:nrow(geodfcomprwg)
country_id_start<-
geodfcomprwg %>%
group_by(country) %>%
summarise(id_start=first(id.total))
countrylevels <- sort(country_id_start$country)[order(country_id_start$id_start)]
rm(country_id_start)
source("Code/8a... | /Code/8_Preparation_For_App.R | no_license | tmckendrick1/Longwayup | R | false | false | 814 | r | # 1. Create remaining necessary objects
geodfcomprwg$id.total <- 1:nrow(geodfcomprwg)
country_id_start<-
geodfcomprwg %>%
group_by(country) %>%
summarise(id_start=first(id.total))
countrylevels <- sort(country_id_start$country)[order(country_id_start$id_start)]
rm(country_id_start)
source("Code/8a... |
shinyUI(fluidPage(
# Formato para las pestañas del menú superior -----------------
navbarPage("Localización de Centros de Refugio del Estado de Nayarit", id="main",
tags$style(HTML("
.tabbable > .nav > li > a {background-color: lightblue; color:black}
... | /proyectos/RespuestaDesastre/equipo_JMM/shiny/ui.R | no_license | mhnk77/Estadistica-Computacional-fall2021 | R | false | false | 3,606 | r | shinyUI(fluidPage(
# Formato para las pestañas del menú superior -----------------
navbarPage("Localización de Centros de Refugio del Estado de Nayarit", id="main",
tags$style(HTML("
.tabbable > .nav > li > a {background-color: lightblue; color:black}
... |
## There are significant problems with this course on R. The instruction is scant and vague, as is the associated
## "book" on R programming. The material is scattered and incoherent, as if the instructor assembled it while high
## or stoned, and it is clear that little or no effort has been made to address issues of c... | /cachematrix.R | no_license | ekenwere/ProgrammingAssignment2 | R | false | false | 3,376 | r | ## There are significant problems with this course on R. The instruction is scant and vague, as is the associated
## "book" on R programming. The material is scattered and incoherent, as if the instructor assembled it while high
## or stoned, and it is clear that little or no effort has been made to address issues of c... |
# R Code to run Linear Regression demo
# ***********************************************
# Function for viewing linear regression examples
# ***********************************************
local(envir=.PBSmodEnv,expr={
locale = sys.frame(sys.nframe() - 1) # local environment
pairsLR <- function() {
# ----... | /PBSmodelling/inst/examples/LinReg.r | no_license | pbs-software/pbs-modelling | R | false | false | 9,936 | r | # R Code to run Linear Regression demo
# ***********************************************
# Function for viewing linear regression examples
# ***********************************************
local(envir=.PBSmodEnv,expr={
locale = sys.frame(sys.nframe() - 1) # local environment
pairsLR <- function() {
# ----... |
library(ape)
testtree <- read.tree("9456_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="9456_0_unrooted.txt") | /codeml_files/newick_trees_processed/9456_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("9456_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="9456_0_unrooted.txt") |
library(dplyr)
library(reshape2)
library(igraph)
library(rgexf)
library(scales)
options(stringsAsFactors = FALSE, scipen = 999)
### Load Combo Matrix
Matrix <- read.csv("Matrices/NewCombo.csv", header = T, sep = ",", check.names = F, row.names = 1)
NAICS <- read.csv("NAICS/NAICS.csv", header = T, sep = ",", check.nam... | /Vibrant Networks/Network.R | no_license | jevongibb/Code | R | false | false | 4,729 | r | library(dplyr)
library(reshape2)
library(igraph)
library(rgexf)
library(scales)
options(stringsAsFactors = FALSE, scipen = 999)
### Load Combo Matrix
Matrix <- read.csv("Matrices/NewCombo.csv", header = T, sep = ",", check.names = F, row.names = 1)
NAICS <- read.csv("NAICS/NAICS.csv", header = T, sep = ",", check.nam... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CreateCovPlot.R
\name{CreateCovPlot}
\alias{CreateCovPlot}
\title{Create the covariance surface plot based on the results from FPCA() or FPCder().}
\usage{
CreateCovPlot(fpcaObj, covPlotType = "Fitted", isInteractive = FALSE,
colSpectrum = ... | /man/CreateCovPlot.Rd | no_license | mathchin/fdapace | R | false | true | 1,265 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CreateCovPlot.R
\name{CreateCovPlot}
\alias{CreateCovPlot}
\title{Create the covariance surface plot based on the results from FPCA() or FPCder().}
\usage{
CreateCovPlot(fpcaObj, covPlotType = "Fitted", isInteractive = FALSE,
colSpectrum = ... |
library(ggplot2)
library(dplyr)
mpg <- data.frame(ggplot2::mpg)
mpg_n <- mpg
mpg_n <-mpg_n %>%
mutate(mpg_d = cty + hwy)
mpg_n <-mpg_n %>%
mutate(mpg_h = mpg_d/2)
mpg_n
mpg_n %>%
arrange(mpg_d) %>%
head(3)
mpg %>%
mutate(mpg_d = cty + hwy,
mpg_h = mpg_d /2) %>%
arrange(m... | /alone_144.R | no_license | dlsanf2000/aboutR | R | false | false | 355 | r | library(ggplot2)
library(dplyr)
mpg <- data.frame(ggplot2::mpg)
mpg_n <- mpg
mpg_n <-mpg_n %>%
mutate(mpg_d = cty + hwy)
mpg_n <-mpg_n %>%
mutate(mpg_h = mpg_d/2)
mpg_n
mpg_n %>%
arrange(mpg_d) %>%
head(3)
mpg %>%
mutate(mpg_d = cty + hwy,
mpg_h = mpg_d /2) %>%
arrange(m... |
#shiny::runApp(barval::ui_app(),barval::server_app(),launch.browser=TRUE)
shiny::runApp(barval::app(),launch.browser = T)
| /inst/scripts/sensor_validation_coefficients.R | no_license | JARS3N/seascripts | R | false | false | 128 | r | #shiny::runApp(barval::ui_app(),barval::server_app(),launch.browser=TRUE)
shiny::runApp(barval::app(),launch.browser = T)
|
## Script created by Liz Bowman January 6, 2020
## for analyzing community data in Sky Island study
## Includes ectomycorrhizal data and endophyte data
## For answering 'To what extent are EM and FE dispersal limited?
# Part A focuses at Distance decay
# 1. within isolated montane forests (mogollon rim removed)
# 2. b... | /scripts/DistanceDecay_PartialMantel.R | no_license | eabowman/Bowman-Arnold_DistanceDecaySymbioticFungi | R | false | false | 42,143 | r | ## Script created by Liz Bowman January 6, 2020
## for analyzing community data in Sky Island study
## Includes ectomycorrhizal data and endophyte data
## For answering 'To what extent are EM and FE dispersal limited?
# Part A focuses at Distance decay
# 1. within isolated montane forests (mogollon rim removed)
# 2. b... |
report_gallery_image <-
function(id,
...){
out <- imgurPOST(paste0('gallery/image/', id, '/report'), ...)
structure(out, class = 'imgur_vote')
}
| /imguR/R/report_gallery_image.r | no_license | ingted/R-Examples | R | false | false | 168 | r | report_gallery_image <-
function(id,
...){
out <- imgurPOST(paste0('gallery/image/', id, '/report'), ...)
structure(out, class = 'imgur_vote')
}
|
library(ape)
testtree <- read.tree("1843_22.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="1843_22_unrooted.txt") | /codeml_files/newick_trees_processed/1843_22/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("1843_22.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="1843_22_unrooted.txt") |
library(Bolstad2)
### Name: credIntSamp
### Title: Calculate a credible interval from a numerically specified
### posterior CDF
### Aliases: credIntSamp
### ** Examples
## posterior is N(0,1)
theta <- rnorm(1000)
ci<-credIntSamp(theta)
plot(density(theta))
abline(v=c(unlist(ci)))
| /data/genthat_extracted_code/Bolstad2/examples/credIntSamp.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 290 | r | library(Bolstad2)
### Name: credIntSamp
### Title: Calculate a credible interval from a numerically specified
### posterior CDF
### Aliases: credIntSamp
### ** Examples
## posterior is N(0,1)
theta <- rnorm(1000)
ci<-credIntSamp(theta)
plot(density(theta))
abline(v=c(unlist(ci)))
|
## KS Test
library(dplyr)
require(graphics)
setwd("~/Documents/fraud/project 2")
########### Read and Split the Data ####################
total=read.csv('new_vars.csv')
selected_variables = read.csv("selected_vars_45.csv")
data1 = total %>%
select(as.character(selected_variables$x))
total = data.frame(fraud=total$fr... | /KS-Test for Feature Selection.R | no_license | JoannaOYZL/Identity_Fraud_Detection | R | false | false | 2,586 | r | ## KS Test
library(dplyr)
require(graphics)
setwd("~/Documents/fraud/project 2")
########### Read and Split the Data ####################
total=read.csv('new_vars.csv')
selected_variables = read.csv("selected_vars_45.csv")
data1 = total %>%
select(as.character(selected_variables$x))
total = data.frame(fraud=total$fr... |
# source('src/webb/sleeper/domain_helpers.R')
#retrieval kernels ####
#discharge: STATUS=READY
#. handle_errors
process_0_VERSIONLESS001 <- function(set_details, network, domain) {
raw_data_dest <- glue('data/{n}/{d}/raw/{p}/{s}',
n = network,
d = domain,
... | /src/webb/panola/processing_kernels.R | permissive | MacroSHEDS/data_processing | R | false | false | 2,776 | r | # source('src/webb/sleeper/domain_helpers.R')
#retrieval kernels ####
#discharge: STATUS=READY
#. handle_errors
process_0_VERSIONLESS001 <- function(set_details, network, domain) {
raw_data_dest <- glue('data/{n}/{d}/raw/{p}/{s}',
n = network,
d = domain,
... |
#' Vectorised Row Mins
#' @param x A Matrix
#' @param na.rm If you want to remove NAs TRUE/FALSE
#' @return rowwsie mins
#' @export
#' @examples
#' set.seed(123)
#' M <- matrix(sample(c(NA, 1:20), 20, replace = TRUE), ncol = 5L)
#' RowMins(M, na.rm = TRUE)
RowMins <- function(x, na.rm = FALSE) {
do.call(pmin.int, ... | /R/RowMins.R | no_license | DavidArenburg/VecStats | R | false | false | 359 | r | #' Vectorised Row Mins
#' @param x A Matrix
#' @param na.rm If you want to remove NAs TRUE/FALSE
#' @return rowwsie mins
#' @export
#' @examples
#' set.seed(123)
#' M <- matrix(sample(c(NA, 1:20), 20, replace = TRUE), ncol = 5L)
#' RowMins(M, na.rm = TRUE)
RowMins <- function(x, na.rm = FALSE) {
do.call(pmin.int, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fn_dispersal.R
\name{sdd_update_probs}
\alias{sdd_update_probs}
\title{Update short distance dispersal probabilities}
\usage{
sdd_update_probs(lc.df, g.p, sdd.alter, sdd.0, lc.col = 4:9)
}
\arguments{
\item{lc.df}{Dataframe or tibble with xy ... | /man/sdd_update_probs.Rd | permissive | Sz-Tim/gbPopMod | R | false | true | 1,756 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fn_dispersal.R
\name{sdd_update_probs}
\alias{sdd_update_probs}
\title{Update short distance dispersal probabilities}
\usage{
sdd_update_probs(lc.df, g.p, sdd.alter, sdd.0, lc.col = 4:9)
}
\arguments{
\item{lc.df}{Dataframe or tibble with xy ... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 368
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 368
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/que... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query15_query27_1344n/query15_query27_1344n.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 703 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 368
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 368
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/que... |
############################################
## SCRIPT : ANNUAL EGG PRODUCTION FOR NEA MACKEREL. GRIDDING WESTERN AREA
## version August 2019
##
## Gersom Costas
## gersom.costas@ieo.es
#
############################################
#
##DESCRIPTION
#
# The mackerel and western horse mackerel egg surveys (WGMEGG) cov... | /R/gridding_MAC_Western.R | no_license | GersomCostas/Mack_western-component-grid | R | false | false | 7,027 | r | ############################################
## SCRIPT : ANNUAL EGG PRODUCTION FOR NEA MACKEREL. GRIDDING WESTERN AREA
## version August 2019
##
## Gersom Costas
## gersom.costas@ieo.es
#
############################################
#
##DESCRIPTION
#
# The mackerel and western horse mackerel egg surveys (WGMEGG) cov... |
powerConsumption <- read.csv("DataSet.txt",sep = ";")
png(file='plot3.png')
with(subset(powerConsumption, Voltage>=249), plot(Voltage, Global_active_power))
with(subset(powerConsumption, Voltage>=249 && Voltage<250), points(Voltage, Global_active_power), col = "black")
with(subset(powerConsumption, Voltage>=250... | /LabExercises_3/plot3.R | no_license | dhaval-techgeek/datascienceunitec | R | false | false | 554 | r | powerConsumption <- read.csv("DataSet.txt",sep = ";")
png(file='plot3.png')
with(subset(powerConsumption, Voltage>=249), plot(Voltage, Global_active_power))
with(subset(powerConsumption, Voltage>=249 && Voltage<250), points(Voltage, Global_active_power), col = "black")
with(subset(powerConsumption, Voltage>=250... |
mockSession <- function(namespace = NULL) {
e <- new.env()
e$input <- list()
e$msgs <- list()
e$sendCustomMessage <- function(type, message) {
msg <- list(type = type, message = message)
e$msgs[[length(e$msgs) + 1]] <- msg
e$lastMsg <- msg
msg
}
e$ns <- function(id) {
shiny::NS(namespace... | /tests/testthat/test-shiny.R | permissive | cran/reactable | R | false | false | 6,678 | r | mockSession <- function(namespace = NULL) {
e <- new.env()
e$input <- list()
e$msgs <- list()
e$sendCustomMessage <- function(type, message) {
msg <- list(type = type, message = message)
e$msgs[[length(e$msgs) + 1]] <- msg
e$lastMsg <- msg
msg
}
e$ns <- function(id) {
shiny::NS(namespace... |
text_parsed_protagonist_labeled <- text_parsed %>% mutate_cond((doc_id %in% test3[,1] & sentence_id %in% test3[,2] & token_id %in% test3[,3]), token = replace(token, token == "I", "PROTAGONIST"))
# Attempt to rename all characters to one name each::
text_parsed_charaters_normalised <- text_parsed_protagonist_labeled
... | /tidying_process.R | no_license | kerianVaraine/DH_textAnalysis | R | false | false | 2,116 | r | text_parsed_protagonist_labeled <- text_parsed %>% mutate_cond((doc_id %in% test3[,1] & sentence_id %in% test3[,2] & token_id %in% test3[,3]), token = replace(token, token == "I", "PROTAGONIST"))
# Attempt to rename all characters to one name each::
text_parsed_charaters_normalised <- text_parsed_protagonist_labeled
... |
# Exercise 4: Creating and operating on vectors
# Create a vector `names` that contains your name and the names of 2 people next to you.
names <- c("Kyle", "Roger")
# Use the colon operator : to create a vector `n` of numbers from 10:49
n <- 10:49
# Use `length()` to get the number of elements in `n`
num.elements <-... | /exercise-4/exercise.R | permissive | kp1997/module7-vectors | R | false | false | 1,054 | r | # Exercise 4: Creating and operating on vectors
# Create a vector `names` that contains your name and the names of 2 people next to you.
names <- c("Kyle", "Roger")
# Use the colon operator : to create a vector `n` of numbers from 10:49
n <- 10:49
# Use `length()` to get the number of elements in `n`
num.elements <-... |
#' @title update each effect once
#' @param R a p by p symmetric and positive semidefinite correlation matrix.
#' @param z a p vector
#' @param s_init a list with elements sigma2, V, alpha, mu, Xr
#' @param Sigma sigma2*R + lambda I
#' @param estimate_prior_variance boolean indicating whether to estimate prior variance... | /R/update_each_effect_rss.R | permissive | KangchengHou/susieR | R | false | false | 1,315 | r | #' @title update each effect once
#' @param R a p by p symmetric and positive semidefinite correlation matrix.
#' @param z a p vector
#' @param s_init a list with elements sigma2, V, alpha, mu, Xr
#' @param Sigma sigma2*R + lambda I
#' @param estimate_prior_variance boolean indicating whether to estimate prior variance... |
fluidRow(
box(
title = tagList(
icon("table"),
i18n$t("各都道府県の状況")
),
width = 12,
sidebar = boxSidebar(
id = "tableOfEachPrefecturesBoxSidebar",
width = 25,
materialSwitch(
inputId = "tableGrouping",
label = tagList(icon("object-group"), i18n$t("グルーピング表示"... | /03_Components/TableOfEachPrefectures/TableOfEachPrefectures.ui.R | permissive | swsoyee/2019-ncov-japan | R | false | false | 489 | r | fluidRow(
box(
title = tagList(
icon("table"),
i18n$t("各都道府県の状況")
),
width = 12,
sidebar = boxSidebar(
id = "tableOfEachPrefecturesBoxSidebar",
width = 25,
materialSwitch(
inputId = "tableGrouping",
label = tagList(icon("object-group"), i18n$t("グルーピング表示"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.