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 |
|---|---|---|---|---|---|---|---|---|---|
lmplot <- function(stat.data, map.data=NULL, # Required -- statistical data; map data
panel.types, panel.data, # Required -- panel types (e.g. 'map', 'labels', 'dot.cl', etc.);
# which columns in dStats to get the data from
map.link=NULL, # Specify in a vector (e.g. "c('Subpopulation', 'Poly_Name')"... | /R/lmPlot.r | no_license | symanzik/R-micromap-package-development | R | false | false | 2,562 | r | lmplot <- function(stat.data, map.data=NULL, # Required -- statistical data; map data
panel.types, panel.data, # Required -- panel types (e.g. 'map', 'labels', 'dot.cl', etc.);
# which columns in dStats to get the data from
map.link=NULL, # Specify in a vector (e.g. "c('Subpopulation', 'Poly_Name')"... |
rawFileName<-'~/coursera/ExploratoryDataAnalysis/household_power_consumption.txt'
colTypes=c("character","character","numeric","numeric","numeric","numeric","numeric","numeric","numeric") ## Define types of the fields
data<-read.table(rawFileName, stringsAsFactors=F, sep=";", header=T, na.strings="?", colClasses=colTyp... | /plot1.R | no_license | melikovk/ExData_Plotting1 | R | false | false | 718 | r | rawFileName<-'~/coursera/ExploratoryDataAnalysis/household_power_consumption.txt'
colTypes=c("character","character","numeric","numeric","numeric","numeric","numeric","numeric","numeric") ## Define types of the fields
data<-read.table(rawFileName, stringsAsFactors=F, sep=";", header=T, na.strings="?", colClasses=colTyp... |
library("data.table")
path <- getwd()
download.file(url = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
, destfile = paste(path, "dataFiles.zip", sep = "/"))
unzip(zipfile = "dataFiles.zip")
SCC <- data.table::as.data.table(x = readRDS(file = "Source_Classification_Code.rds"))
NEI ... | /plot5.R | no_license | ShivangGandhi/Exploratory_Data_Analysis_Project2 | R | false | false | 1,036 | r | library("data.table")
path <- getwd()
download.file(url = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
, destfile = paste(path, "dataFiles.zip", sep = "/"))
unzip(zipfile = "dataFiles.zip")
SCC <- data.table::as.data.table(x = readRDS(file = "Source_Classification_Code.rds"))
NEI ... |
\name{DTW}
\alias{DTW}
\title{
Run the Dynamic Time Warping Algorithm on Two Trajectories
}
\description{
A function to calculate the dynamic time warping value between two trajectories.
}
\usage{
DTW(traj1, traj2, pointSpacing=-1)
}
\arguments{
\item{traj1}{
An m x n matrix containing trajectory1. Here... | /man/DTW.Rd | no_license | cynsky/SimilarityMeasures | R | false | false | 1,774 | rd | \name{DTW}
\alias{DTW}
\title{
Run the Dynamic Time Warping Algorithm on Two Trajectories
}
\description{
A function to calculate the dynamic time warping value between two trajectories.
}
\usage{
DTW(traj1, traj2, pointSpacing=-1)
}
\arguments{
\item{traj1}{
An m x n matrix containing trajectory1. Here... |
library(microbenchmark)
test.unit_argument <- function()
{
out <- try(microbenchmark(NULL, unit=a), silent = TRUE)
checkTrue(inherits(out, "try-error"))
}
test.unit_f <- function()
{
out <- try(print(microbenchmark(NULL, unit="f")), silent = TRUE)
checkTrue(!inherits(out, "try-error"))
}
test.unit_int <- fun... | /library/microbenchmark/unitTests/runit_test_regression.R | permissive | mayousif/Turbidity-Cleaner | R | false | false | 3,026 | r | library(microbenchmark)
test.unit_argument <- function()
{
out <- try(microbenchmark(NULL, unit=a), silent = TRUE)
checkTrue(inherits(out, "try-error"))
}
test.unit_f <- function()
{
out <- try(print(microbenchmark(NULL, unit="f")), silent = TRUE)
checkTrue(!inherits(out, "try-error"))
}
test.unit_int <- fun... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/shinyedge.R
\name{shinyedge}
\alias{shinyedge}
\title{Shiny interface to the edgebundle function}
\usage{
shinyedge(x)
}
\arguments{
\item{x}{an appropriately structured JSON file (see vignette for details) or a
square symmetric mat... | /man/shinyedge.Rd | no_license | gvanzin/edgebundleR | R | false | false | 464 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/shinyedge.R
\name{shinyedge}
\alias{shinyedge}
\title{Shiny interface to the edgebundle function}
\usage{
shinyedge(x)
}
\arguments{
\item{x}{an appropriately structured JSON file (see vignette for details) or a
square symmetric mat... |
library(plyr) #plyr needs to be loaded first so the summarize function is masked by dplyr
library(dplyr)
# Download and unzip the data ---------------------------------------------
temp <- tempfile() # create a temportary fils
url<-"https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zi... | /run_analysis.R | no_license | rppowel/Coursera-Getting-and-ceaning-up-data- | R | false | false | 3,486 | r | library(plyr) #plyr needs to be loaded first so the summarize function is masked by dplyr
library(dplyr)
# Download and unzip the data ---------------------------------------------
temp <- tempfile() # create a temportary fils
url<-"https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zi... |
\name{est.eLRT.distribution}
\alias{est.eLRT.distribution}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Estimation of the finite sample null distribution of eLRT
}
\description{
This function estimates the finite sample null distribution of eLRT, which is a mixure of zero and a scaled chi-squa... | /man/est.eLRT.distribution.Rd | no_license | JiyuanHu/MAFsnp | R | false | false | 1,609 | rd | \name{est.eLRT.distribution}
\alias{est.eLRT.distribution}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Estimation of the finite sample null distribution of eLRT
}
\description{
This function estimates the finite sample null distribution of eLRT, which is a mixure of zero and a scaled chi-squa... |
# Use built in datasets
# Use Tidyverse packages to
# - select variables
# - filter observations
# - create a new variable
# - create a summary
require(tidyverse)
data() #display list of datasets available in R
View(starwars)
#calculate body mass index for males and females
starwars %>%
select(gender, mass,... | /first/data analysis.R | no_license | weber77/R-programming | R | false | false | 530 | r | # Use built in datasets
# Use Tidyverse packages to
# - select variables
# - filter observations
# - create a new variable
# - create a summary
require(tidyverse)
data() #display list of datasets available in R
View(starwars)
#calculate body mass index for males and females
starwars %>%
select(gender, mass,... |
require(devtools)
require(testthat)
load_all()
options(error = NULL)
devtools::test()
devtools::build() # R CMD build afex --compact-vignettes="gs+qpdf"
document()
check()
test_package("afex", filter = "aov")
test_package("afex", filter = "mixed")
test_package("afex", filter = "mixed-structure")
test_package("afex", ... | /dev.R | no_license | rvlenth/afex | R | false | false | 1,588 | r | require(devtools)
require(testthat)
load_all()
options(error = NULL)
devtools::test()
devtools::build() # R CMD build afex --compact-vignettes="gs+qpdf"
document()
check()
test_package("afex", filter = "aov")
test_package("afex", filter = "mixed")
test_package("afex", filter = "mixed-structure")
test_package("afex", ... |
#!/usr/bin/env Rscript
library(ggplot2)
library(ggrepel)
library(grid)
args<-commandArgs(T)
pdf(args[3],height=10)
data = read.table(args[1],header=TRUE)
data2=read.table(args[2],header=TRUE)
a<-ggplot(data, aes(x=hyb_l2fc, y=par_l2fc))+
geom_point(aes(color=Category),size=1)+
scale_color_manual(values=c(CONSERVED="... | /workspace/CRISPR/mKO_FEF/species_specific/cis_trans/scatterplot2.r.2018070416 | no_license | ijayden-lung/hpc | R | false | false | 1,386 | 2018070416 | #!/usr/bin/env Rscript
library(ggplot2)
library(ggrepel)
library(grid)
args<-commandArgs(T)
pdf(args[3],height=10)
data = read.table(args[1],header=TRUE)
data2=read.table(args[2],header=TRUE)
a<-ggplot(data, aes(x=hyb_l2fc, y=par_l2fc))+
geom_point(aes(color=Category),size=1)+
scale_color_manual(values=c(CONSERVED="... |
library(BigginsTime)
context("Time")
test_that("23:59 almost midnight", {
expect_equal(as.Time(2359, "1920-1-5"), as.POSIXct(strptime("1920-1-5 23:59", "%Y-%m-%d %H:%M")))
})
| /tests/testthat/test_2359.R | no_license | sarotter/BigginsTime | R | false | false | 179 | r | library(BigginsTime)
context("Time")
test_that("23:59 almost midnight", {
expect_equal(as.Time(2359, "1920-1-5"), as.POSIXct(strptime("1920-1-5 23:59", "%Y-%m-%d %H:%M")))
})
|
#This script cleans up the radiative forcing CSV (adds regions) for final plotting
#Load CSV
data <- read.csv("1_Albedo_Exclosures/z_Data_Library/Radiative_Forcing_Estimates/Original_Data/rf_data_cleaned.csv", header = T)
#Load site data
sites <- read.csv("1_Albedo_Exclosures/z_Data_Li... | /1_Albedo_Exclosures/z_Data_Library/Radiative_Forcing_Estimates/Scripts/rf_data_cleaner.R | permissive | JamesDMSpeed/MooseAlbedo-C | R | false | false | 944 | r | #This script cleans up the radiative forcing CSV (adds regions) for final plotting
#Load CSV
data <- read.csv("1_Albedo_Exclosures/z_Data_Library/Radiative_Forcing_Estimates/Original_Data/rf_data_cleaned.csv", header = T)
#Load site data
sites <- read.csv("1_Albedo_Exclosures/z_Data_Li... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s.GLMNET.R
\name{s.GLMNET}
\alias{s.GLMNET}
\title{GLM with Elastic Net Regularization [C, R, S]}
\usage{
s.GLMNET(
x,
y = NULL,
x.test = NULL,
y.test = NULL,
x.name = NULL,
y.name = NULL,
grid.resample.rtset = rtset.resample("k... | /man/s.GLMNET.Rd | no_license | NourOmran393/rtemis | R | false | true | 7,282 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s.GLMNET.R
\name{s.GLMNET}
\alias{s.GLMNET}
\title{GLM with Elastic Net Regularization [C, R, S]}
\usage{
s.GLMNET(
x,
y = NULL,
x.test = NULL,
y.test = NULL,
x.name = NULL,
y.name = NULL,
grid.resample.rtset = rtset.resample("k... |
testlist <- list(beta = c(8.18711001407657e+299, 0.00468189194076409, 9.28697320897767e-257, -4.47313953005781e+269, -1.08462202709686e-247, -1.06960341877259e+114, -3.47955013064173e-216, -8.9518097672271e+215, 1.38348243341209e-136, 6.24605057871232e+181, -4.11367928127064e+80, NaN, 2.79007508688443e+291, -2.4367... | /issuestests/augSIMEX/inst/testfiles/scorecloglogcpp/scorecloglogcpp_output/log_9876d2ad29279429b54e3ce54082404d8b46ee30/scorecloglogcpp-test.R | no_license | akhikolla/RcppDeepStateTest | R | false | false | 10,387 | r | testlist <- list(beta = c(8.18711001407657e+299, 0.00468189194076409, 9.28697320897767e-257, -4.47313953005781e+269, -1.08462202709686e-247, -1.06960341877259e+114, -3.47955013064173e-216, -8.9518097672271e+215, 1.38348243341209e-136, 6.24605057871232e+181, -4.11367928127064e+80, NaN, 2.79007508688443e+291, -2.4367... |
#' Load a data frame
#'
#' Calculate triplet based on variant's chromosome sequence and position.
#' @param dataframe TO output dataframe to be loaded
#' @return A triplet change for variant.
#' @export
triplet <- function(dataframe){
for(i in 1:nrow(dataframe)){
if (nchar(dataframe$REF[i]) ==1){
datafram... | /R/triplet_and_triplet_frequency_calculation.R | no_license | Yang-w1/TnToClassifier | R | false | false | 1,905 | r | #' Load a data frame
#'
#' Calculate triplet based on variant's chromosome sequence and position.
#' @param dataframe TO output dataframe to be loaded
#' @return A triplet change for variant.
#' @export
triplet <- function(dataframe){
for(i in 1:nrow(dataframe)){
if (nchar(dataframe$REF[i]) ==1){
datafram... |
## Download file
fileURL <- "http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
if (!file.exists("data.zip")) {
download.file(fileURL, destfile="data.zip")
unzip("data.zip")
}
## Read data
tbl <- read.table("household_power_consumption.txt", header=T, sep=';', na.strings="?", colCl... | /plot1.R | no_license | linzhaowei/ExData_Plotting1 | R | false | false | 799 | r | ## Download file
fileURL <- "http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
if (!file.exists("data.zip")) {
download.file(fileURL, destfile="data.zip")
unzip("data.zip")
}
## Read data
tbl <- read.table("household_power_consumption.txt", header=T, sep=';', na.strings="?", colCl... |
#' Plot smoothed curve
#'
#' The function plots a smoothed curve using the \code{\link{convolve}} function.
#'
#' @param X numeric array
#' @param Y numeric array
#' @param window numeric value indicating size of window to use
#' @param xlab string of x-axis label
#' @param ylab string of y-axis label
... | /R/conv_smoother.R | no_license | johnlee4/EGAD | R | false | false | 1,862 | r | #' Plot smoothed curve
#'
#' The function plots a smoothed curve using the \code{\link{convolve}} function.
#'
#' @param X numeric array
#' @param Y numeric array
#' @param window numeric value indicating size of window to use
#' @param xlab string of x-axis label
#' @param ylab string of y-axis label
... |
## ----LoadPkg, eval=FALSE------------------------------------------------------
# install.packages("devtools")
# library(devtools)
# install_github("leppott/ContDataQC")
## ----LoadDependencies, eval=FALSE---------------------------------------------
# # install all dependant libraries manually
# # libraries to ... | /vignettes/Vignette_ContDataQC.R | permissive | Matt-newby/ContDataQC | R | false | false | 39,652 | r | ## ----LoadPkg, eval=FALSE------------------------------------------------------
# install.packages("devtools")
# library(devtools)
# install_github("leppott/ContDataQC")
## ----LoadDependencies, eval=FALSE---------------------------------------------
# # install all dependant libraries manually
# # libraries to ... |
library(sf)
library(cartography)
# path to the geopackage file embedded in cartography
path_to_gpkg <- system.file("gpkg/mtq.gpkg", package="cartography")
# import to an sf object
mtq <- st_read(dsn = path_to_gpkg, quiet = TRUE)
# path to the csv file embedded in cartography
path_to_csv <- system.file("csv/mob.csv", ... | /projekt1/maps_with_legends/flows.R | no_license | SawickiBartosz/Data_visualization_project_1 | R | false | false | 1,289 | r | library(sf)
library(cartography)
# path to the geopackage file embedded in cartography
path_to_gpkg <- system.file("gpkg/mtq.gpkg", package="cartography")
# import to an sf object
mtq <- st_read(dsn = path_to_gpkg, quiet = TRUE)
# path to the csv file embedded in cartography
path_to_csv <- system.file("csv/mob.csv", ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multinomial_likelihood.R
\name{multinomial_log_likelihood}
\alias{multinomial_log_likelihood}
\title{Computes the log likelihood for multinomial regression}
\usage{
multinomial_log_likelihood(y, X, b_vector)
}
\arguments{
\item{y}{an (n x (k-... | /man/multinomial_log_likelihood.Rd | no_license | group-wine/sommelieR | R | false | true | 838 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multinomial_likelihood.R
\name{multinomial_log_likelihood}
\alias{multinomial_log_likelihood}
\title{Computes the log likelihood for multinomial regression}
\usage{
multinomial_log_likelihood(y, X, b_vector)
}
\arguments{
\item{y}{an (n x (k-... |
################################################################################
### Graph: COVID-19 Total Cases
################################################################################
### The current number of total cases
total_num <-
cases_data %>%
tail(n = 1) %>%
pull("total_cases") %>%
format(big... | /graphs/total_cases.R | no_license | VinayArora404219/TN_COVID | R | false | false | 1,420 | r | ################################################################################
### Graph: COVID-19 Total Cases
################################################################################
### The current number of total cases
total_num <-
cases_data %>%
tail(n = 1) %>%
pull("total_cases") %>%
format(big... |
testlist <- list(doy = c(4.62595082430429e-312, 3.64097969159734e-277, -0.427429395729092, 2.09887675795476e-104, 1.55322770574539e-47, 1.45474215376015e+135, 3.56441595774554e+114, -2.64525441665141e+303, -9.52682579807939e+139, -3.98397314603138e+183, -1.77863325536183e+126, 6.42851301544252e-310, 1.6601383076532... | /meteor/inst/testfiles/Photoperiod/AFL_Photoperiod/Photoperiod_valgrind_files/1615769256-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 683 | r | testlist <- list(doy = c(4.62595082430429e-312, 3.64097969159734e-277, -0.427429395729092, 2.09887675795476e-104, 1.55322770574539e-47, 1.45474215376015e+135, 3.56441595774554e+114, -2.64525441665141e+303, -9.52682579807939e+139, -3.98397314603138e+183, -1.77863325536183e+126, 6.42851301544252e-310, 1.6601383076532... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(5.43230949079205e-312, 9.12488123524439e+192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 6:5))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
str(result) | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615772876-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 301 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(5.43230949079205e-312, 9.12488123524439e+192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 6:5))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
str(result) |
#################################################################################
##
## R package rugarch by Alexios Ghalanos Copyright (C) 2008-2013.
## This file is part of the R package rugarch.
##
## The R package rugarch is free software: you can redistribute it and/or modify
## it under the terms of... | /R/arfima-methods.R | no_license | samedii/rugarch | R | false | false | 43,873 | r | #################################################################################
##
## R package rugarch by Alexios Ghalanos Copyright (C) 2008-2013.
## This file is part of the R package rugarch.
##
## The R package rugarch is free software: you can redistribute it and/or modify
## it under the terms of... |
library(tidyverse)
library(lubridate)
library(rvest)
library(RMySQL)
con <- dbConnect(MySQL(),
host='localhost',
dbname='cycling',
user='jalnichols',
password='braves')
#
LIMIT = 100
DATES1 = c('2021-12-31', "2020-12-31", "2019-12-31", "2018-12-31"... | /Scrape PCS Rider Attrs.R | no_license | jalnichols/p-c | R | false | false | 4,229 | r |
library(tidyverse)
library(lubridate)
library(rvest)
library(RMySQL)
con <- dbConnect(MySQL(),
host='localhost',
dbname='cycling',
user='jalnichols',
password='braves')
#
LIMIT = 100
DATES1 = c('2021-12-31', "2020-12-31", "2019-12-31", "2018-12-31"... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trophicFit.R
\name{trophicFit_H2test}
\alias{trophicFit_H2test}
\title{Function to fit H2test model}
\usage{
trophicFit_H2test(data, ...)
}
\arguments{
\item{data}{an object used to select a method}
}
\description{
Estimate Bayesian Holling t... | /man/trophicFit_H2test.Rd | no_license | virgile-baudrot/trophicR | R | false | true | 373 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trophicFit.R
\name{trophicFit_H2test}
\alias{trophicFit_H2test}
\title{Function to fit H2test model}
\usage{
trophicFit_H2test(data, ...)
}
\arguments{
\item{data}{an object used to select a method}
}
\description{
Estimate Bayesian Holling t... |
#' Pairwise Chi-squared distances
#'
#' Computes the Chi-squared distances between all pairs of data point given
#'
#'
#' @param A A data matrix where each row is a different data point
#' @param B A data matrix where each row is a different data point. If this
#' matrix is the same as X, pairwise distances for all ... | /R/chiDist2.R | no_license | FunderBolt/SNFtool | R | false | false | 1,608 | r | #' Pairwise Chi-squared distances
#'
#' Computes the Chi-squared distances between all pairs of data point given
#'
#'
#' @param A A data matrix where each row is a different data point
#' @param B A data matrix where each row is a different data point. If this
#' matrix is the same as X, pairwise distances for all ... |
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), ra = numeric(0), relh = numeric(0), rs = numeric(0), temp = c(-3.02610044756979e-306, 2.06428206456318e-309, -7.42673683318685e-304, 5.14291266095585e+25, 3.09829366178653e+227, NaN, 4.73790921722628e+226, 9.07655807768239e+223, 3.... | /meteor/inst/testfiles/ET0_PenmanMonteith/libFuzzer_ET0_PenmanMonteith/ET0_PenmanMonteith_valgrind_files/1612736956-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 672 | r | testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), ra = numeric(0), relh = numeric(0), rs = numeric(0), temp = c(-3.02610044756979e-306, 2.06428206456318e-309, -7.42673683318685e-304, 5.14291266095585e+25, 3.09829366178653e+227, NaN, 4.73790921722628e+226, 9.07655807768239e+223, 3.... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
invcashed <- NULL
set <- function(y) {
x <<- y
invcashed <<- NULL
}
get <- function() x
invset <- function(inv) invcashed <... | /cachematrix.R | no_license | alfathi/ProgrammingAssignment2 | R | false | false | 705 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
invcashed <- NULL
set <- function(y) {
x <<- y
invcashed <<- NULL
}
get <- function() x
invset <- function(inv) invcashed <... |
testlist <- list(b = c(-2147483475L, -1667457892L, -852010L, -1131245043L, -1835887972L))
result <- do.call(mcga:::ByteVectorToDoubles,testlist)
str(result) | /mcga/inst/testfiles/ByteVectorToDoubles/AFL_ByteVectorToDoubles/ByteVectorToDoubles_valgrind_files/1613109055-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 157 | r | testlist <- list(b = c(-2147483475L, -1667457892L, -852010L, -1131245043L, -1835887972L))
result <- do.call(mcga:::ByteVectorToDoubles,testlist)
str(result) |
args=commandArgs(trailingOnly=T)
chr=args[1]
sub=args[2]
pr_dir=args[3]
output=args[4]
rdata_dir=args[5]
cvblup_dir=args[6]
tool_dir=args[7]
load(rdata_dir)
source(paste(tool_dir,'make_smartsva.R',sep=""))
exp_genes=gnames
library(phenix)
g=read.table(paste(cvblup_dir,sep=""),header=T,check.names=F)
pr=read.table(pr_di... | /scripts/cal_cor_covar.r | no_license | xuanyao/GBAT | R | false | false | 1,570 | r | args=commandArgs(trailingOnly=T)
chr=args[1]
sub=args[2]
pr_dir=args[3]
output=args[4]
rdata_dir=args[5]
cvblup_dir=args[6]
tool_dir=args[7]
load(rdata_dir)
source(paste(tool_dir,'make_smartsva.R',sep=""))
exp_genes=gnames
library(phenix)
g=read.table(paste(cvblup_dir,sep=""),header=T,check.names=F)
pr=read.table(pr_di... |
library(GGally)
library(ggplot2)
x<-iris[,-5]
ggpairs(iris[,-5])+ theme_bw()
df <- iris
splom(~x,groups=NULL, data=x,axis.line.tck=0,axis.text.alpha=0, col="blue")
| /exp12.r | no_license | Shreyas-Ramesh/dsr | R | false | false | 170 | r | library(GGally)
library(ggplot2)
x<-iris[,-5]
ggpairs(iris[,-5])+ theme_bw()
df <- iris
splom(~x,groups=NULL, data=x,axis.line.tck=0,axis.text.alpha=0, col="blue")
|
suppressMessages(library(tidyverse)) #1.3.0
suppressMessages(library(stringr)) #1.4.0
setwd("/Users/angelmg/Documents/nci_vb_git/felber_covid_vaccine/code")
df <- read.csv("../results/naive_dataset.csv", header = TRUE)
genes_of_interest <- read.csv("../data/genes_of_interest.csv", header = TRUE)
annot <- read.csv(".... | /code/naive_diff_counts.R | no_license | NCI-VB/felber_covid_vaccine | R | false | false | 3,036 | r |
suppressMessages(library(tidyverse)) #1.3.0
suppressMessages(library(stringr)) #1.4.0
setwd("/Users/angelmg/Documents/nci_vb_git/felber_covid_vaccine/code")
df <- read.csv("../results/naive_dataset.csv", header = TRUE)
genes_of_interest <- read.csv("../data/genes_of_interest.csv", header = TRUE)
annot <- read.csv(".... |
library(lmomRFA)
### Name: regsamlmu
### Title: Sample L-moments of multiple data sets
### Aliases: regsamlmu
### Keywords: misc
### ** Examples
data(Maxwind) # a list
regsamlmu(Maxwind)
data(airquality) # a data frame
regsamlmu(airquality[1:4])
| /data/genthat_extracted_code/lmomRFA/examples/regsamlmu.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 263 | r | library(lmomRFA)
### Name: regsamlmu
### Title: Sample L-moments of multiple data sets
### Aliases: regsamlmu
### Keywords: misc
### ** Examples
data(Maxwind) # a list
regsamlmu(Maxwind)
data(airquality) # a data frame
regsamlmu(airquality[1:4])
|
## create data folder
if(!file.exists("./data")){
dir.create("data")
}
#download file
filename = "./data/household_power_consumption.zip"
if (!file.exists(filename)) {
## download url and destination file
file.url <- 'https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip'
file.dest ... | /plot_1.R | no_license | yinyanguo56/ExData_Plotting1 | R | false | false | 1,412 | r |
## create data folder
if(!file.exists("./data")){
dir.create("data")
}
#download file
filename = "./data/household_power_consumption.zip"
if (!file.exists(filename)) {
## download url and destination file
file.url <- 'https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip'
file.dest ... |
#Headline:
#Singaporeans' HDB predicament: HDB dilemma for the future
#The problem:
#A. If HDB prices were to drop back to the early 2000s, home owners would potentially lose half their asset value
#B. If HDB prices were to keep increasing, will the future generations be able to afford houses?
#Level 1
libr... | /Visualization 3.R | no_license | Muhd-Naufal/Project | R | false | false | 2,989 | r | #Headline:
#Singaporeans' HDB predicament: HDB dilemma for the future
#The problem:
#A. If HDB prices were to drop back to the early 2000s, home owners would potentially lose half their asset value
#B. If HDB prices were to keep increasing, will the future generations be able to afford houses?
#Level 1
libr... |
#' nsdm.map
#'
#' Fill empty template rasters with predicted values
#'
#' @param template An empty raster layer to fill with predicted values
#' @param nona_ix Numeric indices of cells that should be filled with predicted values
#' @param pred List containing vectors of fitted values (one list by modelling algorithm)
#... | /scripts/nsdm-project/functions/R/nsdm.map.R | permissive | N-SDM/N-SDM | R | false | false | 2,055 | r | #' nsdm.map
#'
#' Fill empty template rasters with predicted values
#'
#' @param template An empty raster layer to fill with predicted values
#' @param nona_ix Numeric indices of cells that should be filled with predicted values
#' @param pred List containing vectors of fitted values (one list by modelling algorithm)
#... |
# For RSDA package
tbl_subset_col <- function(x, j, j_arg) {
if (is.null(j)) return(x)
j <- vectbl_as_col_location(j, length(x), names(x), j_arg = j_arg, assign = FALSE)
if (anyNA(j)) {
cnd_signal(error_na_column_index(which(is.na(j))))
}
xo <- .subset(x, j)
if (anyDuplicated(j)) {
xo <- set_repa... | /R/legacy-compat.R | permissive | romainfrancois/tibble | R | false | false | 432 | r | # For RSDA package
tbl_subset_col <- function(x, j, j_arg) {
if (is.null(j)) return(x)
j <- vectbl_as_col_location(j, length(x), names(x), j_arg = j_arg, assign = FALSE)
if (anyNA(j)) {
cnd_signal(error_na_column_index(which(is.na(j))))
}
xo <- .subset(x, j)
if (anyDuplicated(j)) {
xo <- set_repa... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary.R
\name{summary.neuronlist}
\alias{summary.neuronlist}
\alias{summary}
\alias{summary.neuron}
\alias{summary.dotprops}
\title{Summary statistics for neurons (e.g. cable length, number of nodes)}
\usage{
\method{summary}{neuronlist}(ob... | /man/summary.neuron.Rd | no_license | tomka/nat | R | false | true | 1,895 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary.R
\name{summary.neuronlist}
\alias{summary.neuronlist}
\alias{summary}
\alias{summary.neuron}
\alias{summary.dotprops}
\title{Summary statistics for neurons (e.g. cable length, number of nodes)}
\usage{
\method{summary}{neuronlist}(ob... |
source("~/Desktop/Colgate/github/hemlock_cores/cores_organizer.R")
div1 <- read.csv("div1.txt")
div1$year <- as.numeric(substr(as.character(div1$YearMonth), 1,4))
div1$month <- as.numeric(substr(as.character(div1$YearMonth), 5,6))
summer <- div1[div1$month >=6& div1$month <= 8, ]
sum_c <- aggregate(summer$TAVG, by ... | /analysis.R | no_license | gcooney29/hemlock_cores | R | false | false | 1,043 | r |
source("~/Desktop/Colgate/github/hemlock_cores/cores_organizer.R")
div1 <- read.csv("div1.txt")
div1$year <- as.numeric(substr(as.character(div1$YearMonth), 1,4))
div1$month <- as.numeric(substr(as.character(div1$YearMonth), 5,6))
summer <- div1[div1$month >=6& div1$month <= 8, ]
sum_c <- aggregate(summer$TAVG, by ... |
delta.error.loop <- function(g) {
if (g$method=="harmonic2") {
z <- g$fit[[1]]
rss <- sum(z$residuals^2)
p <- z$rank
p1 <- 1L:p
resvar1 <- rss/z$df.residual
R1 <- chol2inv(z$qr$qr[p1, p1, drop = FALSE])
se1 <- sqrt(diag(R1) * resvar1)
z2 <- g$fit[[2]]
rss <- sum(z2$residuals^2)
p <- z2$ran... | /R/delta.error.loop.R | no_license | cran/hysteresis | R | false | false | 2,924 | r | delta.error.loop <- function(g) {
if (g$method=="harmonic2") {
z <- g$fit[[1]]
rss <- sum(z$residuals^2)
p <- z$rank
p1 <- 1L:p
resvar1 <- rss/z$df.residual
R1 <- chol2inv(z$qr$qr[p1, p1, drop = FALSE])
se1 <- sqrt(diag(R1) * resvar1)
z2 <- g$fit[[2]]
rss <- sum(z2$residuals^2)
p <- z2$ran... |
readSpc <- function(file,filename=TRUE){
if(length(file)==1)
return(readSpcS(file))
else{
tsl <- list()
for(i in 1:length(file)){
tsl[[i]] <- readSpcS(file[i])
}
return(new("x12Batch",tsList=tsl))
}
}
readSpcS <- function(file,filename=TRUE){
whichgrep <- function(x,txt){
which(u... | /R/readSpc.R | no_license | statistikat/x12 | R | false | false | 12,019 | r | readSpc <- function(file,filename=TRUE){
if(length(file)==1)
return(readSpcS(file))
else{
tsl <- list()
for(i in 1:length(file)){
tsl[[i]] <- readSpcS(file[i])
}
return(new("x12Batch",tsList=tsl))
}
}
readSpcS <- function(file,filename=TRUE){
whichgrep <- function(x,txt){
which(u... |
#!/usr/bin/Rscript
# This script is used to find the linear approximation, and associated
# values, from a batch of csv files. Each file is expected to have a
# header of 13 lines listing info about the trial run, followed by
# 100 rows of n columns of data.
#
# @author trevmo
FindLinearApprox <- function (x... | /r_scripts/linear_approx.R | no_license | trevmo/ga_research | R | false | false | 2,213 | r | #!/usr/bin/Rscript
# This script is used to find the linear approximation, and associated
# values, from a batch of csv files. Each file is expected to have a
# header of 13 lines listing info about the trial run, followed by
# 100 rows of n columns of data.
#
# @author trevmo
FindLinearApprox <- function (x... |
# TEst
browseURL("http://www.google.com") | /testFile.R | no_license | Erokan/R-Statistics-Essential-Training | R | false | false | 41 | r | # TEst
browseURL("http://www.google.com") |
\name{amMatrix}
\alias{amMatrix}
\title{
Produce a dissimilarity matrix for pairs of multilocus genotypes
}
\description{
Given an amDataset object find the dissimilarities between pairs of multilocus genotypes, taking
missing data into account.
}
\usage{
amMatrix(
amDatasetFocal,
missingMeth... | /man/amMatrix.Rd | no_license | cran/allelematch | R | false | false | 1,862 | rd | \name{amMatrix}
\alias{amMatrix}
\title{
Produce a dissimilarity matrix for pairs of multilocus genotypes
}
\description{
Given an amDataset object find the dissimilarities between pairs of multilocus genotypes, taking
missing data into account.
}
\usage{
amMatrix(
amDatasetFocal,
missingMeth... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3121
c
c Performing A1-Autarky iteration.
c Running Lingeling ...
c
c Remaining clauses count after A-Reduction: 3121
c
c Input Parameter (command line, fil... | /code/dcnf-ankit-optimized/Results/DQBF-TRACK-2018/E1+A1/Experiments/bloem_ifm_amba03_fixed_o/bloem_ifm_amba03_fixed_o.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 700 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3121
c
c Performing A1-Autarky iteration.
c Running Lingeling ...
c
c Remaining clauses count after A-Reduction: 3121
c
c Input Parameter (command line, fil... |
#Biostats Homework
#Kim Daniels
#24_02_2020
##Create Script of Functions
library() #Loads packages
read_delim()#Reads in comma delimited files
head() #generates a tibble of first 6 rows
tail() #generates a tibble of last 6 rows
tail() #shows the bottom 12 rows
glimpse() #generates an overview of the dataset
view() #op... | /Homework 24_02_20.R | no_license | danielsk123/Intro_R_2020 | R | false | false | 2,536 | r | #Biostats Homework
#Kim Daniels
#24_02_2020
##Create Script of Functions
library() #Loads packages
read_delim()#Reads in comma delimited files
head() #generates a tibble of first 6 rows
tail() #generates a tibble of last 6 rows
tail() #shows the bottom 12 rows
glimpse() #generates an overview of the dataset
view() #op... |
rm(list = ls())
pCancer = read.csv('prostate_cancer.csv')
attach(pCancer)
# Below graphs show that psa can be made linear with a log transformation.
plot(psa)
plot(log(psa))
y = log(psa)
# No linear relationship here
plot(cancervol, y)
# Log transformation more linear
plot(log(cancervol), y)
fit1 = lm(y ~ log(canc... | /Senior/Fall_2019/CS6313/Miniproject_6/q1.R | no_license | dscrawford/homework | R | false | false | 2,412 | r | rm(list = ls())
pCancer = read.csv('prostate_cancer.csv')
attach(pCancer)
# Below graphs show that psa can be made linear with a log transformation.
plot(psa)
plot(log(psa))
y = log(psa)
# No linear relationship here
plot(cancervol, y)
# Log transformation more linear
plot(log(cancervol), y)
fit1 = lm(y ~ log(canc... |
read_source <- function(x) {
x <- httr::GET(x)
httr::warn_for_status(x)
httr::content(x, as = "text", encoding = "UTF-8")
}
is_id <- function(x) {
x <- gsub("\\s|/", "", x)
nchar(gsub("\\d", "", x)) == 0
}
is_token_configured <- function() {
if (exists(".rtweet_token_config")) {
return(get("rtweet_to... | /R/utils.R | permissive | Maeterp/mocktwitter | R | false | false | 1,379 | r | read_source <- function(x) {
x <- httr::GET(x)
httr::warn_for_status(x)
httr::content(x, as = "text", encoding = "UTF-8")
}
is_id <- function(x) {
x <- gsub("\\s|/", "", x)
nchar(gsub("\\d", "", x)) == 0
}
is_token_configured <- function() {
if (exists(".rtweet_token_config")) {
return(get("rtweet_to... |
/B6.R | no_license | camilamedeiros/RBootcamp | R | false | false | 1,663 | r | ||
##' Remove precipitation zeros by setting them to NA
##'
##' \code{unzero} eliminates zero precipitation data from the bias
##' correction by setting zero values to NA, which is ignored.
##' \code{rezero} sets NA values back to zero after bias correction.
##'
##' The zeros in precipitation data cause problems for distr... | /flyingpigeon/Rsrc/climod/unzero.R | permissive | Ouranosinc/flyingpigeon | R | false | false | 1,955 | r | ##' Remove precipitation zeros by setting them to NA
##'
##' \code{unzero} eliminates zero precipitation data from the bias
##' correction by setting zero values to NA, which is ignored.
##' \code{rezero} sets NA values back to zero after bias correction.
##'
##' The zeros in precipitation data cause problems for distr... |
library(VaRES)
### Name: explog
### Title: Exponential logarithmic distribution
### Aliases: dexplog pexplog varexplog esexplog
### Keywords: Value at risk, expected shortfall
### ** Examples
x=runif(10,min=0,max=1)
dexplog(x)
pexplog(x)
varexplog(x)
esexplog(x)
| /data/genthat_extracted_code/VaRES/examples/explog.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 268 | r | library(VaRES)
### Name: explog
### Title: Exponential logarithmic distribution
### Aliases: dexplog pexplog varexplog esexplog
### Keywords: Value at risk, expected shortfall
### ** Examples
x=runif(10,min=0,max=1)
dexplog(x)
pexplog(x)
varexplog(x)
esexplog(x)
|
## Started March 29 2017 ##
## By Nicole ##
##cleaning for chambergraphs
## general housekeeping ##
rm(list=ls())
options(stringsAsFactors = FALSE)
## libraries
library(ggplot2)
require(plyr); require(dplyr); require(tidyr)
# Set working directory:
if(length(grep("Lizzie", getwd())>0)) { setwd("~/Documents/git/... | /analyses/chambercleaning.R | no_license | lizzieinvancouver/heattolerance | R | false | false | 9,776 | r | ## Started March 29 2017 ##
## By Nicole ##
##cleaning for chambergraphs
## general housekeeping ##
rm(list=ls())
options(stringsAsFactors = FALSE)
## libraries
library(ggplot2)
require(plyr); require(dplyr); require(tidyr)
# Set working directory:
if(length(grep("Lizzie", getwd())>0)) { setwd("~/Documents/git/... |
# Load packages
library(boral)
# Read in data
data <- read.csv("Fungi_Compiled.csv")
PA <- data[,1:11]
Env <- data[,12:23]
# model
system.time(
JSDM <- boral(PA, # PA data
X = Env, # Covariates, DO NOT INCLUDE INTERCEPT COLUMN
family = "binomial", # makes model use PA data, probi... | /Boral - Fungi - NP/boralJSDM.R | no_license | dansmi-hub/JSDM_Inference | R | false | false | 1,063 | r | # Load packages
library(boral)
# Read in data
data <- read.csv("Fungi_Compiled.csv")
PA <- data[,1:11]
Env <- data[,12:23]
# model
system.time(
JSDM <- boral(PA, # PA data
X = Env, # Covariates, DO NOT INCLUDE INTERCEPT COLUMN
family = "binomial", # makes model use PA data, probi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/smooth-package.R
\docType{package}
\name{smooth}
\alias{smooth}
\title{Smooth package}
\description{
Package contains functions implementing Single Source of Error state space models for
purposes of time series analysis and forecasting.
}
\de... | /man/smooth.Rd | no_license | s-spavound/smooth | R | false | true | 5,511 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/smooth-package.R
\docType{package}
\name{smooth}
\alias{smooth}
\title{Smooth package}
\description{
Package contains functions implementing Single Source of Error state space models for
purposes of time series analysis and forecasting.
}
\de... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom-crossbarh.R, R/geom-errorbarh.R,
% R/geom-linerangeh.R, R/geom-pointrangeh.R
\name{geom_crossbarh}
\alias{geom_crossbarh}
\alias{geom_errorbarh}
\alias{geom_linerangeh}
\alias{geom_pointrangeh}
\title{Horizontal intervals: lines, cross... | /man/geom_linerangeh.Rd | no_license | lionel-/ggstance | R | false | true | 5,575 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom-crossbarh.R, R/geom-errorbarh.R,
% R/geom-linerangeh.R, R/geom-pointrangeh.R
\name{geom_crossbarh}
\alias{geom_crossbarh}
\alias{geom_errorbarh}
\alias{geom_linerangeh}
\alias{geom_pointrangeh}
\title{Horizontal intervals: lines, cross... |
#' Call site coordinates and hierarchy from DATIM via API
#'
#' @description Adapted from J.Pickering's DATIM Vaidation package - datimvalidation::getOrganisationUnitMap(). Prior to running, you MUST run datimvalidation::loadSecrets()
#'
#' @param organisationUnit what is the UID for the country you would like site co... | /R/wpm_getcoords.R | no_license | USAID-OHA-SI/WeekendSpecial | R | false | false | 3,593 | r | #' Call site coordinates and hierarchy from DATIM via API
#'
#' @description Adapted from J.Pickering's DATIM Vaidation package - datimvalidation::getOrganisationUnitMap(). Prior to running, you MUST run datimvalidation::loadSecrets()
#'
#' @param organisationUnit what is the UID for the country you would like site co... |
#82fc4cc0c0ba42608845036022e0975b
Current data for all states, counties, or metros
These endpoints contain the latest available data (a single, scalar value per field) for all states, counties, and CBSAs (metros).
Each file contains all locations in the region type. For example, https://api.covidactnow.org... | /scripts/api_calls.R | permissive | NCRivera/CIS-627-Big-Data-Analytics-Capstone | R | false | false | 2,665 | r | #82fc4cc0c0ba42608845036022e0975b
Current data for all states, counties, or metros
These endpoints contain the latest available data (a single, scalar value per field) for all states, counties, and CBSAs (metros).
Each file contains all locations in the region type. For example, https://api.covidactnow.org... |
library(shiny)
library(dplyr)
library(googleVis)
recentData <- read.csv("www/data/Most_Recent_Scorecard_Data.csv", stringsAsFactors = FALSE)
myData <- recentData %>% filter(SATWRMID != "NULL")
suppressWarnings({
myData <- myData %>% mutate(SATVR25 = as.numeric(SATVR25),
SATV... | /server.R | no_license | rupendrab/univsearch | R | false | false | 6,202 | r | library(shiny)
library(dplyr)
library(googleVis)
recentData <- read.csv("www/data/Most_Recent_Scorecard_Data.csv", stringsAsFactors = FALSE)
myData <- recentData %>% filter(SATWRMID != "NULL")
suppressWarnings({
myData <- myData %>% mutate(SATVR25 = as.numeric(SATVR25),
SATV... |
# --- Preparation --- #
# Reading in required libraries
library("car")
library("ggpubr")
library("dplyr")
# Setting working directory
setwd("...")
# --- Task 1 --- #
# Reading int the given data
table1 = read.table("choldata.csv")
# Creating a model of cholesterol to triglyceride
fit1 = lm(table1$cholesterol ~ ta... | /Seminar 2/Seminar2_Task1.R | no_license | Dashtid/Statistics | R | false | false | 2,649 | r | # --- Preparation --- #
# Reading in required libraries
library("car")
library("ggpubr")
library("dplyr")
# Setting working directory
setwd("...")
# --- Task 1 --- #
# Reading int the given data
table1 = read.table("choldata.csv")
# Creating a model of cholesterol to triglyceride
fit1 = lm(table1$cholesterol ~ ta... |
# [1] 4075
# user system elapsed
# 0.400 0.000 0.399
main <- function(){
pmt <- proc.time()
library(combinat)
count <- 0
for(n in seq(100)){
for(m in seq(100)){
if(nCm(n,m)>1e6){
count <- count+1
}
}
}
print(count)
proc.time()-pm... | /p53.R | no_license | benjamin22-314/Project-Euler-in-R | R | false | false | 323 | r | # [1] 4075
# user system elapsed
# 0.400 0.000 0.399
main <- function(){
pmt <- proc.time()
library(combinat)
count <- 0
for(n in seq(100)){
for(m in seq(100)){
if(nCm(n,m)>1e6){
count <- count+1
}
}
}
print(count)
proc.time()-pm... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_grattan_colours.R
\docType{data}
\name{grattan_black}
\alias{grattan_black}
\title{'}
\format{
An object of class \code{character} of length 1.
}
\usage{
grattan_black
}
\description{
'
}
\keyword{datasets}
| /man/grattan_black.Rd | permissive | MattCowgill/grattantheme | R | false | true | 292 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_grattan_colours.R
\docType{data}
\name{grattan_black}
\alias{grattan_black}
\title{'}
\format{
An object of class \code{character} of length 1.
}
\usage{
grattan_black
}
\description{
'
}
\keyword{datasets}
|
Pcut = 0.0001
#library(KEGGREST)
#install.packages("https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v033i01/glmnet_1.1-4.tar.gz", repos=NULL, method="libcurl")
#install.packages("https://cran.r-project.org/src/contrib/doMC_1.3.5.tar.gz", repos=NULL, method="libcurl")
library(GenomicRanges)
library(gl... | /r/model/07_Flipped_models.r | no_license | veerdonk/internship1 | R | false | false | 19,212 | r | Pcut = 0.0001
#library(KEGGREST)
#install.packages("https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v033i01/glmnet_1.1-4.tar.gz", repos=NULL, method="libcurl")
#install.packages("https://cran.r-project.org/src/contrib/doMC_1.3.5.tar.gz", repos=NULL, method="libcurl")
library(GenomicRanges)
library(gl... |
\name{mpIM}
\alias{mpIM}
\title{(Composite) Interval Mapping for QTL detection in multi-parent crosses}
\usage{
mpIM(baseModel, object, pheno, idname = "id", threshold = 0.001, chr,
step = 0, responsename = "predmn", ncov = 1000, window = 10,
mrkpos = TRUE, ...)
}
\arguments{
\item{baseModel}{Base phenot... | /man/mpIM.Rd | no_license | JulongWei/mpMap | R | false | false | 4,344 | rd | \name{mpIM}
\alias{mpIM}
\title{(Composite) Interval Mapping for QTL detection in multi-parent crosses}
\usage{
mpIM(baseModel, object, pheno, idname = "id", threshold = 0.001, chr,
step = 0, responsename = "predmn", ncov = 1000, window = 10,
mrkpos = TRUE, ...)
}
\arguments{
\item{baseModel}{Base phenot... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dist2root.R
\name{dist2root}
\alias{dist2root}
\title{Root to tip distance}
\usage{
dist2root(tre)
}
\arguments{
\item{tre}{phylo tree}
}
\description{
Root to tip distance
}
| /man/dist2root.Rd | no_license | slevu/garel | R | false | true | 253 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dist2root.R
\name{dist2root}
\alias{dist2root}
\title{Root to tip distance}
\usage{
dist2root(tre)
}
\arguments{
\item{tre}{phylo tree}
}
\description{
Root to tip distance
}
|
library(dplyr)
#devtools::install_github("cran/glmnet")
library(glmnet)
library(sp)
library(ggplot2)
library(MASS)
#devtools::install_github("cran/plotmo")
library(gamlss)
# Model is tied to variable names used to fit it, so write custom predict function for convenience
# computeResidual = function(xobs, yobs){
# yp... | /vignettes/distance_fit.R | no_license | ilanfri/mlCars | R | false | false | 13,392 | r | library(dplyr)
#devtools::install_github("cran/glmnet")
library(glmnet)
library(sp)
library(ggplot2)
library(MASS)
#devtools::install_github("cran/plotmo")
library(gamlss)
# Model is tied to variable names used to fit it, so write custom predict function for convenience
# computeResidual = function(xobs, yobs){
# yp... |
library(readr)
library(here)
file <- read_lines(here("R", "simulation_file.R"))
for (i in 1:7) {
f <- file
f[24] <- paste0("k <- ", 7 + i)
f[48] <- paste0("complexity <- ", 7 - i)
write_lines(f, path = here("R", paste0("simulation_", i, ".R")))
}
file <- read_lines(here("scripts", "run.sh"))
for (i in 1:7) {
... | /R/run_simulation.R | no_license | HectorRDB/PH290-Final-Project | R | false | false | 456 | r | library(readr)
library(here)
file <- read_lines(here("R", "simulation_file.R"))
for (i in 1:7) {
f <- file
f[24] <- paste0("k <- ", 7 + i)
f[48] <- paste0("complexity <- ", 7 - i)
write_lines(f, path = here("R", paste0("simulation_", i, ".R")))
}
file <- read_lines(here("scripts", "run.sh"))
for (i in 1:7) {
... |
rankall <- function(outcome, num = "best") {
## Read outcome data
data <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
## Check that outcome is valid
outcomes <- c("heart attack", "heart failure", "pneumonia")
if (!outcome %in% outcomes) {
stop("invalid outcome")
... | /course2week4_r_programming/rankall.R | no_license | philmassie/coursera_data_science | R | false | false | 1,961 | r | rankall <- function(outcome, num = "best") {
## Read outcome data
data <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
## Check that outcome is valid
outcomes <- c("heart attack", "heart failure", "pneumonia")
if (!outcome %in% outcomes) {
stop("invalid outcome")
... |
#' A clustering function
#'
#'This function creates the clustering results from the pipeline
#'Run this function after the graph wavelets
#'@param pd number of nodes in Laplacian
#'@param scales number of scales to consider
#'@param Wave is the wavelet parameter (run from graph.wavelet)
#'
#'
clustering=function(pd... | /NetCellMatch/NetCellMatch Functions/Helper Functions/clustering.R | no_license | saisaitian/Software | R | false | false | 1,083 | r | #' A clustering function
#'
#'This function creates the clustering results from the pipeline
#'Run this function after the graph wavelets
#'@param pd number of nodes in Laplacian
#'@param scales number of scales to consider
#'@param Wave is the wavelet parameter (run from graph.wavelet)
#'
#'
clustering=function(pd... |
plot3 <- function(){
if(is.null(data))
data <- load_data()
png("plot3.png", width=480, height=480)
plot(data$Time, data$Sub_metering_1, col = "black",
type = "l", xlab = "", ylab = "Energy sub meterting")
lines(data$Time, data$Sub_metering_2, col = "red")
lines(d... | /plot3.R | no_license | physheng/ExData_Plotting1 | R | false | false | 514 | r | plot3 <- function(){
if(is.null(data))
data <- load_data()
png("plot3.png", width=480, height=480)
plot(data$Time, data$Sub_metering_1, col = "black",
type = "l", xlab = "", ylab = "Energy sub meterting")
lines(data$Time, data$Sub_metering_2, col = "red")
lines(d... |
# set working directory
setwd("C:/Users/SAMSON/Documents/Coursera/Explanatory_Data_Analysis/Week1")
# read data
data_full <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
#subsetting data and date formatin... | /plot1.R | no_license | sgirmam/ExData_Plotting1 | R | false | false | 660 | r |
# set working directory
setwd("C:/Users/SAMSON/Documents/Coursera/Explanatory_Data_Analysis/Week1")
# read data
data_full <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
#subsetting data and date formatin... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NMFSet-class.R
\docType{methods}
\name{consensusmap,matrix-method}
\alias{consensusmap,matrix-method}
\title{Main method that redefines default values for arguments of \code{\link{aheatmap}}.}
\usage{
\S4method{consensusmap}{matrix}(object, c... | /man/consensusmap-matrix-method.Rd | no_license | pooranis/NMF | R | false | true | 633 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NMFSet-class.R
\docType{methods}
\name{consensusmap,matrix-method}
\alias{consensusmap,matrix-method}
\title{Main method that redefines default values for arguments of \code{\link{aheatmap}}.}
\usage{
\S4method{consensusmap}{matrix}(object, c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract_pdf.R
\name{extract_xpdf}
\alias{extract_xpdf}
\title{Extract text from a single pdf document.}
\usage{
extract_xpdf(...)
}
\description{
Extract text from a single pdf document.
}
\note{
see \code{crminer::crm_extract}
}
\keyword{int... | /man/extract_xpdf-defunct.Rd | permissive | ropensci/rcrossref | R | false | true | 327 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract_pdf.R
\name{extract_xpdf}
\alias{extract_xpdf}
\title{Extract text from a single pdf document.}
\usage{
extract_xpdf(...)
}
\description{
Extract text from a single pdf document.
}
\note{
see \code{crminer::crm_extract}
}
\keyword{int... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SL.lm.R
\name{SL.lm}
\alias{SL.lm}
\title{Wrapper for lm}
\usage{
SL.lm(Y, X, newX, family, obsWeights, ...)
}
\arguments{
\item{Y}{Outcome variable}
\item{X}{Training dataframe}
\item{newX}{Test dataframe}
\item{family}{Gaussian or binomi... | /man/SL.lm.Rd | no_license | frbl/SuperLearner | R | false | true | 618 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SL.lm.R
\name{SL.lm}
\alias{SL.lm}
\title{Wrapper for lm}
\usage{
SL.lm(Y, X, newX, family, obsWeights, ...)
}
\arguments{
\item{Y}{Outcome variable}
\item{X}{Training dataframe}
\item{newX}{Test dataframe}
\item{family}{Gaussian or binomi... |
array(10:20,dim=c(3,2,3))
A<-array(10:20,dim=c(3,2,3))
A
A[,,1]
A[,2,]
A[1,,3]
| /#Seção 05 - Arrays/quiz.R | no_license | LucianoTeixeiras/UdemyIniciandoComR | R | false | false | 83 | r | array(10:20,dim=c(3,2,3))
A<-array(10:20,dim=c(3,2,3))
A
A[,,1]
A[,2,]
A[1,,3]
|
## delete data except 2 days data in the text file
## create table
data <- read.table("household_power_consumption.txt", sep=";")
names(data) <- c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_3")
data2 <- data[2:2881,]
... | /plot2.R | no_license | lljack/ExData_Plotting1 | R | false | false | 608 | r | ## delete data except 2 days data in the text file
## create table
data <- read.table("household_power_consumption.txt", sep=";")
names(data) <- c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_3")
data2 <- data[2:2881,]
... |
nice_palette = function(){
alpha =150
palette(c(rgb(85,130,169, alpha=alpha, maxColorValue=255),
rgb(200,79,178, alpha=alpha,maxColorValue=255),
rgb(105,147,45, alpha=alpha, maxColorValue=255),
rgb(204,74,83, alpha=alpha, maxColorValue=255),
rgb(183,110,39, alpha=alp... | /R/nice_palette.R | no_license | Bhanditz/benchmarkmeData | R | false | false | 410 | r | nice_palette = function(){
alpha =150
palette(c(rgb(85,130,169, alpha=alpha, maxColorValue=255),
rgb(200,79,178, alpha=alpha,maxColorValue=255),
rgb(105,147,45, alpha=alpha, maxColorValue=255),
rgb(204,74,83, alpha=alpha, maxColorValue=255),
rgb(183,110,39, alpha=alp... |
library(raster)
library(tiff)
library(tensorflow)
library(keras)
library(EBImage)
path = "/home/daniel/R/landuse/classify_sentinel/db"
source('classify_sentinel/read_files.r')
train = readRDS(file.path(path ,'data.rds'))
train$file = as.character( file.path(path, 'train', train$file))
w = 64
h = 64
#source('mod... | /classify_sentinel/keras.r | no_license | pbrand/landuse | R | false | false | 2,434 | r | library(raster)
library(tiff)
library(tensorflow)
library(keras)
library(EBImage)
path = "/home/daniel/R/landuse/classify_sentinel/db"
source('classify_sentinel/read_files.r')
train = readRDS(file.path(path ,'data.rds'))
train$file = as.character( file.path(path, 'train', train$file))
w = 64
h = 64
#source('mod... |
#' NSE
#'
#' Nash-Sutcliffe Efficiency Performance Metric
#' @param m modelled value (any unit)
#' @param o observed value (any unit)
#' @return nse
NSE = function (m, o)
{
err = m - o
meanobs = mean(o)
mse = sum(err*err)
ovar = sum((o-meanobs)*(o-meanobs))
nse = 1.0 - mse/ovar
nse... | /R/NSE.R | no_license | Lihao-CAU/ecohydroexamples | R | false | false | 323 | r | #' NSE
#'
#' Nash-Sutcliffe Efficiency Performance Metric
#' @param m modelled value (any unit)
#' @param o observed value (any unit)
#' @return nse
NSE = function (m, o)
{
err = m - o
meanobs = mean(o)
mse = sum(err*err)
ovar = sum((o-meanobs)*(o-meanobs))
nse = 1.0 - mse/ovar
nse... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoms.R
\name{geom_timeline_label}
\alias{geom_timeline_label}
\title{Timeline labels of earthquakes}
\usage{
geom_timeline_label(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
...,
na.rm = FALSE,
n_max ... | /man/geom_timeline_label.Rd | permissive | dragosmg/noaar | R | false | true | 3,591 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoms.R
\name{geom_timeline_label}
\alias{geom_timeline_label}
\title{Timeline labels of earthquakes}
\usage{
geom_timeline_label(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
...,
na.rm = FALSE,
n_max ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pix2deg.R
\name{pix2deg}
\alias{pix2deg}
\title{Converts values from pixels to degrees}
\usage{
pix2deg(coord)
}
\arguments{
\item{coord}{Coordinates}
}
\value{
A numeric vector
}
\description{
The coordinates from Eyelink and Dataviewer are... | /eyelinkR/man/pix2deg.Rd | no_license | gavin-ng/eye-movements-efficient-search | R | false | true | 550 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pix2deg.R
\name{pix2deg}
\alias{pix2deg}
\title{Converts values from pixels to degrees}
\usage{
pix2deg(coord)
}
\arguments{
\item{coord}{Coordinates}
}
\value{
A numeric vector
}
\description{
The coordinates from Eyelink and Dataviewer are... |
## This is the script run_analysis.R for the Getting and Cleaning Data Course
## Project.
##
## This script does the following:
## 1) Merges the training and the test sets to create one data set.
## 2) Extracts only the measurements on the mean and standard deviation for
## each measurement.
## 3) Uses... | /run_analysis.R | no_license | javier-orus-lacort/Getting_Cleaning_Data_Project | R | false | false | 5,578 | r | ## This is the script run_analysis.R for the Getting and Cleaning Data Course
## Project.
##
## This script does the following:
## 1) Merges the training and the test sets to create one data set.
## 2) Extracts only the measurements on the mean and standard deviation for
## each measurement.
## 3) Uses... |
library(tibble)
# Importando txt separado por espacos em branco
cap1 <- read.table("D:/Projetos_em_R/ETL/Dados/caprinosEspeçoBranco.txt",
sep = "", header = TRUE)
cap1 <- as_tibble(cap1)
cap1
# Importando txt separado por TAB
cap2 <- read.table("D:/Projetos_em_R/ETL/Dados/caprinosTAB.txt", sep = "... | /Templates/template_ImportacaoDeArquivos.R | no_license | joscelino/ETL | R | false | false | 2,419 | r | library(tibble)
# Importando txt separado por espacos em branco
cap1 <- read.table("D:/Projetos_em_R/ETL/Dados/caprinosEspeçoBranco.txt",
sep = "", header = TRUE)
cap1 <- as_tibble(cap1)
cap1
# Importando txt separado por TAB
cap2 <- read.table("D:/Projetos_em_R/ETL/Dados/caprinosTAB.txt", sep = "... |
library(datasets)
data(iris)
mean(subset(iris, Species == 'virginica')$Sepal.Length, na.rm = T)
apply(iris[, 1:4], 2, mean)
library(datasets)
data(mtcars)
with(mtcars, tapply(mpg, cyl, mean))
tapply(mtcars$mpg, mtcars$cyl, mean)
sapply( split(mtcars$mpg, mtcars$cyl) , mean)
sapply(split(mtcars$mpg, mtcars$cyl), ... | /C 2 R Programming coursera/W3/W3 Q1.R | no_license | khalidm1/datasciencecoursera | R | false | false | 425 | r | library(datasets)
data(iris)
mean(subset(iris, Species == 'virginica')$Sepal.Length, na.rm = T)
apply(iris[, 1:4], 2, mean)
library(datasets)
data(mtcars)
with(mtcars, tapply(mpg, cyl, mean))
tapply(mtcars$mpg, mtcars$cyl, mean)
sapply( split(mtcars$mpg, mtcars$cyl) , mean)
sapply(split(mtcars$mpg, mtcars$cyl), ... |
install.packages("lubridate")
library(lubridate)
install.packages("tidyverse")
library(tidyverse)
green0115 <- read_csv("/Users/MGrewal/Documents/MBA/OM 620 Business Analytics/Data/green_tripdata_2015-01.csv")
weather0115 <- read_csv("/Users/MGrewal/Documents/MBA/OM 620 Business Analytics/Data/1051606.csv")
green0115... | /Project.R | no_license | quasar255/R-NYC-Taxi-Analysis | R | false | false | 10,706 | r | install.packages("lubridate")
library(lubridate)
install.packages("tidyverse")
library(tidyverse)
green0115 <- read_csv("/Users/MGrewal/Documents/MBA/OM 620 Business Analytics/Data/green_tripdata_2015-01.csv")
weather0115 <- read_csv("/Users/MGrewal/Documents/MBA/OM 620 Business Analytics/Data/1051606.csv")
green0115... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_health_facilities.R
\name{read_health_facilities}
\alias{read_health_facilities}
\title{Download geolocated data of health facilities}
\usage{
read_health_facilities(showProgress = TRUE)
}
\arguments{
\item{showProgress}{Logical. Default... | /r-package/man/read_health_facilities.Rd | no_license | jaironicolau/geobr | R | false | true | 1,668 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_health_facilities.R
\name{read_health_facilities}
\alias{read_health_facilities}
\title{Download geolocated data of health facilities}
\usage{
read_health_facilities(showProgress = TRUE)
}
\arguments{
\item{showProgress}{Logical. Default... |
#Create first matrix
matrix.1 <- matrix(c(7,2,9,4,12,13), nrow = 2, ncol = 3)
matrix.1
#Create second matrix
matrix.2 <- matrix(c(1,2,3,7,8,9,12,13,14,19,20,21), nrow = 3, ncol = 4)
matrix.2
#Multiply matrices together
matrix.1%*%matrix.2
#Create data frame
Data_Frame <- data.frame(
id = c(1,2,3,4,5),
name =... | /HW #6.r | no_license | nram19/IntrotoComputing | R | false | false | 1,993 | r | #Create first matrix
matrix.1 <- matrix(c(7,2,9,4,12,13), nrow = 2, ncol = 3)
matrix.1
#Create second matrix
matrix.2 <- matrix(c(1,2,3,7,8,9,12,13,14,19,20,21), nrow = 3, ncol = 4)
matrix.2
#Multiply matrices together
matrix.1%*%matrix.2
#Create data frame
Data_Frame <- data.frame(
id = c(1,2,3,4,5),
name =... |
#' Envelope encryption
#'
#' An \href{https://wiki.openssl.org/index.php/EVP_Asymmetric_Encryption_and_Decryption_of_an_Envelope}{envelope}
#' contains ciphertext along with an encrypted session key and optionally and initialiation
#' vector. The \code{\link{encrypt_envelope}} generates a random IV and session-key whic... | /R/envelope.R | permissive | shensam/openssl | R | false | false | 1,979 | r | #' Envelope encryption
#'
#' An \href{https://wiki.openssl.org/index.php/EVP_Asymmetric_Encryption_and_Decryption_of_an_Envelope}{envelope}
#' contains ciphertext along with an encrypted session key and optionally and initialiation
#' vector. The \code{\link{encrypt_envelope}} generates a random IV and session-key whic... |
# Libraries ---------------------------------------------------------------
# setwd("~/Documents/tidy-tuesdays/2020-07-28")
library(tidyverse); theme_set(theme_minimal())
library(ggbeeswarm)
library(janitor)
library(caret)
library(cowplot)
library(ggpubr)
library(png)
# Getting the data -----------------------------... | /2020-07-28/penguins.r | no_license | kwehmeyer/tidy-tuesdays | R | false | false | 8,087 | r |
# Libraries ---------------------------------------------------------------
# setwd("~/Documents/tidy-tuesdays/2020-07-28")
library(tidyverse); theme_set(theme_minimal())
library(ggbeeswarm)
library(janitor)
library(caret)
library(cowplot)
library(ggpubr)
library(png)
# Getting the data -----------------------------... |
test_that("Make sure timestamps really differ", {
t1 <- human_ts()
Sys.sleep(1)
t2 <- human_ts()
expect_false(isTRUE(all.equal(t1, t2)))
})
| /tests/testthat/test-human_ts.R | permissive | rainyl/OpenSpecy | R | false | false | 148 | r | test_that("Make sure timestamps really differ", {
t1 <- human_ts()
Sys.sleep(1)
t2 <- human_ts()
expect_false(isTRUE(all.equal(t1, t2)))
})
|
set.seed(800)
#1a
read.csv("/Users/landon/Desktop/Grad School/MSCB 5030/YoutubeTimeWatched.csv")
#1b
##date_id video_length_seconds total_views avg_watch_time video_title content
relative_attention = YoutubeTimeWatched.csv$avg_watch_time
Youtube = read.csv("/Users/landon/Desktop/Grad School/MSCB 5030/YoutubeTimeWatch... | /MSCB 5030/Assignment3.Rcode.Carr.R | no_license | black-magk/Grad-School-Work | R | false | false | 2,027 | r | set.seed(800)
#1a
read.csv("/Users/landon/Desktop/Grad School/MSCB 5030/YoutubeTimeWatched.csv")
#1b
##date_id video_length_seconds total_views avg_watch_time video_title content
relative_attention = YoutubeTimeWatched.csv$avg_watch_time
Youtube = read.csv("/Users/landon/Desktop/Grad School/MSCB 5030/YoutubeTimeWatch... |
#Lifetime Smokers
#Sociodemographic Characteristics among 16,327 Lifetime Smokers at Wave 1
#Excel Sheet: Quit Attempts and Quit Rates 6.4.18
#NOTE: CHECK GENDER AND RACE VARIABLES!!!!
###May be more than one
#Keep only respondents who have smoked more than 100 in their lives
lifetime_smoke <- adult_panel %>%
... | /path_viz_4.R | no_license | wspagnola/path_study | R | false | false | 1,810 | r | #Lifetime Smokers
#Sociodemographic Characteristics among 16,327 Lifetime Smokers at Wave 1
#Excel Sheet: Quit Attempts and Quit Rates 6.4.18
#NOTE: CHECK GENDER AND RACE VARIABLES!!!!
###May be more than one
#Keep only respondents who have smoked more than 100 in their lives
lifetime_smoke <- adult_panel %>%
... |
beta_derivs <- function(param,n,xx,A,precs){
n1 <- floor(n/2)
xxb <- xx %*% param
Ae <- as.vector(A*exp(-xxb))
if (n %% 2 == 1){ #odd n
f <- -sum(xxb[2:(n1+1)]+Ae[2:(n1+1)]) -.5*(xxb[1] + Ae[1]) -
.5*t(param) %*% diag(precs) %*% param
g <- -t(xx[2:(n1+1),]) %*% (1-Ae[2:(n1+1)]) -
.5*(1-Ae[1]... | /R/beta_derivs.R | no_license | AndrewFerris/BayesSpec | R | false | false | 943 | r | beta_derivs <- function(param,n,xx,A,precs){
n1 <- floor(n/2)
xxb <- xx %*% param
Ae <- as.vector(A*exp(-xxb))
if (n %% 2 == 1){ #odd n
f <- -sum(xxb[2:(n1+1)]+Ae[2:(n1+1)]) -.5*(xxb[1] + Ae[1]) -
.5*t(param) %*% diag(precs) %*% param
g <- -t(xx[2:(n1+1),]) %*% (1-Ae[2:(n1+1)]) -
.5*(1-Ae[1]... |
# ETL Script
ptm <- proc.time()
rm(list = ls(all.names = TRUE))
options(scipen = 999)
options(googleAuthR.scopes.selected =
"https://www.googleapis.com/auth/cloud-platform")
project <- "ecomm-197702"
zone <- "us-east4-a"
account_key <- "gcs-key.json"
bucket <- "ecomm_lux"
Sys.setenv(
GCS_AUTH_FILE = a... | /etl.R | no_license | danmarrero/ecomm | R | false | false | 856 | r | # ETL Script
ptm <- proc.time()
rm(list = ls(all.names = TRUE))
options(scipen = 999)
options(googleAuthR.scopes.selected =
"https://www.googleapis.com/auth/cloud-platform")
project <- "ecomm-197702"
zone <- "us-east4-a"
account_key <- "gcs-key.json"
bucket <- "ecomm_lux"
Sys.setenv(
GCS_AUTH_FILE = a... |
#' Cull rare taxa and depauperate samples
#'
#' Functions for recursively culling community matrices of rare taxa and depauperate samples.
#'
#' @param CommunityMatrix a matrix
#' @param Rarity a whole number
#' @param Richness a whole number
#' @param Silent logical
#'
#' @aliases cullMatrix,errorMatrix,culltaxa,cullS... | /velociraptr/R/cullMatrix.R | no_license | paleobiodb/analysis_tools | R | false | false | 5,282 | r | #' Cull rare taxa and depauperate samples
#'
#' Functions for recursively culling community matrices of rare taxa and depauperate samples.
#'
#' @param CommunityMatrix a matrix
#' @param Rarity a whole number
#' @param Richness a whole number
#' @param Silent logical
#'
#' @aliases cullMatrix,errorMatrix,culltaxa,cullS... |
setwd('/Users/Kalhan/Desktop/Waterloo Data/Winter 2017/BigData/Project')
data <- read.csv('Customer_Sales_1_Dirty.csv')
head(data)
library(RMySQL)
con <- dbConnect(MySQL(),user="****", password="****",dbname="*****", host="****")
rs <- dbSendQuery(con, "
select a.ID,
case when concat('',a.Sales_Rep_id * 1) <> a.Sales... | /Customer_Sales_error_detection.R | no_license | Kalhan22/Error-Detection-ML | R | false | false | 3,254 | r | setwd('/Users/Kalhan/Desktop/Waterloo Data/Winter 2017/BigData/Project')
data <- read.csv('Customer_Sales_1_Dirty.csv')
head(data)
library(RMySQL)
con <- dbConnect(MySQL(),user="****", password="****",dbname="*****", host="****")
rs <- dbSendQuery(con, "
select a.ID,
case when concat('',a.Sales_Rep_id * 1) <> a.Sales... |
# 9X_New Text Numbers
library(tidyverse); library(fs); library(magrittr); library(glue)
library(ggregplot)
setwd("~/Albersnet/")
"Iceberg Files/Summary" %>% list.files(full.names = T)
# Setting up ####
Unlist1 <- function(a) unlist(a, recursive = F)
MeanSD <- function(a) list(Mean = mean(a, na.rm = T),
... | /Iceberg Code/9X_New Text Numbers.R | no_license | viralemergence/iceberg | R | false | false | 16,737 | r |
# 9X_New Text Numbers
library(tidyverse); library(fs); library(magrittr); library(glue)
library(ggregplot)
setwd("~/Albersnet/")
"Iceberg Files/Summary" %>% list.files(full.names = T)
# Setting up ####
Unlist1 <- function(a) unlist(a, recursive = F)
MeanSD <- function(a) list(Mean = mean(a, na.rm = T),
... |
#Change this to match the most recent year of data to be included in the model
current_year <- 2018
#Data Location
TPM_filepath <- "~/TPM_SPM_Analysis/Data/TPM Teacher Data Raw1.xlsx"
SPM_filepath <- "~/TPM_SPM_Analysis/Data/Updated SPM_fnl.xlsx"
#Do not modify code below this line------------------------------------... | /Scripts/Archive/Model Updating Script AD.R | no_license | dmacfour/TPM_files | R | false | false | 10,724 | r | #Change this to match the most recent year of data to be included in the model
current_year <- 2018
#Data Location
TPM_filepath <- "~/TPM_SPM_Analysis/Data/TPM Teacher Data Raw1.xlsx"
SPM_filepath <- "~/TPM_SPM_Analysis/Data/Updated SPM_fnl.xlsx"
#Do not modify code below this line------------------------------------... |
## string utilities
trim <- function (x) gsub("^\\s+|\\s+$", "", x)
escape <- function(x) gsub("([.|()\\^{}+$*?]|\\[|\\])", "\\\\\\1", x)
left <- function(str, x) substring(str, 1, x)
right <- function(str, x) left(paste0(rev(strsplit(str,split = "")[[1]]), collapse=""), x)
## returns file contents without unzipping ... | /lotf.R | no_license | VictorDavis/lotf | R | false | false | 8,798 | r |
## string utilities
trim <- function (x) gsub("^\\s+|\\s+$", "", x)
escape <- function(x) gsub("([.|()\\^{}+$*?]|\\[|\\])", "\\\\\\1", x)
left <- function(str, x) substring(str, 1, x)
right <- function(str, x) left(paste0(rev(strsplit(str,split = "")[[1]]), collapse=""), x)
## returns file contents without unzipping ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.