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 |
|---|---|---|---|---|---|---|---|---|---|
readJDX <- function (file = "", debug = FALSE){
# ChemoSpec, Bryan Hanson, November 2012
# This function works with the JCAMP-DX format
# The data block must be of the type XYDATA=(X++(Y..Y))
# Handles AFFN format for the data block and only with '+', '-' or ' ' as the separator
# Not extensively tested
# We need se... | /ChemoSpec/R/readJDX.R | no_license | ingted/R-Examples | R | false | false | 4,607 | r | readJDX <- function (file = "", debug = FALSE){
# ChemoSpec, Bryan Hanson, November 2012
# This function works with the JCAMP-DX format
# The data block must be of the type XYDATA=(X++(Y..Y))
# Handles AFFN format for the data block and only with '+', '-' or ' ' as the separator
# Not extensively tested
# We need se... |
#' get_mz_by_monoisotopicmass
#'
#' Generate list of expected m/z for a specific monoisotopic mass
#'
#'
#' @param monoisotopicmass Monoisotopic mass. e.g.: 149.051
#' @param dbid Database or user-defined ID. e.g.: "M001"
#' @param name Metabolite name. e.g.: "Methionine"
#' @param formula Chemical formula. e.g.: "C... | /R/get_mz_by_monoisotopicmass.R | no_license | stolltho/xMSannotator | R | false | false | 5,011 | r | #' get_mz_by_monoisotopicmass
#'
#' Generate list of expected m/z for a specific monoisotopic mass
#'
#'
#' @param monoisotopicmass Monoisotopic mass. e.g.: 149.051
#' @param dbid Database or user-defined ID. e.g.: "M001"
#' @param name Metabolite name. e.g.: "Methionine"
#' @param formula Chemical formula. e.g.: "C... |
#Kati Puukko
#Creating data for analysis 6
#3.12.2020
##Download packages
library(dplyr)
library(tidyr)
## 1. Load the data sets(BPRS and RATS) into R
BPRS <- read.table("https://raw.githubusercontent.com/KimmoVehkalahti/MABS/master/Examples/data/BPRS.txt", sep=" ", header=T)
RATS <- read.table("https://raw.githubus... | /data/meet_and_repeat.R | no_license | kpuukko/IODS-project | R | false | false | 2,224 | r | #Kati Puukko
#Creating data for analysis 6
#3.12.2020
##Download packages
library(dplyr)
library(tidyr)
## 1. Load the data sets(BPRS and RATS) into R
BPRS <- read.table("https://raw.githubusercontent.com/KimmoVehkalahti/MABS/master/Examples/data/BPRS.txt", sep=" ", header=T)
RATS <- read.table("https://raw.githubus... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/orfRelativePos.R
\name{orfRelativePos}
\alias{orfRelativePos}
\title{Relative position of the start and stop codon along the transcript}
\usage{
orfRelativePos(cdsTransc, exonGRanges)
}
\arguments{
\item{cdsTransc}{a GRangesList.
It contains ... | /man/orfRelativePos.Rd | no_license | alenzhao/RiboProfiling | R | false | true | 1,119 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/orfRelativePos.R
\name{orfRelativePos}
\alias{orfRelativePos}
\title{Relative position of the start and stop codon along the transcript}
\usage{
orfRelativePos(cdsTransc, exonGRanges)
}
\arguments{
\item{cdsTransc}{a GRangesList.
It contains ... |
#! /usr/bin/env Rscript
args <- commandArgs(TRUE)
z <- read.csv(args[1], header=FALSE)
summary(z)
i = 2
count = 0
acc <- z[,2]
while(i < length(acc)){
delta = acc[i] - acc[i-1]
if(delta >=1.5){
count = count + 1
i = i + 2
bump <- list(time=z[,1][i], weight=delta, lat=z[,3][i], lon=z[,4][i])
write.... | /web/data/zprocess.R | no_license | angineering/TranSeNS | R | false | false | 441 | r | #! /usr/bin/env Rscript
args <- commandArgs(TRUE)
z <- read.csv(args[1], header=FALSE)
summary(z)
i = 2
count = 0
acc <- z[,2]
while(i < length(acc)){
delta = acc[i] - acc[i-1]
if(delta >=1.5){
count = count + 1
i = i + 2
bump <- list(time=z[,1][i], weight=delta, lat=z[,3][i], lon=z[,4][i])
write.... |
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615836498-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 2,048 | r | testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... |
#' describe missing
#'
#' get some simple stats on missingness for a set of variables
#' @param data the data.frame or similar
#' @param v if \code{NULL} all variables are included, else a character vector of the
#' names of wanted variables or a formula (if data is null it will look for
#' the variables in the... | /R/dtable-missing.R | no_license | renlund/descripteur | R | false | false | 3,057 | r | #' describe missing
#'
#' get some simple stats on missingness for a set of variables
#' @param data the data.frame or similar
#' @param v if \code{NULL} all variables are included, else a character vector of the
#' names of wanted variables or a formula (if data is null it will look for
#' the variables in the... |
##Downloading and Unzipping dataset after check if it already exists in working directory
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
filename <- "eda_project1files.zip"
if(!file.exists(filename)){
download.file(url, filename, method = "curl")
}
if(!file.... | /plot3.R | no_license | sethltaylor/ExData_Plotting1 | R | false | false | 1,310 | r | ##Downloading and Unzipping dataset after check if it already exists in working directory
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
filename <- "eda_project1files.zip"
if(!file.exists(filename)){
download.file(url, filename, method = "curl")
}
if(!file.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/logger_Ori_MLog.R
\name{readLogger_Ori_BasicEx1}
\alias{readLogger_Ori_BasicEx1}
\title{Read Logger File from Ori BasicEx1}
\usage{
readLogger_Ori_BasicEx1(
filepath,
infotype = validInfoTypes(),
blockbegin = "ORI BasicEx1",
warn = TR... | /man/readLogger_Ori_BasicEx1.Rd | permissive | KWB-R/kwb.logger | R | false | true | 1,712 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/logger_Ori_MLog.R
\name{readLogger_Ori_BasicEx1}
\alias{readLogger_Ori_BasicEx1}
\title{Read Logger File from Ori BasicEx1}
\usage{
readLogger_Ori_BasicEx1(
filepath,
infotype = validInfoTypes(),
blockbegin = "ORI BasicEx1",
warn = TR... |
jMat <- outer(as.character(1:8), as.character(1:13), function(x, y) {
paste0("x", x,",", y)
})
jMat | /R/mekametwik_widaindek.R | no_license | d8aninja/code | R | false | false | 104 | r | jMat <- outer(as.character(1:8), as.character(1:13), function(x, y) {
paste0("x", x,",", y)
})
jMat |
## Put comments here that give an overall description of what your
## functions do
## A matrix object that stores its value and is able to cache it's inverse
makeCacheMatrix <- function(mat = matrix()) {
i <- NULL
# A function that sets a new matrix object and resets the cache
set <- function(y) {
... | /cachematrix.R | no_license | matthewphillips/ProgrammingAssignment2 | R | false | false | 1,123 | r | ## Put comments here that give an overall description of what your
## functions do
## A matrix object that stores its value and is able to cache it's inverse
makeCacheMatrix <- function(mat = matrix()) {
i <- NULL
# A function that sets a new matrix object and resets the cache
set <- function(y) {
... |
# Processing of near_analysis table
#
# Input: reburns_x2_near_analysis_all_dissolved.csv
# firePerimeters_1940_2016_gt1000ac_notPrescribed_table.csv
# Output:
# 1 Dec 2017 JJWalker
#
library(dplyr)
# fires
fires <- read.csv("data/x_original.csv", header = T)
# input
x <- read.csv("data/reburns_x2_near_... | /R/distance_of_burn_intrusion.R | no_license | jesswalker/ak_fire | R | false | false | 2,990 | r | # Processing of near_analysis table
#
# Input: reburns_x2_near_analysis_all_dissolved.csv
# firePerimeters_1940_2016_gt1000ac_notPrescribed_table.csv
# Output:
# 1 Dec 2017 JJWalker
#
library(dplyr)
# fires
fires <- read.csv("data/x_original.csv", header = T)
# input
x <- read.csv("data/reburns_x2_near_... |
install.packages("DTRreg")
library(DTRreg)
source("choose_alpha.R")
expit <- function(x) exp(x)/(1+exp(x))
set.seed(543) # each scenario used a different seed. See README file.
# gamma parameters following Chakraborty et al (2013) to control for irregularity in the generated data
g <- matrix(NA, nrow = 9, ncol = 7)
g... | /Simulations/R code/mnad_scenarioi_2.R | no_license | gabriellesimoneau/Rcode-Biostatistics | R | false | false | 4,033 | r | install.packages("DTRreg")
library(DTRreg)
source("choose_alpha.R")
expit <- function(x) exp(x)/(1+exp(x))
set.seed(543) # each scenario used a different seed. See README file.
# gamma parameters following Chakraborty et al (2013) to control for irregularity in the generated data
g <- matrix(NA, nrow = 9, ncol = 7)
g... |
best <- function(state, outcome) {
## Read outcome data"
outfile <- read.csv("outcome-of-care-measures.csv",
colClasses = "character")
## Check that state and outcome are valid
# checking if valid outcome
out <- c("heart attack","heart failure... | /assignments/assign3/rprog_data_ProgAssignment3-data/best.R | no_license | rshrinivasan/rprog | R | false | false | 1,690 | r | best <- function(state, outcome) {
## Read outcome data"
outfile <- read.csv("outcome-of-care-measures.csv",
colClasses = "character")
## Check that state and outcome are valid
# checking if valid outcome
out <- c("heart attack","heart failure... |
##download file
## download.file("https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip", "GCD_project_data.zip", mode = "wb")
## unzip the data
unzip("GCD_project_data.zip", overwrite = T)
## read test data
x_test <- read.delim("./UCI HAR Dataset/test/X_test.txt", sep="" , header=F)... | /run_analysis.R | no_license | ruaram/GCD-Project | R | false | false | 3,249 | r | ##download file
## download.file("https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip", "GCD_project_data.zip", mode = "wb")
## unzip the data
unzip("GCD_project_data.zip", overwrite = T)
## read test data
x_test <- read.delim("./UCI HAR Dataset/test/X_test.txt", sep="" , header=F)... |
library(shiny)
library(googleVis)
library(dplyr)
# read in data
mortality <- read.csv('https://raw.githubusercontent.com/maxwagner/608/master/lecture3/q1/cleaned-cdc-mortality-1999-2010.csv')
# rem some columns, rename remaining
mortality <- mortality[, c(3,5,7,11)]
colnames(mortality) <- c("Chapter", "State", "Year... | /lecture3/q1/server.R | no_license | maxwagner/608 | R | false | false | 1,132 | r | library(shiny)
library(googleVis)
library(dplyr)
# read in data
mortality <- read.csv('https://raw.githubusercontent.com/maxwagner/608/master/lecture3/q1/cleaned-cdc-mortality-1999-2010.csv')
# rem some columns, rename remaining
mortality <- mortality[, c(3,5,7,11)]
colnames(mortality) <- c("Chapter", "State", "Year... |
#' Send an email message through the Mailgun API
#'
#' Send an email message via the Mailgun API.
#' This requires an account with Mailgun.
#' @param message the email message object,
#' as created by the \code{compose_email()}
#' function. The object's class is
#' \code{email_message}
#' @param subject the subject of ... | /R/send_by_mailgun.R | permissive | fxcebx/blastula | R | false | false | 2,390 | r | #' Send an email message through the Mailgun API
#'
#' Send an email message via the Mailgun API.
#' This requires an account with Mailgun.
#' @param message the email message object,
#' as created by the \code{compose_email()}
#' function. The object's class is
#' \code{email_message}
#' @param subject the subject of ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lotR_example_data.R
\docType{data}
\name{lotR_example_edges}
\alias{lotR_example_edges}
\title{Edgelist for constructing an example tree.}
\format{
The edge list is a matrix with 15 rows with 2 columns:
the left column
represents parent nodes... | /man/lotR_example_edges.Rd | no_license | limengbinggz/lotR | R | false | true | 861 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lotR_example_data.R
\docType{data}
\name{lotR_example_edges}
\alias{lotR_example_edges}
\title{Edgelist for constructing an example tree.}
\format{
The edge list is a matrix with 15 rows with 2 columns:
the left column
represents parent nodes... |
####################################################################
# 8. Plot Multiple Shapefile
ggplot() +
#area
geom_sf(data = aoi_boundary_HARV, fill = "grey", color = "grey") +
#line
geom_sf(data = lines_HARV, aes(color = TYPE), size = 1) +
#point
geom_sf(data = point_HARV) +
ggtitle("NEON Harv... | /GeospatialR_Ch8&9.R | no_license | yanyidi/geospatial_data_tutorials | R | false | false | 2,973 | r | ####################################################################
# 8. Plot Multiple Shapefile
ggplot() +
#area
geom_sf(data = aoi_boundary_HARV, fill = "grey", color = "grey") +
#line
geom_sf(data = lines_HARV, aes(color = TYPE), size = 1) +
#point
geom_sf(data = point_HARV) +
ggtitle("NEON Harv... |
# Exercise 2: advanced ggplot2 practice
# Install and load the `ggplot2` package
#install.packages('ggplot2')
library("ggplot2")
# For this exercise you will again be working with the `diamonds` data set.
# Use `?diamonds` to review details about this data set
?diamonds
## Position Adjustments
# Draw a column (bar)... | /chapter-16-exercises/exercise-2/exercise.R | permissive | kaamnarishi/book-exercises | R | false | false | 3,042 | r | # Exercise 2: advanced ggplot2 practice
# Install and load the `ggplot2` package
#install.packages('ggplot2')
library("ggplot2")
# For this exercise you will again be working with the `diamonds` data set.
# Use `?diamonds` to review details about this data set
?diamonds
## Position Adjustments
# Draw a column (bar)... |
##'
#' @title Samples Counting
#' @description Computes the x value corresponding to a given percentile.
#' @details Returns the x value corresponding to a given percentile [0..1]
#' @param varName a study variable, it must be a numeric vector.
#' @param xREF a numeric value, given reference do calculate the sample siz... | /R/getSamplesCounting.R | no_license | paularaissa/distStatsServer | R | false | false | 1,318 | r | ##'
#' @title Samples Counting
#' @description Computes the x value corresponding to a given percentile.
#' @details Returns the x value corresponding to a given percentile [0..1]
#' @param varName a study variable, it must be a numeric vector.
#' @param xREF a numeric value, given reference do calculate the sample siz... |
# Internal functions -----------------------------------------------------------
read.manifest.Mammal <- function(file, type = 2) {
# NOTE: As is, requires grep
control.line <- system(
sprintf("grep -n \\\\[Controls\\\\] %s", file), intern = TRUE)
control.line <- as.integer(sub(":.*", "", control.l... | /R/read.manifest.R | no_license | mwsill/minfi | R | false | false | 22,976 | r | # Internal functions -----------------------------------------------------------
read.manifest.Mammal <- function(file, type = 2) {
# NOTE: As is, requires grep
control.line <- system(
sprintf("grep -n \\\\[Controls\\\\] %s", file), intern = TRUE)
control.line <- as.integer(sub(":.*", "", control.l... |
library(tidyverse)
library(sf)
library(readxl)
library(ggpubr)
library(ggfortify)
library(here)
library(knitr)
library(kableExtra)
library(DT)
library(mapview)
library(rgdal)
library(SerbianCyrLat)
library(stringr)
library(classInt)
library(viridis)
library(gridExtra)
library(ggsflabel)
library(ggspatial)
my_theme <-... | /2030/Maps_preparing_for_report.R | no_license | pejovic/Spatialization | R | false | false | 63,053 | r | library(tidyverse)
library(sf)
library(readxl)
library(ggpubr)
library(ggfortify)
library(here)
library(knitr)
library(kableExtra)
library(DT)
library(mapview)
library(rgdal)
library(SerbianCyrLat)
library(stringr)
library(classInt)
library(viridis)
library(gridExtra)
library(ggsflabel)
library(ggspatial)
my_theme <-... |
# 1) vectorization ####
# We are talking about vectorization, and how scalars do not exist in R.
# Everything is a vector, even if you might not think it is!
is.vector(5)
is.vector(5.002)
# scalars in R are vectors of length 1. Keep this in mind throughout the seminar!
# a vectorized function
examplevect <- c(1:10)
sq... | /seminar_3_introduction_basic_programming/basic_programming_script.R | no_license | orb16/seminaRs | R | false | false | 14,687 | r | # 1) vectorization ####
# We are talking about vectorization, and how scalars do not exist in R.
# Everything is a vector, even if you might not think it is!
is.vector(5)
is.vector(5.002)
# scalars in R are vectors of length 1. Keep this in mind throughout the seminar!
# a vectorized function
examplevect <- c(1:10)
sq... |
## Work toward a flexible method of defining arbitrary scoring regions for multi-line texts.
## Also see yaml-test.txt system.file("extdata/yaml-test.txt")
##' @title Convert region file to region definition file.
##'
##' @description Convert a file containing full region description
##' into a region definition f... | /R/textRegions.R | permissive | nagaflokhu/FDBeye | R | false | false | 13,252 | r | ## Work toward a flexible method of defining arbitrary scoring regions for multi-line texts.
## Also see yaml-test.txt system.file("extdata/yaml-test.txt")
##' @title Convert region file to region definition file.
##'
##' @description Convert a file containing full region description
##' into a region definition f... |
library(DescTools)
### Name: StrAlign
### Title: String Alignment
### Aliases: StrAlign
### Keywords: character
### ** Examples
# align on (the first occuring) B
x <- c("ABCDMNB", "CDGHEBK", "BCI")
cbind(StrAlign(x, sep="B"))
# align to decimal point
z <- c(" 6.0", "6.00 ", " 45.12 ", "784", NA)
cbind(StrAl... | /data/genthat_extracted_code/DescTools/examples/StrAlign.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 520 | r | library(DescTools)
### Name: StrAlign
### Title: String Alignment
### Aliases: StrAlign
### Keywords: character
### ** Examples
# align on (the first occuring) B
x <- c("ABCDMNB", "CDGHEBK", "BCI")
cbind(StrAlign(x, sep="B"))
# align to decimal point
z <- c(" 6.0", "6.00 ", " 45.12 ", "784", NA)
cbind(StrAl... |
## ---- eval = TRUE, include=FALSE----------------------------------------------
# load data
data("Ross76")
# time vector
tin <- Ross76[seq(1, 3000, by = 8), 1]
# single time series, here y(t) is chosen
data <- Ross76[seq(1, 3000, by = 8), 3]
# global modelling
# results are put in list outputGPoM
outputGPoM <- gPoMo(d... | /inst/doc/b5_Predictability.R | no_license | cran/GPoM | R | false | false | 3,988 | r | ## ---- eval = TRUE, include=FALSE----------------------------------------------
# load data
data("Ross76")
# time vector
tin <- Ross76[seq(1, 3000, by = 8), 1]
# single time series, here y(t) is chosen
data <- Ross76[seq(1, 3000, by = 8), 3]
# global modelling
# results are put in list outputGPoM
outputGPoM <- gPoMo(d... |
#' Pivot a data frame from wide to long or long to wide
#'
#' `pivot()` is provides rectangular reshaping like `gather()` and `spread()`.
#' It differs primarily from existing approaches in tidyr because the details
#' of the reshaping a described by a data frame, `spec`. For simple cases, you
#' can construct the spec... | /R/pivot.R | permissive | coolbutuseless/tidyr | R | false | false | 5,196 | r | #' Pivot a data frame from wide to long or long to wide
#'
#' `pivot()` is provides rectangular reshaping like `gather()` and `spread()`.
#' It differs primarily from existing approaches in tidyr because the details
#' of the reshaping a described by a data frame, `spec`. For simple cases, you
#' can construct the spec... |
#Vectors
#Logical
vtrl =c(TRUE,FALSE)
class(vtrl)
#Numeric
vtrl1 =c(15,85.2344,9999)
class(vtrl1)
#Integer
vtrl2 =c(38L,20L,12L)
class(vtrl2)
vtrl2
#Matrix
mtr = matrix(c(6:30), byrow = TRUE,nrow = 5, ncol = 5)
#Array
arr = array(c(1:9),dim = c(3,3,2,2))
arr1 = array(c(1:24),dim =c(4,3,2))
#List
vct1 = c(3.14,79... | /Datatypes.R | no_license | Lakshhmi/R-Course | R | false | false | 1,244 | r | #Vectors
#Logical
vtrl =c(TRUE,FALSE)
class(vtrl)
#Numeric
vtrl1 =c(15,85.2344,9999)
class(vtrl1)
#Integer
vtrl2 =c(38L,20L,12L)
class(vtrl2)
vtrl2
#Matrix
mtr = matrix(c(6:30), byrow = TRUE,nrow = 5, ncol = 5)
#Array
arr = array(c(1:9),dim = c(3,3,2,2))
arr1 = array(c(1:24),dim =c(4,3,2))
#List
vct1 = c(3.14,79... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 369
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 369
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/exq... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/exquery_query07_1344n/exquery_query07_1344n.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 704 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 369
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 369
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/exq... |
library(tidyverse)
library(jsonlite)
precinct_values <- read_json("../precinct_data_api/precinct_data_api/precinct_ingest/values/pct_dict.json",
simplifyVector = T)
candidate_values <- read_json("../precinct_data_api/precinct_data_api/precinct_ingest/values/cand_dict.json") %>%
map(f... | /data-raw/buildtables.R | no_license | yougov-datascience/ygresults | R | false | false | 700 | r | library(tidyverse)
library(jsonlite)
precinct_values <- read_json("../precinct_data_api/precinct_data_api/precinct_ingest/values/pct_dict.json",
simplifyVector = T)
candidate_values <- read_json("../precinct_data_api/precinct_data_api/precinct_ingest/values/cand_dict.json") %>%
map(f... |
###################################################
### code chunk number 32: Cs704_multivariate
###################################################
mod.list.y <- list(
A = "zero",
R = "diagonal and equal"
)
| /inst/userguide/figures/STS--Cs704_multivariate.R | permissive | nwfsc-timeseries/MARSS | R | false | false | 214 | r | ###################################################
### code chunk number 32: Cs704_multivariate
###################################################
mod.list.y <- list(
A = "zero",
R = "diagonal and equal"
)
|
# Installing and loading necessary packages
if (!require("dplyr")) install.packages("dplyr")
library(dplyr)
if (!require("reshape2")) install.packages("reshape2")
library(tidyr)
# Read training and test data and combine them into three separate data frames
trainSubjects <- read.table("./train/subject_train.txt")
trai... | /run_analysis.R | no_license | tradewind/getting_cleaning_data_project | R | false | false | 2,389 | r | # Installing and loading necessary packages
if (!require("dplyr")) install.packages("dplyr")
library(dplyr)
if (!require("reshape2")) install.packages("reshape2")
library(tidyr)
# Read training and test data and combine them into three separate data frames
trainSubjects <- read.table("./train/subject_train.txt")
trai... |
MFA_iter<-function(data,groups,stream=TRUE,nb_fact,principal_factors=TRUE,principal_axes=FALSE,eigenvalues=FALSE,corr=FALSE,exec_time)
{
if (stream==TRUE) {iter_init <- 300}
eps <- 0.9
p <- ncol(data)
nb_ind <- nrow(data)
q<-length(groups)
indices_debut_groupes<-c(1,cumsum(groups)+1)
A<-X <- Y<-Corr <- vector("li... | /R/MFA_iter_function.R | no_license | cran/factas | R | false | false | 3,102 | r |
MFA_iter<-function(data,groups,stream=TRUE,nb_fact,principal_factors=TRUE,principal_axes=FALSE,eigenvalues=FALSE,corr=FALSE,exec_time)
{
if (stream==TRUE) {iter_init <- 300}
eps <- 0.9
p <- ncol(data)
nb_ind <- nrow(data)
q<-length(groups)
indices_debut_groupes<-c(1,cumsum(groups)+1)
A<-X <- Y<-Corr <- vector("li... |
#' Conversion of a single genus and species name to a single MFG. Uses species.mfg.library
#'
#' @param genus Character string: genus name
#' @param species Character string: species name
#' @param flag Resolve ambiguous mfg: 1 = return(NA),2= manual selection
#' @param mfgDbase data.frame of species MFG classific... | /R/species_to_mfg.r | no_license | cran/algaeClassify | R | false | false | 3,548 | r | #' Conversion of a single genus and species name to a single MFG. Uses species.mfg.library
#'
#' @param genus Character string: genus name
#' @param species Character string: species name
#' @param flag Resolve ambiguous mfg: 1 = return(NA),2= manual selection
#' @param mfgDbase data.frame of species MFG classific... |
library(testthat)
library(devtools)
library(Biobase)
library(reshape)
geneid="Gene"
primerid='Gene'
measurement='et'
idvars=c('Subject.ID', 'Chip.Number', 'Stim.Condition', 'Population', 'Well')
ncells <- 'Number.of.Cells'
phenovars=NULL
cellvars='Experiment.Number'
featurevars=NULL
##Tests depending on vbeta
data(vb... | /inst/tests/common-fixtures.R | no_license | chesterni/SingleCellAssay | R | false | false | 703 | r | library(testthat)
library(devtools)
library(Biobase)
library(reshape)
geneid="Gene"
primerid='Gene'
measurement='et'
idvars=c('Subject.ID', 'Chip.Number', 'Stim.Condition', 'Population', 'Well')
ncells <- 'Number.of.Cells'
phenovars=NULL
cellvars='Experiment.Number'
featurevars=NULL
##Tests depending on vbeta
data(vb... |
## Ford Fishman
suppressMessages(library("ggplot2"))
suppressMessages(library("tidyr"))
suppressMessages(library("optparse"))
suppressMessages(library("scales"))
suppressMessages(library("MASS"))
option_list <- list(
make_option(c("-f", "--file"), type="character", default=NULL,
help="dataset file ro... | /r/plotGraphs1Sim.R | no_license | fordfishman/CommunityImmunity | R | false | false | 2,898 | r | ## Ford Fishman
suppressMessages(library("ggplot2"))
suppressMessages(library("tidyr"))
suppressMessages(library("optparse"))
suppressMessages(library("scales"))
suppressMessages(library("MASS"))
option_list <- list(
make_option(c("-f", "--file"), type="character", default=NULL,
help="dataset file ro... |
library(data.table)
library(lubridate)
### Load Historical data -----------
Path='Y:\\Ziwen\\Research\\Precipitation analysis\\Data\\'
#### Syracuse data
#Get column names
Col_Nm=c('Date','Time','Precip_cm')
MIAMI_Precip=fread(paste0(Path,'Miami\\Miami Precip.csv'),
skip=1,
se... | /General-Functions/ReadMiamiPrecip.R | no_license | ZyuAFD/SWRE_Project | R | false | false | 640 | r | library(data.table)
library(lubridate)
### Load Historical data -----------
Path='Y:\\Ziwen\\Research\\Precipitation analysis\\Data\\'
#### Syracuse data
#Get column names
Col_Nm=c('Date','Time','Precip_cm')
MIAMI_Precip=fread(paste0(Path,'Miami\\Miami Precip.csv'),
skip=1,
se... |
context("generate_community")
test_that("generate_community runs without error", {
expect_silent(generate_community(100))
expect_silent(generate_community(1))
expect_silent(generate_community())
})
test_that("relative abundances sum to 100", {
comm <- generate_community()
expect_equal(sum(comm$rDNA_relabund... | /tests/testthat/test_generate_community.R | no_license | wilkox/rdrsimulate | R | false | false | 506 | r | context("generate_community")
test_that("generate_community runs without error", {
expect_silent(generate_community(100))
expect_silent(generate_community(1))
expect_silent(generate_community())
})
test_that("relative abundances sum to 100", {
comm <- generate_community()
expect_equal(sum(comm$rDNA_relabund... |
\name{computeConditionalCS_DeltaSDRMB}
\alias{computeConditionalCS_DeltaSDRMB}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Computes conditional and hybridized confidence set for Delta = Delta^{SDRMB}(Mbar).
}
\description{
Computes the conditional confidence set and hybridized confidence set ... | /man/computeConditionalCS_DeltaSDRMB.Rd | no_license | ywang-econ/HonestDiD | R | false | false | 5,122 | rd | \name{computeConditionalCS_DeltaSDRMB}
\alias{computeConditionalCS_DeltaSDRMB}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Computes conditional and hybridized confidence set for Delta = Delta^{SDRMB}(Mbar).
}
\description{
Computes the conditional confidence set and hybridized confidence set ... |
library(plotly)
# Read in data
df <- read.csv("C:/Users/Jorge/Dropbox/jorge_guede/TFG RESULTADOS/159TASKS/159TasksAreasGantt.txt", stringsAsFactors = F)
# Initialize empty plot
p <- plot_ly()
# Each task is a separate trace
# Each trace is essentially a thick line plot
# x-axis ticks are dates and handled automatica... | /159TASKS/159TasksAreasGantt.R | no_license | Jorge-Guede-Barcenilla/TFG | R | false | false | 9,491 | r | library(plotly)
# Read in data
df <- read.csv("C:/Users/Jorge/Dropbox/jorge_guede/TFG RESULTADOS/159TASKS/159TasksAreasGantt.txt", stringsAsFactors = F)
# Initialize empty plot
p <- plot_ly()
# Each task is a separate trace
# Each trace is essentially a thick line plot
# x-axis ticks are dates and handled automatica... |
####################
#### TITLE: Give back the correspondig run and step from a sequence of numbers
#### Contents:
####
#### Source Files: \\FreddieFreeloader/Script.git/Sampling/SplitSubjects
#### First Modified: 26/06/2015
#### Notes:
#################
##
###############
### Notes
###############
##
# INCEN... | /Sampling/Incentive/SplitSubjects/RUNSTEP.R | permissive | NeuroStat/replicability_fmri | R | false | false | 1,078 | r | ####################
#### TITLE: Give back the correspondig run and step from a sequence of numbers
#### Contents:
####
#### Source Files: \\FreddieFreeloader/Script.git/Sampling/SplitSubjects
#### First Modified: 26/06/2015
#### Notes:
#################
##
###############
### Notes
###############
##
# INCEN... |
# ideal.R
#' ideal: Interactive Differential Expression Analysis
#'
#' ideal makes differential expression analysis interactive, easy and reproducible.
#' This function launches the main application included in the package.
#'
#' @param dds_obj A \code{\link{DESeqDataSet}} object. If not provided, then a
#' \code{coun... | /R/ideal.R | permissive | BadSeby/ideal | R | false | false | 193,549 | r | # ideal.R
#' ideal: Interactive Differential Expression Analysis
#'
#' ideal makes differential expression analysis interactive, easy and reproducible.
#' This function launches the main application included in the package.
#'
#' @param dds_obj A \code{\link{DESeqDataSet}} object. If not provided, then a
#' \code{coun... |
## EDA
data("ToothGrowth")
head(ToothGrowth)
summary(ToothGrowth$len)
unique(ToothGrowth$supp)
table(ToothGrowth$supp)
summary(ToothGrowth$dose)
unique(ToothGrowth$dose)
nrow(ToothGrowth)
sapply(ToothGrowth, class)
ToothGrowth$dose <- as.factor(ToothGrowth$dose)
## Ploting the dose fig1
ggplot(aes(x=dose, y=len)... | /t - test part 2.R | no_license | Mo7amed2/Statistical-Inference-Course-Project | R | false | false | 1,264 | r | ## EDA
data("ToothGrowth")
head(ToothGrowth)
summary(ToothGrowth$len)
unique(ToothGrowth$supp)
table(ToothGrowth$supp)
summary(ToothGrowth$dose)
unique(ToothGrowth$dose)
nrow(ToothGrowth)
sapply(ToothGrowth, class)
ToothGrowth$dose <- as.factor(ToothGrowth$dose)
## Ploting the dose fig1
ggplot(aes(x=dose, y=len)... |
# --------
rm(list=ls())
files <- list.files(path="/home/alina/Documents/Universität/2016W/Multimedia Search and Retrieval/Project/div-2014/devset/descvis/img",
pattern="*GLRLM.csv", full.names=T, recursive=FALSE)
centroids <- read.csv("/home/alina/Documents/Universität/2016W/Multimedia Search a... | /MMSR_Project_ImagerRetrieval/src/scripts/diverseimages/R/clusterTestData_GLRLM.R | no_license | ntsmwk/MMSearch-Retrieval_2016_MainProject | R | false | false | 1,263 | r |
# --------
rm(list=ls())
files <- list.files(path="/home/alina/Documents/Universität/2016W/Multimedia Search and Retrieval/Project/div-2014/devset/descvis/img",
pattern="*GLRLM.csv", full.names=T, recursive=FALSE)
centroids <- read.csv("/home/alina/Documents/Universität/2016W/Multimedia Search a... |
## Caching the inverse of a special matrix
## Function "makeCacheMatrix" creates a special "matrix" object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
i<-NULL
set<-function(y){
x<<-y
i<<-NULL
}
get<-function()x
setinverse<-function(inverse) i<<-inverse
getinverse<-functi... | /cachematrix.R | no_license | tangqingguangyue/ProgrammingAssignment2 | R | false | false | 897 | r | ## Caching the inverse of a special matrix
## Function "makeCacheMatrix" creates a special "matrix" object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
i<-NULL
set<-function(y){
x<<-y
i<<-NULL
}
get<-function()x
setinverse<-function(inverse) i<<-inverse
getinverse<-functi... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/pedvis.R
\name{prop2string}
\alias{prop2string}
\title{given a named list of properties, this turns each one into a string.}
\usage{
prop2string(y)
}
\description{
It returns a vector of such strings.
}
| /man/prop2string.Rd | no_license | eriqande/pedvis | R | false | false | 290 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/pedvis.R
\name{prop2string}
\alias{prop2string}
\title{given a named list of properties, this turns each one into a string.}
\usage{
prop2string(y)
}
\description{
It returns a vector of such strings.
}
|
library(ggplot2)
library(dplyr)
displ4 <- mpg %>% filter(mpg$displ <=4)
displ5 <- mpg %>% filter(mpg$displ >=5)
mean(displ4$hwy)
mean(displ5$hwy)
audi <- mpg %>% filter(manufacturer == "audi")
toyota <- mpg %>% filter(manufacturer =="toyota")
mean(audi$cty)
mean(toyota$cty)
cfh <- mpg %>% filter(man... | /19_10_24practice2_연습.R | no_license | hongshi97/R_basic_practice | R | false | false | 558 | r | library(ggplot2)
library(dplyr)
displ4 <- mpg %>% filter(mpg$displ <=4)
displ5 <- mpg %>% filter(mpg$displ >=5)
mean(displ4$hwy)
mean(displ5$hwy)
audi <- mpg %>% filter(manufacturer == "audi")
toyota <- mpg %>% filter(manufacturer =="toyota")
mean(audi$cty)
mean(toyota$cty)
cfh <- mpg %>% filter(man... |
######################### Verifying output ##################################
# Output is verified for the following conditions using an independent approach
# i.e. by calculating a subset of the expected tidy output matrix through a
# completetely different operation and comparing with corresponding subset of
# tidy... | /03_Getting_And_Cleaning_Data/07_verify_output.R | no_license | kartik-avula/Assignments | R | false | false | 1,115 | r | ######################### Verifying output ##################################
# Output is verified for the following conditions using an independent approach
# i.e. by calculating a subset of the expected tidy output matrix through a
# completetely different operation and comparing with corresponding subset of
# tidy... |
WrightFisherPopulationMultiFounders<-function(n,nbgeneration,nloci,genomeDefFixedMapWithQTL,nbfounder){
## Generate individuals according to Wright Fisher
## Be careful at the early beginning we only have two founders
## input : n number of individuals to generate
### nbgeneration : number of generations
##... | /functionsForMultiFounders.R | no_license | rabier/GSImperfectLD | R | false | false | 1,738 | r |
WrightFisherPopulationMultiFounders<-function(n,nbgeneration,nloci,genomeDefFixedMapWithQTL,nbfounder){
## Generate individuals according to Wright Fisher
## Be careful at the early beginning we only have two founders
## input : n number of individuals to generate
### nbgeneration : number of generations
##... |
# Name: Fastq_checks.R
# Auth: u.niazi@imperial.ac.uk
# Date: 4/12/15
# Desc: create a report for the fastq files
source('Header.R')
library(ShortRead)
#source('../CFastqQuality/CFastqQuality.R')
dfAnnotations = read.csv('Data_external/Sample_information.csv', header=T)
i = nrow(dfAnnotations)
r = 1
nc = ncol(dfAn... | /Fastq_checks.R | permissive | uhkniazi/HPRU_AK_Rna_Seq | R | false | false | 2,513 | r | # Name: Fastq_checks.R
# Auth: u.niazi@imperial.ac.uk
# Date: 4/12/15
# Desc: create a report for the fastq files
source('Header.R')
library(ShortRead)
#source('../CFastqQuality/CFastqQuality.R')
dfAnnotations = read.csv('Data_external/Sample_information.csv', header=T)
i = nrow(dfAnnotations)
r = 1
nc = ncol(dfAn... |
#' @export
#' @rdname geom_linerange
geom_pointrange <- function(mapping = NULL, data = NULL, stat = "identity",
position = "identity", show.legend = NA,
inherit.aes = TRUE, ...) {
layer(
data = data,
mapping = mapping,
stat = stat,
geom = GeomPo... | /R/geom-pointrange.r | no_license | bbolker/ggplot2 | R | false | false | 1,138 | r | #' @export
#' @rdname geom_linerange
geom_pointrange <- function(mapping = NULL, data = NULL, stat = "identity",
position = "identity", show.legend = NA,
inherit.aes = TRUE, ...) {
layer(
data = data,
mapping = mapping,
stat = stat,
geom = GeomPo... |
#### Logical Sparse Triangular Matrices in Compressed column-oriented format
setAs("ntCMatrix", "matrix",
function(from) as(as(from, "denseMatrix"), "matrix"))
setAs("matrix", "ntCMatrix",
function(from) as(as(from, "dtCMatrix"), "ntCMatrix"))
setAs("ntCMatrix", "TsparseMatrix",
function(from) .Call... | /tags/0.999375-23/R/ntCMatrix.R | no_license | LTLA/Matrix | R | false | false | 1,523 | r | #### Logical Sparse Triangular Matrices in Compressed column-oriented format
setAs("ntCMatrix", "matrix",
function(from) as(as(from, "denseMatrix"), "matrix"))
setAs("matrix", "ntCMatrix",
function(from) as(as(from, "dtCMatrix"), "ntCMatrix"))
setAs("ntCMatrix", "TsparseMatrix",
function(from) .Call... |
library(tidyverse)
library(h2o)
library(lubridate)
library(caTools)
h2o.init()
df = read_rds("Data/WeatherBound.rds")
set.seed(101)
sample = sample.split(df$range_remaining, SplitRatio = .75)
subset(df, sample == TRUE) %>% write_csv("Data/h2odata/train.csv")
subset(df, sample == FALSE) %>% write_csv("Data/h2odata/t... | /Code/autoML.R | no_license | cdmoss/MHC-EV-Dashboard | R | false | false | 969 | r | library(tidyverse)
library(h2o)
library(lubridate)
library(caTools)
h2o.init()
df = read_rds("Data/WeatherBound.rds")
set.seed(101)
sample = sample.split(df$range_remaining, SplitRatio = .75)
subset(df, sample == TRUE) %>% write_csv("Data/h2odata/train.csv")
subset(df, sample == FALSE) %>% write_csv("Data/h2odata/t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{region_mappings}
\alias{region_mappings}
\title{Default regional mapping}
\format{
A named list of data.tables with 2 columns
\describe{
\item{mapping_name}{Mapping name (example, witch17),
contains the region name... | /man/region_mappings.Rd | permissive | witch-team/witchtools | R | false | true | 487 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{region_mappings}
\alias{region_mappings}
\title{Default regional mapping}
\format{
A named list of data.tables with 2 columns
\describe{
\item{mapping_name}{Mapping name (example, witch17),
contains the region name... |
tag_item <- function(x, tag_val) {
if (is.null(x)) x <- list()
attr(x, "tag") <- tag_val
x
}
tag_list_col <- function(x) {
x %<>%
purrr::modify(~tag_item(., "list")) %>%
tag_item("list_col")
x
}
serialize_df <- function(x) {
out <- x %>%
dplyr::mutate(dplyr::across(where(is.list), tag_list_c... | /R/io_utils.R | no_license | strazto/mandrake | R | false | false | 5,340 | r | tag_item <- function(x, tag_val) {
if (is.null(x)) x <- list()
attr(x, "tag") <- tag_val
x
}
tag_list_col <- function(x) {
x %<>%
purrr::modify(~tag_item(., "list")) %>%
tag_item("list_col")
x
}
serialize_df <- function(x) {
out <- x %>%
dplyr::mutate(dplyr::across(where(is.list), tag_list_c... |
##
# Author: Autogenerated on 2013-11-27 18:13:58
# gitHash: c4ad841105ba82f4a3979e4cf1ae7e20a5905e59
# SEED: 4663640625336856642
##
source('./findNSourceUtils.R')
Log.info("======================== Begin Test ==========================... | /R/tests/testdir_autoGen/runit_simpleFilterTest_leads_83.R | permissive | hardikk/h2o | R | false | false | 9,453 | r | ##
# Author: Autogenerated on 2013-11-27 18:13:58
# gitHash: c4ad841105ba82f4a3979e4cf1ae7e20a5905e59
# SEED: 4663640625336856642
##
source('./findNSourceUtils.R')
Log.info("======================== Begin Test ==========================... |
#Load Data
loadPowerData <- function() {
data <- read.table("household_power_consumption.txt",
header=TRUE,
sep=";",
colClasses=c("character", "character", rep("numeric",7)),
na="?")
#Convert time var... | /plot2.R | no_license | wongkaeperng/ExData_Plotting1 | R | false | false | 956 | r | #Load Data
loadPowerData <- function() {
data <- read.table("household_power_consumption.txt",
header=TRUE,
sep=";",
colClasses=c("character", "character", rep("numeric",7)),
na="?")
#Convert time var... |
# solving carina
# need a lookup for f0(v)
hobj = hist(milkyway, breaks = 100, plot = FALSE)
# make a function by linearly interpolating between this fit
f0v = approx(hobj$mids, hobj$density, v)$y
# hist(milkyway, breaks = 50, freq =FALSE)
# points(v[order(v)], f0v[order(v)], cex = 0.2, col = 'blue', type = 'l'... | /AstroDataSets/mmfs_data/carina_em_methods.R | no_license | NabarunD/NPMLEmix | R | false | false | 8,805 | r | # solving carina
# need a lookup for f0(v)
hobj = hist(milkyway, breaks = 100, plot = FALSE)
# make a function by linearly interpolating between this fit
f0v = approx(hobj$mids, hobj$density, v)$y
# hist(milkyway, breaks = 50, freq =FALSE)
# points(v[order(v)], f0v[order(v)], cex = 0.2, col = 'blue', type = 'l'... |
# web scraping figure skater personal bests
# http://www.isuresults.com/bios/fsbiosmen.htm and http://www.isuresults.com/bios/fsbiosladies.htm
# biographies of figure skaters.
library(rvest)
library(stringr)
library(pbapply) # for progress bar
# get URLs for each skater
male_urls <- "http://www.isuresu... | /fig-skate-web-scrape.R | no_license | clayford/fig-skate | R | false | false | 2,904 | r | # web scraping figure skater personal bests
# http://www.isuresults.com/bios/fsbiosmen.htm and http://www.isuresults.com/bios/fsbiosladies.htm
# biographies of figure skaters.
library(rvest)
library(stringr)
library(pbapply) # for progress bar
# get URLs for each skater
male_urls <- "http://www.isuresu... |
testlist <- list(data = structure(c(3.63959479422642e-23, 0, 2.47812124169512e-307, 3.52953640547268e+30, 6.06877987683043e-307, 0), .Dim = c(1L, 6L)), q = 0)
result <- do.call(biwavelet:::rcpp_row_quantile,testlist)
str(result) | /biwavelet/inst/testfiles/rcpp_row_quantile/libFuzzer_rcpp_row_quantile/rcpp_row_quantile_valgrind_files/1610556060-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 230 | r | testlist <- list(data = structure(c(3.63959479422642e-23, 0, 2.47812124169512e-307, 3.52953640547268e+30, 6.06877987683043e-307, 0), .Dim = c(1L, 6L)), q = 0)
result <- do.call(biwavelet:::rcpp_row_quantile,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/muestra_contribuyentes.R
\name{muestra_contribuyentes}
\alias{muestra_contribuyentes}
\title{Muestra de las y los Contribuyentes}
\usage{
muestra_contribuyentes(n = 500)
}
\arguments{
\item{n}{Un número entero no negativo que indica el número... | /man/muestra_contribuyentes.Rd | permissive | RichDeto/firstContributionsInR | R | false | true | 599 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/muestra_contribuyentes.R
\name{muestra_contribuyentes}
\alias{muestra_contribuyentes}
\title{Muestra de las y los Contribuyentes}
\usage{
muestra_contribuyentes(n = 500)
}
\arguments{
\item{n}{Un número entero no negativo que indica el número... |
##########################
# Have a crack at sample size for
# regional councils based on "heterogeneity"
# of their LCDB classification.
#
# Paul van Dam-Bates
# Decemeber 28, 2018
##########################
# Logic here is that heterogeneity is not a function of "area"
# but a function of heterogeneity of landcover. ... | /Sample Size/Code/DataProcessing.r | no_license | paul-vdb/RegionalCouncilDesign | R | false | false | 15,989 | r | ##########################
# Have a crack at sample size for
# regional councils based on "heterogeneity"
# of their LCDB classification.
#
# Paul van Dam-Bates
# Decemeber 28, 2018
##########################
# Logic here is that heterogeneity is not a function of "area"
# but a function of heterogeneity of landcover. ... |
# Análise Categórica e Dados
# MMEAD - 2017/2018 - 2º semestre
# Modelos Lineares Generalizados v1.0
# Ana Sapata n.º39504
# 21/06/2018
dados<-read.table("C:\\Users\\rebis1\\Desktop\\Universidade\\Categorica\\Nova pasta\\loja.txt", header=T)
attach(dados)
View(dados)
str(dados)
# -----------------------... | /t2.R | no_license | AnaSapata/ACD_T2 | R | false | false | 7,619 | r | # Análise Categórica e Dados
# MMEAD - 2017/2018 - 2º semestre
# Modelos Lineares Generalizados v1.0
# Ana Sapata n.º39504
# 21/06/2018
dados<-read.table("C:\\Users\\rebis1\\Desktop\\Universidade\\Categorica\\Nova pasta\\loja.txt", header=T)
attach(dados)
View(dados)
str(dados)
# -----------------------... |
library(phylocurve)
### Name: ultraFastAnc
### Title: Ultra-fast maximum likelihood ancestral state reconstruction
### Aliases: ultraFastAnc
### Keywords: ~kwd1 ~kwd2
### ** Examples
require(ape)
tree <- rtree(1e4) # random tree with 10,000 taxa
x <- setNames(rnorm(1e4),tree$tip.label) # random trait data
recon <- ... | /data/genthat_extracted_code/phylocurve/examples/ultraFastAnc.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 358 | r | library(phylocurve)
### Name: ultraFastAnc
### Title: Ultra-fast maximum likelihood ancestral state reconstruction
### Aliases: ultraFastAnc
### Keywords: ~kwd1 ~kwd2
### ** Examples
require(ape)
tree <- rtree(1e4) # random tree with 10,000 taxa
x <- setNames(rnorm(1e4),tree$tip.label) # random trait data
recon <- ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glmmulti.R
\name{glmmulti}
\alias{glmmulti}
\title{Binomial logistic regression multivariable models: \code{finalfit} model
wrapper}
\usage{
glmmulti(.data, dependent, explanatory)
}
\arguments{
\item{.data}{Dataframe.}
\item{dependent}{Char... | /man/glmmulti.Rd | no_license | nemochina2008/finalfit | R | false | true | 1,652 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glmmulti.R
\name{glmmulti}
\alias{glmmulti}
\title{Binomial logistic regression multivariable models: \code{finalfit} model
wrapper}
\usage{
glmmulti(.data, dependent, explanatory)
}
\arguments{
\item{.data}{Dataframe.}
\item{dependent}{Char... |
library(glmnet)
mydata = read.table("./TrainingSet/Correlation/NSCLC.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="mse",alpha=0.8,family="gaussian",standardize=FALSE)
sink('./Model/EN/Correlation/NSCLC/NSCLC_082.txt',appen... | /Model/EN/Correlation/NSCLC/NSCLC_082.R | no_license | leon1003/QSMART | R | false | false | 357 | r | library(glmnet)
mydata = read.table("./TrainingSet/Correlation/NSCLC.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="mse",alpha=0.8,family="gaussian",standardize=FALSE)
sink('./Model/EN/Correlation/NSCLC/NSCLC_082.txt',appen... |
\name{fdrtool}
\alias{fdrtool}
\title{Estimate (Local) False Discovery Rates For Diverse Test Statistics}
\usage{
fdrtool(x, statistic=c("normal", "correlation", "pvalue"),
plot=TRUE, color.figure=TRUE, verbose=TRUE,
cutoff.method=c("fndr", "pct0", "locfdr"),
pct0=0.75)
}
\description{
\code{fdrtool} takes a v... | /man/fdrtool.Rd | no_license | cran/fdrtool | R | false | false | 4,382 | rd | \name{fdrtool}
\alias{fdrtool}
\title{Estimate (Local) False Discovery Rates For Diverse Test Statistics}
\usage{
fdrtool(x, statistic=c("normal", "correlation", "pvalue"),
plot=TRUE, color.figure=TRUE, verbose=TRUE,
cutoff.method=c("fndr", "pct0", "locfdr"),
pct0=0.75)
}
\description{
\code{fdrtool} takes a v... |
### Jinliang
### May 12th, 2015
#source("~/Documents/Github/zmSNPtools/Rcodes/dsnp2GenABEL.R")
library("data.table")
#library("GenABEL.data", lib="~/bin/Rlib/")
#library("GenABEL", lib="~/bin/Rlib/")
bed2illumina <- function(){
#######==> GBS data for GenABEL
gbs <- fread("~/dbcenter/AllZeaGBS/ZeaGBSv27_Ames2... | /profiling/10.Dong_etal/10.B.4_GBS_2GenABEL.R | no_license | yangjl/Misc | R | false | false | 1,093 | r | ### Jinliang
### May 12th, 2015
#source("~/Documents/Github/zmSNPtools/Rcodes/dsnp2GenABEL.R")
library("data.table")
#library("GenABEL.data", lib="~/bin/Rlib/")
#library("GenABEL", lib="~/bin/Rlib/")
bed2illumina <- function(){
#######==> GBS data for GenABEL
gbs <- fread("~/dbcenter/AllZeaGBS/ZeaGBSv27_Ames2... |
library(parallel)
simRep <- 5000 # Replication times in one simulation
pvalue.true <- .05 # Testing type I error
b.var <- c(0.0025) # The set of varaince of random covariates b as random slope
smooth <- 1 # measurement error is added to M if smooth = 0; no measurement error is added if sooth = 1
cores <- 8
r.sim <- b.... | /full simulation/summer/hetero_power/variance0.0025/seed2/heter_power_0.0025_pca_s_seed2_200_50.R | no_license | wma9/FMRI-project | R | false | false | 9,199 | r | library(parallel)
simRep <- 5000 # Replication times in one simulation
pvalue.true <- .05 # Testing type I error
b.var <- c(0.0025) # The set of varaince of random covariates b as random slope
smooth <- 1 # measurement error is added to M if smooth = 0; no measurement error is added if sooth = 1
cores <- 8
r.sim <- b.... |
##################################
##### 01REAN Cviceni 5 ##########
#################################
#
# Todays exercise
# Multivariable linear regression in R
library(lattice)
library(MASS)
library(car)
library(ggplot2)
setwd("~/Studies/REAN/tutorials/05")
# We use again trees data to present Multivariable l... | /tutorials/05/REAN2017_Ex05.R | no_license | salisaresama/REAN | R | false | false | 12,195 | r | ##################################
##### 01REAN Cviceni 5 ##########
#################################
#
# Todays exercise
# Multivariable linear regression in R
library(lattice)
library(MASS)
library(car)
library(ggplot2)
setwd("~/Studies/REAN/tutorials/05")
# We use again trees data to present Multivariable l... |
/Prueba variaciones poisson.R | no_license | gagliu/R-programing | R | false | false | 1,118 | r | ||
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/common.R
\name{get_translations}
\alias{get_translations}
\title{Translate your text, choosing the engine}
\usage{
get_translations(x, lang_to, lang_from = "en", api_key,
parallelization_strategy = c("sequential", "multicore", "cluster"),
... | /man/get_translations.Rd | no_license | RL10N/autotranslate | R | false | true | 1,709 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/common.R
\name{get_translations}
\alias{get_translations}
\title{Translate your text, choosing the engine}
\usage{
get_translations(x, lang_to, lang_from = "en", api_key,
parallelization_strategy = c("sequential", "multicore", "cluster"),
... |
# packages
library(tidyverse)
library(patchwork)
library(lubridate)
library(scales)
# read data (https://github.com/CSSEGISandData/COVID-19)
raw <- read.csv("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv")
work <-... | /covid19_austria_europe.R | no_license | manevska18/covid19_austria | R | false | false | 5,542 | r | # packages
library(tidyverse)
library(patchwork)
library(lubridate)
library(scales)
# read data (https://github.com/CSSEGISandData/COVID-19)
raw <- read.csv("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv")
work <-... |
# Subset World Bank data to complete cases
wcSumAll <- readRDS('./1_data/WorldCupSummaryAll.RDS')
# Read world cup data
WDI <- read.csv('./1_data/worldBank/WDI_csv/WDIData.csv')
WDI <- WDI[WDI$Country.Code %in% wcSumAll$codeWB,]
saveRDS(WDI, './1_data/wdi.RDS')
WGI <- read.csv('./1_data/worldBank/WGI_csv/WGIData.cs... | /4_Scripts/deprecated/SubsetWBData.R | no_license | MaximilianPi/ftbl | R | false | false | 768 | r | # Subset World Bank data to complete cases
wcSumAll <- readRDS('./1_data/WorldCupSummaryAll.RDS')
# Read world cup data
WDI <- read.csv('./1_data/worldBank/WDI_csv/WDIData.csv')
WDI <- WDI[WDI$Country.Code %in% wcSumAll$codeWB,]
saveRDS(WDI, './1_data/wdi.RDS')
WGI <- read.csv('./1_data/worldBank/WGI_csv/WGIData.cs... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/constants.R
\name{.h2o.__MODEL_BUILDERS}
\alias{.h2o.__MODEL_BUILDERS}
\title{Model Builder Endpoint Generator}
\usage{
.h2o.__MODEL_BUILDERS(algo)
}
\arguments{
\item{algo}{Cannonical identifier of H2O algorithm.}
}
\description{
Model Build... | /man/dot-h2o.__MODEL_BUILDERS.Rd | no_license | cran/h2o | R | false | true | 344 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/constants.R
\name{.h2o.__MODEL_BUILDERS}
\alias{.h2o.__MODEL_BUILDERS}
\title{Model Builder Endpoint Generator}
\usage{
.h2o.__MODEL_BUILDERS(algo)
}
\arguments{
\item{algo}{Cannonical identifier of H2O algorithm.}
}
\description{
Model Build... |
\name{plot.sota}
\alias{plot.sota}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Plot Function for a SOTA Object}
\description{
'plot.sota' is used to obtain a visual representation of profiles within each individual cluster.
Corresponding cluster average profiles are also available. B... | /man/plot.sota.Rd | no_license | cran/clValid | R | false | false | 1,419 | rd | \name{plot.sota}
\alias{plot.sota}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Plot Function for a SOTA Object}
\description{
'plot.sota' is used to obtain a visual representation of profiles within each individual cluster.
Corresponding cluster average profiles are also available. B... |
the.genotypes <- read.delim("http://people.beocat.ksu.edu/~omo/Collaborations/Cowpea/Cowpea.GAPIT.GenoFormat.Lipka.txt", header=T)
the.genotypes[1:6,1:6]
the.genotypes$Snp <- paste("V", the.genotypes$Snp, sep="")
snp_info<-the.genotypes[c(1,3:4)]
colnames(snp_info)<-c("SNP","Chr","Pos")
head(snp_info)
geno <- the.gen... | /Cowpea.QTL.PVE.R | no_license | skayondo/cowpea | R | false | false | 9,437 | r | the.genotypes <- read.delim("http://people.beocat.ksu.edu/~omo/Collaborations/Cowpea/Cowpea.GAPIT.GenoFormat.Lipka.txt", header=T)
the.genotypes[1:6,1:6]
the.genotypes$Snp <- paste("V", the.genotypes$Snp, sep="")
snp_info<-the.genotypes[c(1,3:4)]
colnames(snp_info)<-c("SNP","Chr","Pos")
head(snp_info)
geno <- the.gen... |
#' Hard clustering using k-means
#'
#' This function expects output from custom minimap test dataset that contains original locations of mapped reads in the genome.
#'
#' @param counts.l A \code{list} of directional read counts per PB read per library.
#' @inheritParams SaaRclust
#' @return A \code{list} of estimated t... | /R/hardClust.R | no_license | maryam-ghr/SaaRclust | R | false | false | 3,779 | r | #' Hard clustering using k-means
#'
#' This function expects output from custom minimap test dataset that contains original locations of mapped reads in the genome.
#'
#' @param counts.l A \code{list} of directional read counts per PB read per library.
#' @inheritParams SaaRclust
#' @return A \code{list} of estimated t... |
setwd("~/git/Iterative_ML/R/gibbs_stan_bridge_lm")
rm(list = ls())
#Parameters
N = 100
k = 50
beta = runif(k, -10, 10)
sd = 25
#Data creation
X = matrix(c(rep(1, N), runif((length(beta) - 1) * N, -10, 10)), ncol = length(beta))
y = X %*% beta + rnorm(N, sd = sd)
#Save:
save(X, y, file = "lmData.RData")
| /R/gibbs_stan_bridge_lm/create_data.R | no_license | tkmckenzie/Iterative_ML | R | false | false | 308 | r | setwd("~/git/Iterative_ML/R/gibbs_stan_bridge_lm")
rm(list = ls())
#Parameters
N = 100
k = 50
beta = runif(k, -10, 10)
sd = 25
#Data creation
X = matrix(c(rep(1, N), runif((length(beta) - 1) * N, -10, 10)), ncol = length(beta))
y = X %*% beta + rnorm(N, sd = sd)
#Save:
save(X, y, file = "lmData.RData")
|
# rpart {rpart}
SL.rpart <- function(Y.temp, X.temp, newX.temp, family, obsWeights, cp =0.01, minsplit = 20, xval=10, maxdepth=30,...) {
tryCatch(require(rpart), warning = function(...){ stop("you have selected rpart as a library algorithm but do not have the rpart package installed")})
if(family$family=="gaussian"){... | /R/SL.rpart.R | no_license | tedwestling/SuperLearner_Old | R | false | false | 1,224 | r | # rpart {rpart}
SL.rpart <- function(Y.temp, X.temp, newX.temp, family, obsWeights, cp =0.01, minsplit = 20, xval=10, maxdepth=30,...) {
tryCatch(require(rpart), warning = function(...){ stop("you have selected rpart as a library algorithm but do not have the rpart package installed")})
if(family$family=="gaussian"){... |
structure(list(record_id = c(1, 2, 3, 4, 5), name_first = c("Nutmeg",
"Tumtum", "Marcus", "Trudy", "John Lee"), name_last = c("Nutmouse",
"Nutmouse", "Wood", "DAG", "Walker"), address = c("14 Rose Cottage St.\nKenning UK, 323232",
"14 Rose Cottage Blvd.\nKenning UK 34243", "243 Hill St.\nGuthrie OK 73402",
"342 Elm... | /inst/test-data/specific-redcapr/read-batch-simple/export_checkbox_label.R | permissive | OuhscBbmc/REDCapR | R | false | false | 2,252 | r | structure(list(record_id = c(1, 2, 3, 4, 5), name_first = c("Nutmeg",
"Tumtum", "Marcus", "Trudy", "John Lee"), name_last = c("Nutmouse",
"Nutmouse", "Wood", "DAG", "Walker"), address = c("14 Rose Cottage St.\nKenning UK, 323232",
"14 Rose Cottage Blvd.\nKenning UK 34243", "243 Hill St.\nGuthrie OK 73402",
"342 Elm... |
#' Interactive Heatmap
#'
#' EXTENSION OFF JOE CHENG'S d3heatmap/rstudio. THIS BY NO MEANS IS COMPLETELY
#' MY OWN WORK. CREDITS TO JOE CHENG!!!
#'
#' @import htmlwidgets
#'
#' @export
#'
NULL
`%||%` <- function(a, b) {
if (!is.null(a))
a
else
b
}
iHeatmap <- function(mainData,
th... | /R/iHeatmap.R | no_license | gvanzin/Interactive-bioPlots | R | false | false | 3,998 | r | #' Interactive Heatmap
#'
#' EXTENSION OFF JOE CHENG'S d3heatmap/rstudio. THIS BY NO MEANS IS COMPLETELY
#' MY OWN WORK. CREDITS TO JOE CHENG!!!
#'
#' @import htmlwidgets
#'
#' @export
#'
NULL
`%||%` <- function(a, b) {
if (!is.null(a))
a
else
b
}
iHeatmap <- function(mainData,
th... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/WPSExecuteResponse.R
\docType{class}
\name{WPSExecuteResponse}
\alias{WPSExecuteResponse}
\title{WPSExecuteResponse}
\format{
\code{\link{R6Class}} object.
}
\value{
Object of \code{\link{R6Class}} for modelling a WPS Execute respon... | /man/WPSExecuteResponse.Rd | no_license | cran/ows4R | R | false | true | 9,524 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/WPSExecuteResponse.R
\docType{class}
\name{WPSExecuteResponse}
\alias{WPSExecuteResponse}
\title{WPSExecuteResponse}
\format{
\code{\link{R6Class}} object.
}
\value{
Object of \code{\link{R6Class}} for modelling a WPS Execute respon... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting.geoChronR.R
\name{plotLine}
\alias{plotLine}
\title{Plot or add a line to plot}
\usage{
plotLine(add.to.plot = ggplot(), X, Y, color = "black", alp = 1)
}
\arguments{
\item{add.to.plot}{A ggplot object to add these lines to. Default ... | /man/plotLine.Rd | permissive | nickmckay/GeoChronR | R | false | true | 1,335 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting.geoChronR.R
\name{plotLine}
\alias{plotLine}
\title{Plot or add a line to plot}
\usage{
plotLine(add.to.plot = ggplot(), X, Y, color = "black", alp = 1)
}
\arguments{
\item{add.to.plot}{A ggplot object to add these lines to. Default ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fc_locations_transform.R
\name{fc_locations_transform}
\alias{fc_locations_transform}
\title{Transform event locations}
\usage{
fc_locations_transform(data, x, y, dim = c(105, 70), units = "meters")
}
\arguments{
\item{data}{A data frame with... | /man/fc_locations_transform.Rd | no_license | shawnsanto/scoutr | R | false | true | 2,372 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fc_locations_transform.R
\name{fc_locations_transform}
\alias{fc_locations_transform}
\title{Transform event locations}
\usage{
fc_locations_transform(data, x, y, dim = c(105, 70), units = "meters")
}
\arguments{
\item{data}{A data frame with... |
# Extract Maize prices from CSvs with ETH commodity prices
#### Libraries ####
library(stringdist)
#### INput Data ####
data.dir.path <- "../ScrapDoc/output" # "data/ETHPriceData"
output.dir.path <- "output/ETHPriceData"
coords.file.path <- "data/ETH_Region_Market_Coords.csv"
#### Prepare data ####
mrkt... | /code/Coordinates_prep2.R | no_license | chamb244/EthPriceModelling | R | false | false | 4,760 | r | # Extract Maize prices from CSvs with ETH commodity prices
#### Libraries ####
library(stringdist)
#### INput Data ####
data.dir.path <- "../ScrapDoc/output" # "data/ETHPriceData"
output.dir.path <- "output/ETHPriceData"
coords.file.path <- "data/ETH_Region_Market_Coords.csv"
#### Prepare data ####
mrkt... |
#' DislikeAction
#'
#' The act of expressing a negative sentiment about the object. An agent dislikes an object (a proposition, topic or theme) with participants.
#'
#'
#' @param id identifier for the object (URI)
#' @param target (EntryPoint type.) Indicates a target EntryPoint for an Action.
#' @param startTime (Da... | /R/DislikeAction.R | no_license | cboettig/schemar | R | false | false | 5,604 | r | #' DislikeAction
#'
#' The act of expressing a negative sentiment about the object. An agent dislikes an object (a proposition, topic or theme) with participants.
#'
#'
#' @param id identifier for the object (URI)
#' @param target (EntryPoint type.) Indicates a target EntryPoint for an Action.
#' @param startTime (Da... |
plot2 <- function() {
data <- read.csv("household_power_consumption.txt", sep=";", na.strings="?")
datetimed <- strptime(datetime, "%d/%m/%Y %H:%M:%S")
data <- cbind(data, datetimed)
subdata <- data[data$datetimed>=strptime("2007-02-01 00:00:00","%Y-%m-%d %H:%M:%S") & data$datetimed<strptime("2007-02-03 00:00:0... | /plot2.R | no_license | kellyv/ExData_Plotting1 | R | false | false | 575 | r | plot2 <- function() {
data <- read.csv("household_power_consumption.txt", sep=";", na.strings="?")
datetimed <- strptime(datetime, "%d/%m/%Y %H:%M:%S")
data <- cbind(data, datetimed)
subdata <- data[data$datetimed>=strptime("2007-02-01 00:00:00","%Y-%m-%d %H:%M:%S") & data$datetimed<strptime("2007-02-03 00:00:0... |
# Exercise 2: indexing and filtering vectors
# Create a vector `first_ten` that has the values 10 through 20 in it (using
# the : operator)
first_ten <- c(10:20)
# Create a vector `next_ten` that has the values 21 through 30 in it (using the
# seq() function)
next_ten <- c(seq(21,30))
# Create a vector `all_number... | /chapter-07-exercises/exercise-2/exercise.R | permissive | jqin10/book-exercises | R | false | false | 1,636 | r | # Exercise 2: indexing and filtering vectors
# Create a vector `first_ten` that has the values 10 through 20 in it (using
# the : operator)
first_ten <- c(10:20)
# Create a vector `next_ten` that has the values 21 through 30 in it (using the
# seq() function)
next_ten <- c(seq(21,30))
# Create a vector `all_number... |
library(readxl)
library(dplyr)
library(tidyr)
library(readr)
library(dplyr)
library(vroom)
library(readstata13)
library(foreign)
library(here)
options(scipen=999)
setwd(here::here("data/2021/2021-01-06/"))
bd2020 <- readxl::read_xlsx("CONOSCE_ADJUDICACIONES2020_0.xlsx")
bd2019 <- readxl::read_xlsx("CONOSCE_ADJUDICAC... | /data/2021/2021-01-06/ejemplo.R | no_license | BESTDATASCIENCE/manos-a-la-data | R | false | false | 406 | r | library(readxl)
library(dplyr)
library(tidyr)
library(readr)
library(dplyr)
library(vroom)
library(readstata13)
library(foreign)
library(here)
options(scipen=999)
setwd(here::here("data/2021/2021-01-06/"))
bd2020 <- readxl::read_xlsx("CONOSCE_ADJUDICACIONES2020_0.xlsx")
bd2019 <- readxl::read_xlsx("CONOSCE_ADJUDICAC... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_data.R
\name{load_cellSNP_vcf}
\alias{load_cellSNP_vcf}
\title{Load sparse matrices A and D from cellSNP VCF file with filtering SNPs}
\usage{
load_cellSNP_vcf(vcf_file, min_count = 0, min_MAF = 0,
max_other_allele = NULL, rowname_form... | /man/load_cellSNP_vcf.Rd | permissive | XiaomeiLi1/cardelino | R | false | true | 998 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_data.R
\name{load_cellSNP_vcf}
\alias{load_cellSNP_vcf}
\title{Load sparse matrices A and D from cellSNP VCF file with filtering SNPs}
\usage{
load_cellSNP_vcf(vcf_file, min_count = 0, min_MAF = 0,
max_other_allele = NULL, rowname_form... |
/_gnvcrime/crime_spatial_eda.R | no_license | cbolch/stories | R | false | false | 2,377 | r | ||
#!/usr/bin/env Rscript
#
# This file is part of the `OmnipathR` R package
#
# Copyright
# 2018-2021
# Saez Lab, Uniklinik RWTH Aachen, Heidelberg University
#
# File author(s): Alberto Valdeolivas
# Dénes Türei (turei.denes@gmail.com)
# Attila Gábor
#
# Distributed under the MIT... | /R/ramilowski.R | permissive | kerwin12580/OmnipathR | R | false | false | 1,927 | r | #!/usr/bin/env Rscript
#
# This file is part of the `OmnipathR` R package
#
# Copyright
# 2018-2021
# Saez Lab, Uniklinik RWTH Aachen, Heidelberg University
#
# File author(s): Alberto Valdeolivas
# Dénes Türei (turei.denes@gmail.com)
# Attila Gábor
#
# Distributed under the MIT... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/attribution.r
\name{attribution}
\alias{attribution}
\title{Add an attribution label to a plot}
\usage{
attribution(text = "Lincoln Mullen <http://lincolnmullen.com>", size = 0.75,
color = "gray10")
}
\arguments{
\item{text}{label t... | /man/attribution.Rd | no_license | Deerluluolivia/mullenMisc | R | false | false | 620 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/attribution.r
\name{attribution}
\alias{attribution}
\title{Add an attribution label to a plot}
\usage{
attribution(text = "Lincoln Mullen <http://lincolnmullen.com>", size = 0.75,
color = "gray10")
}
\arguments{
\item{text}{label t... |
library("data.table")
setwd("~/Documents/DataScienceCoursera/Exploratory_Data_Analysis/project/data")
powerDT <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?"
)
powerDT[, Global_active_power := lapply(.SD, as.numeric), .... | /plot1.r | no_license | LinaBrand/Exploratory-Data-Analysis---Project | R | false | false | 702 | r | library("data.table")
setwd("~/Documents/DataScienceCoursera/Exploratory_Data_Analysis/project/data")
powerDT <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?"
)
powerDT[, Global_active_power := lapply(.SD, as.numeric), .... |
#!/usr/bin/env Rscript
# Preprocess COMPAS data for experiments
# Preprocess Compas data ----------------------------------------------------------
compas_df <- read_csv(COMPAS_SCORE_PATH)
test_df <- read_csv(VIGN_PATH) %>%
rename(degree = `charge_degree (misd/fel)`)
# Write violent recidivism data
test_df %>%
se... | /src/preprocess.R | no_license | jballesterosc/recidivism-predictions | R | false | false | 2,729 | r | #!/usr/bin/env Rscript
# Preprocess COMPAS data for experiments
# Preprocess Compas data ----------------------------------------------------------
compas_df <- read_csv(COMPAS_SCORE_PATH)
test_df <- read_csv(VIGN_PATH) %>%
rename(degree = `charge_degree (misd/fel)`)
# Write violent recidivism data
test_df %>%
se... |
#Author: Mallory Barnes
#Date: 08/13/2016
#Input: QA/QC-ed A/CI Curves
#Output: Data frame with the outputs of fit_ACI from plant_ecophys
#Necessary Pacakges:
library(devtools)
library(PEcAn.photosynthesis)
library(plantecophys)
#Purpose: fitting A/Ci curves to files using Plant_Ecophys.
#Then create su... | /04_Fit_Model.R | no_license | GRSEB9S/Drought_Expt_2016 | R | false | false | 2,182 | r | #Author: Mallory Barnes
#Date: 08/13/2016
#Input: QA/QC-ed A/CI Curves
#Output: Data frame with the outputs of fit_ACI from plant_ecophys
#Necessary Pacakges:
library(devtools)
library(PEcAn.photosynthesis)
library(plantecophys)
#Purpose: fitting A/Ci curves to files using Plant_Ecophys.
#Then create su... |
#
# Author: Casey, Jason P.
# Create Date: 15MAY2015
# Description: Reader script for IPEDS Completions, AY2009-2010
# Notes:
# CIP codes are 2010 taxonomy.
# Column classes had to be explicity defined because of periods (.) for missing values.
#
# Load necessary add-ins
library(reshape2)
library(plyr)
# infile and o... | /r-scripts/completions/c_2010.R | permissive | jasonpcasey/chedb | R | false | false | 11,626 | r | #
# Author: Casey, Jason P.
# Create Date: 15MAY2015
# Description: Reader script for IPEDS Completions, AY2009-2010
# Notes:
# CIP codes are 2010 taxonomy.
# Column classes had to be explicity defined because of periods (.) for missing values.
#
# Load necessary add-ins
library(reshape2)
library(plyr)
# infile and o... |
[
{
"title": "Collinearity and stepwise VIF selection",
"href": "https://beckmw.wordpress.com/2013/02/05/collinearity-and-stepwise-vif-selection/"
},
{
"title": "Open data and ecological fallacy",
"href": "http://blog.free.fr/"
},
{
"title": "R is a cool image editor!",
"href": "http:/... | /json/264.r | no_license | rweekly/rweekly.org | R | false | false | 7,849 | r | [
{
"title": "Collinearity and stepwise VIF selection",
"href": "https://beckmw.wordpress.com/2013/02/05/collinearity-and-stepwise-vif-selection/"
},
{
"title": "Open data and ecological fallacy",
"href": "http://blog.free.fr/"
},
{
"title": "R is a cool image editor!",
"href": "http:/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.