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 |
|---|---|---|---|---|---|---|---|---|---|
# Clear workspace
rm(list = ls())
# Read data
################################################################################
# Packages
library(tidyverse)
library(freeR)
library(reshape2)
# Directories
datadir <- "data"
plotdir <- "figures"
tabledir <- "tables"
#################################################... | /code/Step4e_merge_linked_population_data.R | no_license | cfree14/forage_fish | R | false | false | 4,873 | r |
# Clear workspace
rm(list = ls())
# Read data
################################################################################
# Packages
library(tidyverse)
library(freeR)
library(reshape2)
# Directories
datadir <- "data"
plotdir <- "figures"
tabledir <- "tables"
#################################################... |
#' constructor for corpus objects
#'
#' Creates a corpus from a document source. The current available document
#' sources are: \itemize{ \item a character vector (as in R class \code{char})
#' of texts; \item a \link{corpusSource-class} object, constructed using
#' \code{\link{textfile}}; \item a \pkg{tm} \link[t... | /R/corpus.R | no_license | schinria/quanteda | R | false | false | 45,226 | r | #' constructor for corpus objects
#'
#' Creates a corpus from a document source. The current available document
#' sources are: \itemize{ \item a character vector (as in R class \code{char})
#' of texts; \item a \link{corpusSource-class} object, constructed using
#' \code{\link{textfile}}; \item a \pkg{tm} \link[t... |
irtpcp<-function(model, data)
{require(MCMCpack);require(mirt)
if(mean(data==0|data==1|is.na(data))<1){
cat("Error: Non-binary input data")
stop("Please respecify and call irtpcp() again.\n",
call. = FALSE)
}
if(class(model)=="SingleGroupClass"){
holder<-matrix(NA, nrow=nrow(data),ncol=ncol(data)... | /PCP.R | no_license | TobiasKonitzer/IRT | R | false | false | 1,321 | r | irtpcp<-function(model, data)
{require(MCMCpack);require(mirt)
if(mean(data==0|data==1|is.na(data))<1){
cat("Error: Non-binary input data")
stop("Please respecify and call irtpcp() again.\n",
call. = FALSE)
}
if(class(model)=="SingleGroupClass"){
holder<-matrix(NA, nrow=nrow(data),ncol=ncol(data)... |
read.in.files<-function(years,quarters,areas,species,ages,filename,checksum=T) {
a<-expand.grid(Area=areas,Species.n=species,Year=years,Quarter=quarters,Age=ages)
a<-a[order(a$Area,a$Species.n,a$Year,a$Quarter,a$Age),]
variable<-scan(file.path(data.path,filename),comment.char='#')
if (checksum) variable<-head(v... | /SMS_r_prog/r_prog_less_frequently_used/M1_sensistivity.R | permissive | ices-eg/wg_WGSAM | R | false | false | 5,488 | r | read.in.files<-function(years,quarters,areas,species,ages,filename,checksum=T) {
a<-expand.grid(Area=areas,Species.n=species,Year=years,Quarter=quarters,Age=ages)
a<-a[order(a$Area,a$Species.n,a$Year,a$Quarter,a$Age),]
variable<-scan(file.path(data.path,filename),comment.char='#')
if (checksum) variable<-head(v... |
library(tidyverse)
library(lubridate)
library(here)
# Read in Hakai Salmon Program Data v1.0.2 (current as of 2019-11-12)
survey_data <- read_csv(here("data_to_dwc", "hakai_salmon_data", "v1.0.2", "data", "survey_data.csv")) %>%
filter(survey_type == "standard") %>%
select(survey_id, survey_date)
write_csv(su... | /data_to_dwc/hakai_salmon_data/data_import.R | permissive | lizferguson5/bio_data_scripts_ioos_workshop_2019 | R | false | false | 1,778 | r | library(tidyverse)
library(lubridate)
library(here)
# Read in Hakai Salmon Program Data v1.0.2 (current as of 2019-11-12)
survey_data <- read_csv(here("data_to_dwc", "hakai_salmon_data", "v1.0.2", "data", "survey_data.csv")) %>%
filter(survey_type == "standard") %>%
select(survey_id, survey_date)
write_csv(su... |
variables.metadata.autogenerate <- function(x) {
# x <- readRDS("metadata/vnames.vdescriptions.rds")
# Must be run in samplename directory
source("../../processing/Rfunctions1/variable.metadata.autocreate.R")
source("../../processing/Rfunctions2/getvariable.R")
source("../../processing/Rfunctions2/getcod... | /processing/Rfunctions1/variables.metadata.autogenerate.R | no_license | gfeeney/ipupms-aye | R | false | false | 2,171 | r | variables.metadata.autogenerate <- function(x) {
# x <- readRDS("metadata/vnames.vdescriptions.rds")
# Must be run in samplename directory
source("../../processing/Rfunctions1/variable.metadata.autocreate.R")
source("../../processing/Rfunctions2/getvariable.R")
source("../../processing/Rfunctions2/getcod... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/mega.R
\name{mega}
\alias{MEGA}
\alias{mega}
\alias{mega,}
\alias{read.mega}
\alias{write.mega}
\title{Read and Write MEGA}
\usage{
read.mega(file)
write.mega(g, file = NULL, title = NULL, line.width = 60, locus = 1)
}
\arguments{
\i... | /strataG/man/mega.Rd | no_license | hjanime/strataG | R | false | false | 802 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/mega.R
\name{mega}
\alias{MEGA}
\alias{mega}
\alias{mega,}
\alias{read.mega}
\alias{write.mega}
\title{Read and Write MEGA}
\usage{
read.mega(file)
write.mega(g, file = NULL, title = NULL, line.width = 60, locus = 1)
}
\arguments{
\i... |
#ResC <- function (dir = NULL, name = NULL, CMPdesc = NULL)
{
dir <- "."
name <- "LFR-DelayDiff"
CMPdesc <- "East:No cap, Fmax=M; West:MSY cap, Fmax=M*2/3"
if (!is.null(dir))
setwd(dir)
files <- list.files()
isMSE <- grepl("MSE_", files)
MSEref <- c(paste0("MSE_", 1:96), paste0("M... | /testDDMP/resultsCompiler.R | no_license | samueldnj/AtlanticBluefinTuna | R | false | false | 4,734 | r | #ResC <- function (dir = NULL, name = NULL, CMPdesc = NULL)
{
dir <- "."
name <- "LFR-DelayDiff"
CMPdesc <- "East:No cap, Fmax=M; West:MSY cap, Fmax=M*2/3"
if (!is.null(dir))
setwd(dir)
files <- list.files()
isMSE <- grepl("MSE_", files)
MSEref <- c(paste0("MSE_", 1:96), paste0("M... |
## Exercise 1
x <- 3
y <- 15
x + y
x - y
x * y
x / y
## Exercise 2
x <- 2
y <- 3
x^5 > y^4
## Exercise 3
x <- c(22,62,148,43,129)
a <- sum(x)
x/a
## Exercise 4
n <- "A,T,C,G"
sort(n) | /Lab1_MV.R | permissive | manyavivek/genomic-course | R | false | false | 196 | r | ## Exercise 1
x <- 3
y <- 15
x + y
x - y
x * y
x / y
## Exercise 2
x <- 2
y <- 3
x^5 > y^4
## Exercise 3
x <- c(22,62,148,43,129)
a <- sum(x)
x/a
## Exercise 4
n <- "A,T,C,G"
sort(n) |
remove(list = ls())
#' Load Libraries
library(lavaan)
library(sem)
library(lavaanPlot)
library(modelsummary)
#' Load Data
ranun.arbor <- read.csv( file = "Data/ranun.arbor.csv",
header = T, stringsAsFactors = F)
str(ranun.arbor)
#' ### Path analysis model specification
model<-'
# DOBG is p... | /Program/AGDUandSP/Path_all/SEM_ranunarbor.R | no_license | echandle2228/bareground2020_2021 | R | false | false | 1,875 | r | remove(list = ls())
#' Load Libraries
library(lavaan)
library(sem)
library(lavaanPlot)
library(modelsummary)
#' Load Data
ranun.arbor <- read.csv( file = "Data/ranun.arbor.csv",
header = T, stringsAsFactors = F)
str(ranun.arbor)
#' ### Path analysis model specification
model<-'
# DOBG is p... |
pir.setDebugFlags(pir.debugFlags(PrintFinalPir=TRUE, ShowWarnings=TRUE, PrintEarlyPir=TRUE, PrintOriginal=TRUE, PrintFinalRir=TRUE))
print(callCC)
callCC <- rir.compile(callCC)
rir.disassemble(callCC)
callCC(function(k) 1)
callCC(function(k) k(1))
callCC(function(k) {k(1); 2})
callCC(function(k) repeat k(1))
| /rir/tests/pir_regression2.R | no_license | cerveka2/rir | R | false | false | 311 | r | pir.setDebugFlags(pir.debugFlags(PrintFinalPir=TRUE, ShowWarnings=TRUE, PrintEarlyPir=TRUE, PrintOriginal=TRUE, PrintFinalRir=TRUE))
print(callCC)
callCC <- rir.compile(callCC)
rir.disassemble(callCC)
callCC(function(k) 1)
callCC(function(k) k(1))
callCC(function(k) {k(1); 2})
callCC(function(k) repeat k(1))
|
# API base url
COVIDCAST_BASE_URL <- 'https://api.covidcast.cmu.edu/epidata/api.php'
.onAttach <- function(libname, pkgname) {
msg <- c("We encourage COVIDcast API users to register on our mailing list:",
"https://lists.andrew.cmu.edu/mailman/listinfo/delphi-covidcast-api",
"We'll send announce... | /R-packages/covidcast/R/covidcast.R | no_license | guizhen-wang/covidcast | R | false | false | 32,818 | r | # API base url
COVIDCAST_BASE_URL <- 'https://api.covidcast.cmu.edu/epidata/api.php'
.onAttach <- function(libname, pkgname) {
msg <- c("We encourage COVIDcast API users to register on our mailing list:",
"https://lists.andrew.cmu.edu/mailman/listinfo/delphi-covidcast-api",
"We'll send announce... |
#' @title Rv Table
#' @description Return a table of Rv coefficients between any two subsets of a normalized dataset
#' @param dataset a normalized dataframe or matrix
#' @param sets list of vector contains vector of indices of each group
#' @return a table of Rv coefficients
#' @export
#' @examples
#' # default
#' n... | /MFA/R/RV_table.r | no_license | LlamaL/ShinyApp-RStudio | R | false | false | 824 | r |
#' @title Rv Table
#' @description Return a table of Rv coefficients between any two subsets of a normalized dataset
#' @param dataset a normalized dataframe or matrix
#' @param sets list of vector contains vector of indices of each group
#' @return a table of Rv coefficients
#' @export
#' @examples
#' # default
#' n... |
## functions for wk3 programming assignment
## creates a matrix that can cache the inverse if calculated.
## takes a matrix and returns a list of set, get , setInverse and getInverse functions. inverse is cached.
makeCacheMatrix <- function(x = matrix()) {
# the inverse of the matrix initialized to null.
inv <-... | /cachematrix.R | no_license | mradityagoyal/ProgrammingAssignment2 | R | false | false | 1,467 | r | ## functions for wk3 programming assignment
## creates a matrix that can cache the inverse if calculated.
## takes a matrix and returns a list of set, get , setInverse and getInverse functions. inverse is cached.
makeCacheMatrix <- function(x = matrix()) {
# the inverse of the matrix initialized to null.
inv <-... |
library(BiocParallel)
register(bpstart(MulticoreParam(6)))
bpparam()
args <- commandArgs(TRUE)
print (args)
datapath <- as.character(args[1])
#optimisationFileName <- as.character(args[2])
outputFileName <- as.character(args[2])
print(paste('datapath is:', datapath))
print(paste('outputFileName is:', outputFileName))... | /r_analysis/final_scripts/dataExtractor.R | no_license | MetabolomicsAustralia-Bioinformatics/advance-XCMS | R | false | false | 19,350 | r | library(BiocParallel)
register(bpstart(MulticoreParam(6)))
bpparam()
args <- commandArgs(TRUE)
print (args)
datapath <- as.character(args[1])
#optimisationFileName <- as.character(args[2])
outputFileName <- as.character(args[2])
print(paste('datapath is:', datapath))
print(paste('outputFileName is:', outputFileName))... |
## BLCM model is fitted using Markov Chain Monte Carlo sampling with JAGS (Just another Gibbs sampler)
# Set working directory which should also include the model.bug file
setwd("C:\\Users\\shartn\\Documents\\Cost Harmony\\Cost WS 2021\\Trial files\\letter")
library('runjags')
# Define data:
N <- 110
... | /runjags_version.R | no_license | shartn/COST.BLCM.Zurich | R | false | false | 3,056 | r | ## BLCM model is fitted using Markov Chain Monte Carlo sampling with JAGS (Just another Gibbs sampler)
# Set working directory which should also include the model.bug file
setwd("C:\\Users\\shartn\\Documents\\Cost Harmony\\Cost WS 2021\\Trial files\\letter")
library('runjags')
# Define data:
N <- 110
... |
# Web scraping example
library(rvest)
library(RSelenium)
library(XML)
library(dplyr)
library(tidyr)
library(ggplot2)
# Start selenium server and browser
rsDriver()
remDr <- remoteDriver(remoteServerAddr = "localhost", port = 4445L, browserName = "chrome")
remDr$open()
# Start at base URL
url <- 'http://www.marathongu... | /MarathonScrapes.R | no_license | gregdevore/Projects | R | false | false | 4,848 | r | # Web scraping example
library(rvest)
library(RSelenium)
library(XML)
library(dplyr)
library(tidyr)
library(ggplot2)
# Start selenium server and browser
rsDriver()
remDr <- remoteDriver(remoteServerAddr = "localhost", port = 4445L, browserName = "chrome")
remDr$open()
# Start at base URL
url <- 'http://www.marathongu... |
testlist <- list(data = structure(c(1.37878743016338e-134, 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, 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 = c(6L, 9L)), 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/1610555415-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 317 | r | testlist <- list(data = structure(c(1.37878743016338e-134, 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, 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 = c(6L, 9L)), q = 0)
result <- do.call(biwavelet:::rcpp_row_quantile,testlist)
str(result) |
#
zipUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
zipFile <- "household_power_consumption.zip"
# download data
if (!file.exists(zipFile)) {
download.file(zipUrl, zipFile, mode = "wb")
}
# unzip zip file containing data if nedded
dataPath <- "household_power_consum... | /plot4.R | no_license | jerome-audurier/ExData_Plotting1 | R | false | false | 1,679 | r | #
zipUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
zipFile <- "household_power_consumption.zip"
# download data
if (!file.exists(zipFile)) {
download.file(zipUrl, zipFile, mode = "wb")
}
# unzip zip file containing data if nedded
dataPath <- "household_power_consum... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/b2AuthorizeAccount.R
\name{b2AuthorizeAccount}
\alias{b2AuthorizeAccount}
\title{Authorise Backblaze B2 Account.}
\usage{
b2AuthorizeAccount(url, accountId, authorizationKey)
}
\arguments{
\item{url}{Specific API endpoint address for this fun... | /man/b2AuthorizeAccount.Rd | no_license | cran/backblazer | R | false | true | 2,382 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/b2AuthorizeAccount.R
\name{b2AuthorizeAccount}
\alias{b2AuthorizeAccount}
\title{Authorise Backblaze B2 Account.}
\usage{
b2AuthorizeAccount(url, accountId, authorizationKey)
}
\arguments{
\item{url}{Specific API endpoint address for this fun... |
### R code from vignette source 'sphet.Rnw'
###################################################
### code chunk number 1: optionsset
###################################################
options(prompt = "R> ", continue = "+ ", width = 70, useFancyQuotes = FALSE)
###################################################
###... | /inst/doc/sphet.R | no_license | cran/sphet | R | false | false | 5,461 | r | ### R code from vignette source 'sphet.Rnw'
###################################################
### code chunk number 1: optionsset
###################################################
options(prompt = "R> ", continue = "+ ", width = 70, useFancyQuotes = FALSE)
###################################################
###... |
### Getting and Cleaning Data Course Project
library(dplyr)
# Download the data for the project:
zipFilename <- "UCI HAR Dataset.zip"
# Checking if folder exists:
if (!file.exists(zipFilename)){
zipFolderURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
dow... | /run_analysis.R | no_license | MsGret/Getting-and-Cleaning-Data | R | false | false | 4,454 | r | ### Getting and Cleaning Data Course Project
library(dplyr)
# Download the data for the project:
zipFilename <- "UCI HAR Dataset.zip"
# Checking if folder exists:
if (!file.exists(zipFilename)){
zipFolderURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
dow... |
create_plot3 = function(){
# Load data
source('load_hpc_data.R')
#Read data
df <- read_data()
with(df,plot(Timestamp, Global_active_power, type="l",xlab="", ylab="Global Active Power (kilowatts)"))
# Open png device
png(filename="plot3.png",width = 480, height = 480)
# Make plot
with(df,{
... | /plot3.R | no_license | svkomarovsky/ExData_Plotting1 | R | false | false | 685 | r | create_plot3 = function(){
# Load data
source('load_hpc_data.R')
#Read data
df <- read_data()
with(df,plot(Timestamp, Global_active_power, type="l",xlab="", ylab="Global Active Power (kilowatts)"))
# Open png device
png(filename="plot3.png",width = 480, height = 480)
# Make plot
with(df,{
... |
## File Name: summary.invariance.alignment.R
## File Version: 0.273
summary.invariance.alignment <- function( object, digits=3, file=NULL, ...)
{
# open sink for a file
sirt_osink(file=file)
display_string <- sirt_summary_print_display(symbol="-", len=65)
cat(display_string)
#- package and R se... | /R/summary.invariance.alignment.R | no_license | rosefu79/sirt | R | false | false | 2,263 | r | ## File Name: summary.invariance.alignment.R
## File Version: 0.273
summary.invariance.alignment <- function( object, digits=3, file=NULL, ...)
{
# open sink for a file
sirt_osink(file=file)
display_string <- sirt_summary_print_display(symbol="-", len=65)
cat(display_string)
#- package and R se... |
library(AnalyzeFMRI)
### Name: Sim.3D.GRF
### Title: Simulate a GRF
### Aliases: Sim.3D.GRF sim_grf
### Keywords: utilities
### ** Examples
d <- c(64, 64, 21)
FWHM <- 9
sigma <- diag(FWHM^2, 3) / (8 * log(2))
voxdim <- c(2, 2, 4)
msk <- array(1, dim = d)
field <- Sim.3D.GRF(d = d, voxdim = voxdim, sigma = sigma, ... | /data/genthat_extracted_code/AnalyzeFMRI/examples/Sim.3D.GRF.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 361 | r | library(AnalyzeFMRI)
### Name: Sim.3D.GRF
### Title: Simulate a GRF
### Aliases: Sim.3D.GRF sim_grf
### Keywords: utilities
### ** Examples
d <- c(64, 64, 21)
FWHM <- 9
sigma <- diag(FWHM^2, 3) / (8 * log(2))
voxdim <- c(2, 2, 4)
msk <- array(1, dim = d)
field <- Sim.3D.GRF(d = d, voxdim = voxdim, sigma = sigma, ... |
df <- read.table(file="household_power_consumption.txt",
header=TRUE,
skip=66636,
sep=";",
nrows=2880,
na.strings="?",
col.names=c("Fecha",
"Hora",
"Global_... | /plot1.R | no_license | jreinoso/ExData_Plotting1 | R | false | false | 1,298 | r | df <- read.table(file="household_power_consumption.txt",
header=TRUE,
skip=66636,
sep=";",
nrows=2880,
na.strings="?",
col.names=c("Fecha",
"Hora",
"Global_... |
library(chillR)
### Name: plot_climate_scenarios
### Title: Plot multiple chilling scenario groups (or for other metrics)
### Aliases: plot_climate_scenarios
### Keywords: utility
### ** Examples
#making 3 identical objects as scenarios; let's assume these represent the
#years 2000, 2005 and 2010.
models... | /data/genthat_extracted_code/chillR/examples/plot_climate_scenarios.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 2,054 | r | library(chillR)
### Name: plot_climate_scenarios
### Title: Plot multiple chilling scenario groups (or for other metrics)
### Aliases: plot_climate_scenarios
### Keywords: utility
### ** Examples
#making 3 identical objects as scenarios; let's assume these represent the
#years 2000, 2005 and 2010.
models... |
counties <- read.csv("https://raw.githubusercontent.com/brianlukoff/sta371g/master/data/counties.csv")
popmodel <- lm(Physicians ~ Population, data=counties)
plot(popmodel)
counties$PhysiciansPer10000 <- counties$Physicians / counties$Population * 10000
my.counties <- subset(counties, Population > 10000)
names(counties... | /lecture-scripts/lecture-09.R | no_license | SudeepS97/sta371g | R | false | false | 836 | r | counties <- read.csv("https://raw.githubusercontent.com/brianlukoff/sta371g/master/data/counties.csv")
popmodel <- lm(Physicians ~ Population, data=counties)
plot(popmodel)
counties$PhysiciansPer10000 <- counties$Physicians / counties$Population * 10000
my.counties <- subset(counties, Population > 10000)
names(counties... |
context("space filling designs")
# ------------------------------------------------------------------------------
source("helper-functions.R")
# ------------------------------------------------------------------------------
test_that('max entropy designs', {
grid_1 <- grid_max_entropy(
cost(), mixture(),
... | /tests/testthat/test_space_filling.R | no_license | zeta1999/dials | R | false | false | 2,569 | r |
context("space filling designs")
# ------------------------------------------------------------------------------
source("helper-functions.R")
# ------------------------------------------------------------------------------
test_that('max entropy designs', {
grid_1 <- grid_max_entropy(
cost(), mixture(),
... |
#Using put call parity for calculating the put option
#Definitions:
#C is the price the the Euro option
#PV(K) is the present value of the strike price (K), discounted from the value on the expiration date(3months from Augest) at the risk-free rate 1.25%.
#S0 is the current market price or the spot price of the underl... | /Black_Scholes(AmericanPut).R | no_license | GitBubBoddy/Option_Pricing- | R | false | false | 922 | r | #Using put call parity for calculating the put option
#Definitions:
#C is the price the the Euro option
#PV(K) is the present value of the strike price (K), discounted from the value on the expiration date(3months from Augest) at the risk-free rate 1.25%.
#S0 is the current market price or the spot price of the underl... |
# length(geoind)
# geoind[13:20]
# geoind[18]
# #R Function to get the latitude and longitude of a street address
# function(geo){
# url = paste('http://maps.google.com/maps/api/geocode/xml?address=', addr,
# '&sensor=false&key=AIzaSyDXF1umP-MpC_gF5SV6RMQaSWxcsktfXx4',sep='') # construct the URL
# do... | /capstone/blight_analysis.R | no_license | Gianfranco-Campana/datasci_course_materials-1 | R | false | false | 107,059 | r | # length(geoind)
# geoind[13:20]
# geoind[18]
# #R Function to get the latitude and longitude of a street address
# function(geo){
# url = paste('http://maps.google.com/maps/api/geocode/xml?address=', addr,
# '&sensor=false&key=AIzaSyDXF1umP-MpC_gF5SV6RMQaSWxcsktfXx4',sep='') # construct the URL
# do... |
library(survey) # load survey package (analyzes complex design surveys)
library(MonetDBLite)
library(DBI) # load the DBI package (implements the R-database coding)
library(stringr)
setwd("/N/dc2/projects/SocialDataScience/brfss")
medicaid_states <- read.delim("/N/dc2/projects/SocialDataScience/brfss/medicaid... | /rCode.R | no_license | saurabhkumar04/CAUSAL-STUDY-OF-EFFECT-OF-AFFORDABLE-CARE-ACT-ON-HEALTH-OUTCOME | R | false | false | 8,177 | r | library(survey) # load survey package (analyzes complex design surveys)
library(MonetDBLite)
library(DBI) # load the DBI package (implements the R-database coding)
library(stringr)
setwd("/N/dc2/projects/SocialDataScience/brfss")
medicaid_states <- read.delim("/N/dc2/projects/SocialDataScience/brfss/medicaid... |
library(googledrive)
dir.create(here::here("shapefiles"))
dir.create(here::here("data"))
# this should fire up browser window
drive_auth()
# specify url of folder you want to pull in
shapefiles <- drive_ls(as_id("https://drive.google.com/drive/folders/11nnb9rasPmTMRYyrUKlewLw9ek_YEvbL"))
data <- drive_ls(as_id("http... | /R/pull_data_googledrive.R | no_license | Jason-Conner-NOAA/MoBaSim | R | false | false | 780 | r | library(googledrive)
dir.create(here::here("shapefiles"))
dir.create(here::here("data"))
# this should fire up browser window
drive_auth()
# specify url of folder you want to pull in
shapefiles <- drive_ls(as_id("https://drive.google.com/drive/folders/11nnb9rasPmTMRYyrUKlewLw9ek_YEvbL"))
data <- drive_ls(as_id("http... |
## The following functions work together to solve, cache, and retrieve the inverse of a square matrix
#makeCacheMatrix creates a special "matrix", which contains functions to:
# set the value of the matrix
# get the value of the matrix
# set the value of the inverse
# get the value of the inverse
makeCacheMatrix <- f... | /cachematrix.R | no_license | pearl8532/ProgrammingAssignment2 | R | false | false | 1,455 | r | ## The following functions work together to solve, cache, and retrieve the inverse of a square matrix
#makeCacheMatrix creates a special "matrix", which contains functions to:
# set the value of the matrix
# get the value of the matrix
# set the value of the inverse
# get the value of the inverse
makeCacheMatrix <- f... |
testlist <- list(reference = numeric(0), values = c(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, 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, 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, 0, 0, 0, 0, ... | /diversityForest/inst/testfiles/numSmaller/libFuzzer_numSmaller/numSmaller_valgrind_files/1610037122-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 426 | r | testlist <- list(reference = numeric(0), values = c(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, 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, 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, 0, 0, 0, 0, ... |
#' @title Table to compare differents statisticals fit
#'
#' @description
#' Function to determinate the parameters' values and the measures of fit
#' for differents statistical models
#'
#' @details
#' This function allows you to get the adjustments of the next distributions:
#' Weibull, Gamma and Lognormal.
#'
#... | /R/tableFitDist.R | no_license | diegojedwards/WindResource-1 | R | false | false | 2,146 | r | #' @title Table to compare differents statisticals fit
#'
#' @description
#' Function to determinate the parameters' values and the measures of fit
#' for differents statistical models
#'
#' @details
#' This function allows you to get the adjustments of the next distributions:
#' Weibull, Gamma and Lognormal.
#'
#... |
#' Search CRAN packages
#'
#' Search the indexed database of current CRAN packages. It uses the
#' pkgsearch package. See that package for more details and also
#' [pkgsearch::pkg_search()] for pagination, more advanced searching,
#' etc.
#'
#' @param query Search query string.
#' @param ... Additional arguments passe... | /R/search.R | no_license | cran/pak | R | false | false | 2,613 | r |
#' Search CRAN packages
#'
#' Search the indexed database of current CRAN packages. It uses the
#' pkgsearch package. See that package for more details and also
#' [pkgsearch::pkg_search()] for pagination, more advanced searching,
#' etc.
#'
#' @param query Search query string.
#' @param ... Additional arguments passe... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/makeTx.R
\name{makeTx}
\alias{makeTx}
\title{makeTx}
\usage{
makeTx(file, genome, type_attrib = c("transcript_biotype", "source"))
}
\arguments{
\item{file}{Filename to uncompressed Ensembl GTF to
process}
\item{genome}{\code{B... | /man/makeTx.Rd | no_license | timpeters82/aaRon | R | false | false | 816 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/makeTx.R
\name{makeTx}
\alias{makeTx}
\title{makeTx}
\usage{
makeTx(file, genome, type_attrib = c("transcript_biotype", "source"))
}
\arguments{
\item{file}{Filename to uncompressed Ensembl GTF to
process}
\item{genome}{\code{B... |
# 1. Set up ====================================================================================================
library(tidyverse)
library(httr)
library(jsonlite)
library(assertthat)
library(keyringr)
library(magrittr)
library(googledrive)
library(googlesheets4)
baseurl <- "https://sandbox.psi-mis.org/"
base <- subst... | /blueprint.R | no_license | INyabuto/eTracker | R | false | false | 859 | r | # 1. Set up ====================================================================================================
library(tidyverse)
library(httr)
library(jsonlite)
library(assertthat)
library(keyringr)
library(magrittr)
library(googledrive)
library(googlesheets4)
baseurl <- "https://sandbox.psi-mis.org/"
base <- subst... |
multinomial.asso.freq <- function(x, pheno = x@ped$pheno, ref.level, test = c("Genotypic", "Allelic"), get.effect.size = F, min.maf.threshold = 0.05){
test <- match.arg(test)
if(!(test %in% c("Genotypic", "Allelic"))) stop("Only 'Genotypic' or 'Allelic' chi-square 'test' are available")
if (!is.factor(pheno)) st... | /R/multinomial.asso.freq.r | no_license | genostats/Ravages | R | false | false | 2,567 | r | multinomial.asso.freq <- function(x, pheno = x@ped$pheno, ref.level, test = c("Genotypic", "Allelic"), get.effect.size = F, min.maf.threshold = 0.05){
test <- match.arg(test)
if(!(test %in% c("Genotypic", "Allelic"))) stop("Only 'Genotypic' or 'Allelic' chi-square 'test' are available")
if (!is.factor(pheno)) st... |
# This is a script
# to test rstudio and git integration
# This is a third comment line
| /test.R | no_license | asousos/test | R | false | false | 88 | r | # This is a script
# to test rstudio and git integration
# This is a third comment line
|
rf <- function(x=NULL) {
if (.Platform$OS.type!="unix") {
run.from <- "C:/reps/CongressoAberto"
} else {
run.from <- "~/reps/CongressoAberto"
}
## side effect: load functions
source(paste(run.from,"/R/caFunctions.R",sep=""))
if (is.null(x)) {
run.from
} else {
paste(run.from,"/",x,sep='')
... | /R/legisListWordPress.R | no_license | rafaeldjacome/CongressoAberto | R | false | false | 1,011 | r | rf <- function(x=NULL) {
if (.Platform$OS.type!="unix") {
run.from <- "C:/reps/CongressoAberto"
} else {
run.from <- "~/reps/CongressoAberto"
}
## side effect: load functions
source(paste(run.from,"/R/caFunctions.R",sep=""))
if (is.null(x)) {
run.from
} else {
paste(run.from,"/",x,sep='')
... |
\name{Example}
\alias{Example}
\title{Example dataset for iECAT}
\description{
Example dataset for iECAT.
}
\format{
Example contains the following objects:
\describe{
\item{Z.list}{a list of 10 genes}
\item{tbl.external.all.list}{a list of 10 allele count tables of external control samples for the 10 genes... | /man/Example.rd | no_license | leeshawn/iECAT | R | false | false | 391 | rd | \name{Example}
\alias{Example}
\title{Example dataset for iECAT}
\description{
Example dataset for iECAT.
}
\format{
Example contains the following objects:
\describe{
\item{Z.list}{a list of 10 genes}
\item{tbl.external.all.list}{a list of 10 allele count tables of external control samples for the 10 genes... |
#install.packages("dygraphs")
library(dygraphs)
library(xts)
df <- fread("C:/Users/lukas/OneDrive - UT Cloud/Data/Twitter/plot_data/En_NoFilter/sum_stats_En_NoFilter_rt_200_li_200_lo_long_only.csv")
df %>% select(created_at, mean_sentiment) %>% dygraph()
df$created_at <- as.Date(df$created_at)
df$mean_rt_sc <- sc... | /test_lukas/R_test/dygraph_test.R | no_license | lubrunn/DSP_App | R | false | false | 3,011 | r | #install.packages("dygraphs")
library(dygraphs)
library(xts)
df <- fread("C:/Users/lukas/OneDrive - UT Cloud/Data/Twitter/plot_data/En_NoFilter/sum_stats_En_NoFilter_rt_200_li_200_lo_long_only.csv")
df %>% select(created_at, mean_sentiment) %>% dygraph()
df$created_at <- as.Date(df$created_at)
df$mean_rt_sc <- sc... |
library(testthat)
library(covid.word.embedding)
test_check("covid.word.embedding")
| /tests/testthat.R | permissive | niaid/covid.word.embedding | R | false | false | 84 | r | library(testthat)
library(covid.word.embedding)
test_check("covid.word.embedding")
|
# commonality analysis
#----- load tools -----#
rm(list = ls())
library(foreign)
library(R.matlab)
library(gridExtra)
library(ggplot2)
library(yhat)
#----- load data -----#
MRPETmemory<-read.spss('/Users/alex/Dropbox/paperwriting/MRPET/data/MRPET_memoryTable_withLC-CR.sav', to.data.frame=TRUE)
## Predict paragraph c... | /CommonalityAnalysis.R | no_license | alex-yi-writes/MRPET_pipelines | R | false | false | 1,241 | r | # commonality analysis
#----- load tools -----#
rm(list = ls())
library(foreign)
library(R.matlab)
library(gridExtra)
library(ggplot2)
library(yhat)
#----- load data -----#
MRPETmemory<-read.spss('/Users/alex/Dropbox/paperwriting/MRPET/data/MRPET_memoryTable_withLC-CR.sav', to.data.frame=TRUE)
## Predict paragraph c... |
#' Automatize creation of data blocks
#'
#' This function automatizes the creation of data block for stan models
#' from a stan data list
#'
#' @param stan_data a list with stan data
#'
#' @importFrom purrr imap
#' @importFrom purrr partial
#' @importFrom rlang exec
#' @export
create_model_from_data <- function(stan... | /R/automatize-data-block.R | permissive | duarteguilherme/stanutils | R | false | false | 1,014 | r | #' Automatize creation of data blocks
#'
#' This function automatizes the creation of data block for stan models
#' from a stan data list
#'
#' @param stan_data a list with stan data
#'
#' @importFrom purrr imap
#' @importFrom purrr partial
#' @importFrom rlang exec
#' @export
create_model_from_data <- function(stan... |
#' Generate a binary random matrix of ones and zeros with a
#' threshold parameter
#'
#' @param m The number of columns
#' @param n The number of rows
#' @param success The probability of success in each trial. Default is 0.5
#'
#' @importFrom stats runif
#'
#' @return Matrix with ones and zeros
#' @export
#'
#' @examp... | /R/get_bin_matrix.R | permissive | alrobles/geotax | R | false | false | 546 | r | #' Generate a binary random matrix of ones and zeros with a
#' threshold parameter
#'
#' @param m The number of columns
#' @param n The number of rows
#' @param success The probability of success in each trial. Default is 0.5
#'
#' @importFrom stats runif
#'
#' @return Matrix with ones and zeros
#' @export
#'
#' @examp... |
# install dev packages ----------------------------------------------------
# devtools::install_github("tidyverts/fable")
# attach packages -----------------------------------------------------------
library(tidyverse) # data manipulation
library(rio) # import - export data
library(tsibble) # ts data frames
# librar... | /2018-12-22/model.R | no_license | kassandra-ru/model | R | false | false | 4,473 | r | # install dev packages ----------------------------------------------------
# devtools::install_github("tidyverts/fable")
# attach packages -----------------------------------------------------------
library(tidyverse) # data manipulation
library(rio) # import - export data
library(tsibble) # ts data frames
# librar... |
#' Italy Class for downloading, cleaning and processing notification data
#' @description Information for downloading, cleaning
#' and processing COVID-19 region data for Italy.
#'
# nolint start
#' @source \url{https://github.com/pcm-dpc/COVID-19/}
# nolint end
#' @export
#' @concept dataset
#' @family subnational
#'... | /R/Italy.R | permissive | epiforecasts/covidregionaldata | R | false | false | 3,843 | r | #' Italy Class for downloading, cleaning and processing notification data
#' @description Information for downloading, cleaning
#' and processing COVID-19 region data for Italy.
#'
# nolint start
#' @source \url{https://github.com/pcm-dpc/COVID-19/}
# nolint end
#' @export
#' @concept dataset
#' @family subnational
#'... |
testlist <- list(A = structure(c(2.17107980817984e+205, 9.5380655780303e+295 ), .Dim = 1:2), B = structure(c(2.19477802979261e+294, 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, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance:::match_rows,testlist)
str(resul... | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613123494-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 322 | r | testlist <- list(A = structure(c(2.17107980817984e+205, 9.5380655780303e+295 ), .Dim = 1:2), B = structure(c(2.19477802979261e+294, 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, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance:::match_rows,testlist)
str(resul... |
library(raster)
library(rgeos)
library(cluster)
library(splancs)
library(foreach)
library(doParallel)
if (Sys.info()["sysname"] == "Windows") {
ncores <- 4
} else {
ncores <- 46
}
#############
# empirical #
#############
set.seed(357) # use seed for reproducibility of generating starting values
nsim <- 3000
sap ... | /simulation_run.R | no_license | romunov/duhturat | R | false | false | 3,202 | r | library(raster)
library(rgeos)
library(cluster)
library(splancs)
library(foreach)
library(doParallel)
if (Sys.info()["sysname"] == "Windows") {
ncores <- 4
} else {
ncores <- 46
}
#############
# empirical #
#############
set.seed(357) # use seed for reproducibility of generating starting values
nsim <- 3000
sap ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graphing.R
\name{plot.aiRactivation}
\alias{plot.aiRactivation}
\title{plot aiRactivation}
\usage{
\method{plot}{aiRactivation}(aiRactivation, x.val, y.val, layer,
nodes = NULL)
}
\arguments{
\item{aiRactivation}{aiRactivation object}
\ite... | /man/plot.aiRactivation.Rd | no_license | jtlandis/aiR | R | false | true | 671 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graphing.R
\name{plot.aiRactivation}
\alias{plot.aiRactivation}
\title{plot aiRactivation}
\usage{
\method{plot}{aiRactivation}(aiRactivation, x.val, y.val, layer,
nodes = NULL)
}
\arguments{
\item{aiRactivation}{aiRactivation object}
\ite... |
#' Visualize asc files
#'
#' plot mHM-typical ASC raster files
#'
#' @return Invisible list with pdf, png, add, closedev
#' @author Berry Boessenkool, \email{berry-b@@gmx.de}, Feb-March 2017
#' @seealso \code{\link{read_asc}}, \code{\link{vis_dem}}
#' @keywords hplot color spatial
#' @importFrom berryFunctions colPoi... | /R/vis_asc.R | no_license | brry/mhmVis | R | false | false | 3,692 | r | #' Visualize asc files
#'
#' plot mHM-typical ASC raster files
#'
#' @return Invisible list with pdf, png, add, closedev
#' @author Berry Boessenkool, \email{berry-b@@gmx.de}, Feb-March 2017
#' @seealso \code{\link{read_asc}}, \code{\link{vis_dem}}
#' @keywords hplot color spatial
#' @importFrom berryFunctions colPoi... |
# Heavily borrowed from Kevin Ushey (github.com/kevinushey/etc)
# READY FOR USE
invisible(
local(
{
# Set name and email safely ----
FIRSTNAME <- as.integer(c(83, 46, 32, 66, 114, 121, 97, 110))
LASTNAME <- as.integer(c(87, 101, 115, 116))
NAME <- as.integer(c(83, 46, 32, 66, 114, 121, 9... | /.Rprofile | permissive | sbw78/etc | R | false | false | 3,138 | rprofile | # Heavily borrowed from Kevin Ushey (github.com/kevinushey/etc)
# READY FOR USE
invisible(
local(
{
# Set name and email safely ----
FIRSTNAME <- as.integer(c(83, 46, 32, 66, 114, 121, 97, 110))
LASTNAME <- as.integer(c(87, 101, 115, 116))
NAME <- as.integer(c(83, 46, 32, 66, 114, 121, 9... |
# Exploratory analysis - Week1_project_plot2
#R packages needed:
install.packages("data.table")
library(data.table)
install.packages("lubridate")
library(lubridate)
install.packages("dplyr")
library(dplyr)
#read data subset for dates 1.2.2007- 2.2.2007
unzip("./exdata%2Fdata%2Fhousehold_power_consumption.zip")
data ... | /plot2.R | no_license | IreneRL/ExData_Plotting1 | R | false | false | 911 | r | # Exploratory analysis - Week1_project_plot2
#R packages needed:
install.packages("data.table")
library(data.table)
install.packages("lubridate")
library(lubridate)
install.packages("dplyr")
library(dplyr)
#read data subset for dates 1.2.2007- 2.2.2007
unzip("./exdata%2Fdata%2Fhousehold_power_consumption.zip")
data ... |
tar_test("target$command", {
x <- target_init(name = "abc", expr = quote(a))
expect_silent(command_validate(x$command))
})
tar_test("target$settings", {
x <- target_init(name = "abc", expr = quote(a))
expect_silent(settings_validate(x$settings))
})
tar_test("target$settings$priority", {
x <- target_init(nam... | /tests/testthat/test-class_target.R | permissive | krlmlr/targets | R | false | false | 12,577 | r | tar_test("target$command", {
x <- target_init(name = "abc", expr = quote(a))
expect_silent(command_validate(x$command))
})
tar_test("target$settings", {
x <- target_init(name = "abc", expr = quote(a))
expect_silent(settings_validate(x$settings))
})
tar_test("target$settings$priority", {
x <- target_init(nam... |
#predicting the selling prices in the real estate industry
#import the real estate industry data from the .csv file
data1 <-read.csv("C:/Users/REVANTH/Desktop/data/regression data.csv",header= TRUE,sep=",")
#to view the data
View(data1)
#as the first columns of the data arent important for the prediction ... | /realestate.R | no_license | madamalarevanth/mini-project-on-linear-regression- | R | false | false | 2,621 | r | #predicting the selling prices in the real estate industry
#import the real estate industry data from the .csv file
data1 <-read.csv("C:/Users/REVANTH/Desktop/data/regression data.csv",header= TRUE,sep=",")
#to view the data
View(data1)
#as the first columns of the data arent important for the prediction ... |
#' @title
#' Download a file from a REDCap project record
#'
#' @aliases
#' redcap_file_download_oneshot redcap_download_file_oneshot
#'
#' @description
#' This function uses REDCap's API to download a file.
#'
#' @param file_name The name of the file where the downloaded file is saved.
#' If empty the original name of... | /R/redcap-file-download-oneshot.R | permissive | the-mad-statter/REDCapR | R | false | false | 9,621 | r | #' @title
#' Download a file from a REDCap project record
#'
#' @aliases
#' redcap_file_download_oneshot redcap_download_file_oneshot
#'
#' @description
#' This function uses REDCap's API to download a file.
#'
#' @param file_name The name of the file where the downloaded file is saved.
#' If empty the original name of... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{fmStatus}
\alias{fmStatus}
\title{Status class}
\usage{
fmStatus(id, status, message, value = NULL)
}
\arguments{
\item{id}{character string, task ID}
\item{status}{character string}
\item{message}{message that may be used on ... | /man/fmStatus.Rd | permissive | mjakubczak/FutureManager | R | false | true | 983 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{fmStatus}
\alias{fmStatus}
\title{Status class}
\usage{
fmStatus(id, status, message, value = NULL)
}
\arguments{
\item{id}{character string, task ID}
\item{status}{character string}
\item{message}{message that may be used on ... |
# Date 14-Oct-2018 Dev: Yogesh Shinde
# https://www.linkedin.com/in/yogesh-sql-msbi-datascience/
# Problem Statement: We have to identify high-risk diabetic patients through risk stratification.
# This will help the payer to decide what are the right intervention programs for these patients.
#... | /PayerAnalyticsAssignment_RiskStratification.R | no_license | ShindeYog/PayerAnalytics_RiskStratification | R | false | false | 33,943 | r | # Date 14-Oct-2018 Dev: Yogesh Shinde
# https://www.linkedin.com/in/yogesh-sql-msbi-datascience/
# Problem Statement: We have to identify high-risk diabetic patients through risk stratification.
# This will help the payer to decide what are the right intervention programs for these patients.
#... |
"crit.fun" <-
function(
#function for generting a function for computing criteria function of a blockmodel and preparing data
M, #matrix,
clu, #partition
# e1="default", #weight of the error of binearized matrix
# e2="default", #weight of the error of valued conenctions
approach, #the approach used - can be ... | /blockmodeling/R/crit.fun.R | no_license | ingted/R-Examples | R | false | false | 2,453 | r | "crit.fun" <-
function(
#function for generting a function for computing criteria function of a blockmodel and preparing data
M, #matrix,
clu, #partition
# e1="default", #weight of the error of binearized matrix
# e2="default", #weight of the error of valued conenctions
approach, #the approach used - can be ... |
library(tidyverse)
library(vegan)
library(devtools)
<<<<<<< HEAD
install_github("NCEAS/codyn", ref = github_pull(83))
=======
>>>>>>> d4912af31ca1b2f8bee07dbf0eeccc9a8c3ee1db
install_github("NCEAS/codyn", ref = "anderson")
library(codyn)
# Read in Data ------------------------------------------------------------
#hom... | /Testing with Codyn.R | no_license | mavolio/RACs | R | false | false | 7,133 | r | library(tidyverse)
library(vegan)
library(devtools)
<<<<<<< HEAD
install_github("NCEAS/codyn", ref = github_pull(83))
=======
>>>>>>> d4912af31ca1b2f8bee07dbf0eeccc9a8c3ee1db
install_github("NCEAS/codyn", ref = "anderson")
library(codyn)
# Read in Data ------------------------------------------------------------
#hom... |
rm(list=ls())
xx=read.delim(file.choose(),header=T)
#for (s in 1:3653){
#xx=read.delim(file.choose(),header=T,nrows=3000,skip=s*3000)
###################################
# computation from here
###################################
y = as.matrix(xx[,12:ncol(xx)])
library(popgen)
time=Sys.time()
final=c()
w=20 #window s... | /R/NEWimputation_w_ld_KNN_v3.R | no_license | whiteaegis/Imputation | R | false | false | 3,370 | r | rm(list=ls())
xx=read.delim(file.choose(),header=T)
#for (s in 1:3653){
#xx=read.delim(file.choose(),header=T,nrows=3000,skip=s*3000)
###################################
# computation from here
###################################
y = as.matrix(xx[,12:ncol(xx)])
library(popgen)
time=Sys.time()
final=c()
w=20 #window s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ArraySchema.R
\name{tiledb_ndim,tiledb_array_schema-method}
\alias{tiledb_ndim,tiledb_array_schema-method}
\title{Return the number of dimensions associated with the \code{tiledb_array_schema}}
\usage{
\S4method{tiledb_ndim}{tiledb_array_sche... | /man/tiledb_ndim-tiledb_array_schema-method.Rd | permissive | aaronwolen/TileDB-R | R | false | true | 787 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ArraySchema.R
\name{tiledb_ndim,tiledb_array_schema-method}
\alias{tiledb_ndim,tiledb_array_schema-method}
\title{Return the number of dimensions associated with the \code{tiledb_array_schema}}
\usage{
\S4method{tiledb_ndim}{tiledb_array_sche... |
#-------------------------------------------------------------------------------
# Stock assessment script for 2019 Black Sea Turbot benchmark by Niels Hintzen (niels.hintzen@wur.nl)
#
# Last modified: 26/06/2020. vanja
#
#-------------------------------------------------------------------------------
library(FLCore)... | /ANEPIL bechmkt 2020/PIL/Sar_assessment all surveys fixing PE V2 RM 2004-2007.r | no_license | brune001/MSE-Adriatic | R | false | false | 10,315 | r | #-------------------------------------------------------------------------------
# Stock assessment script for 2019 Black Sea Turbot benchmark by Niels Hintzen (niels.hintzen@wur.nl)
#
# Last modified: 26/06/2020. vanja
#
#-------------------------------------------------------------------------------
library(FLCore)... |
## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ----setup, echo = FALSE------------------------------------------------------
library(flattabler)
## ---- results = "asis", echo = FALSE----------------------------... | /inst/doc/flattabler.R | no_license | cran/flattabler | R | false | false | 8,502 | r | ## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ----setup, echo = FALSE------------------------------------------------------
library(flattabler)
## ---- results = "asis", echo = FALSE----------------------------... |
#' Visualize a rate test time series
#'
#' @description
#'
#' Given the results from a rates test produces a time series visualization for a specific model.
#'
#' @param test_rates_output Rate output from \link{test_rates}.
#' @param model_number The number of the model you wish to visualise from the rate output.
#' @p... | /R/plot_rates_character.R | no_license | graemetlloyd/Claddis | R | false | false | 6,439 | r | #' Visualize a rate test time series
#'
#' @description
#'
#' Given the results from a rates test produces a time series visualization for a specific model.
#'
#' @param test_rates_output Rate output from \link{test_rates}.
#' @param model_number The number of the model you wish to visualise from the rate output.
#' @p... |
# find samples without vanB for Ali's spike-in experiment
qPCR = read.csv("../genome_alignments/qPCR results tabulated.csv", header = T)
manifest = read.csv("../genome_alignments/manifest.limited.csv", header = T)
no_vanB = qPCR[is.na(qPCR$VanB) & qPCR$Sample.ID %in% manifest$specimen, ]
no_vanB[no_vanB$Sample.ID %i... | /R_scripts/2021_05_19_qPCR_fastq_linking.R | no_license | joycewang914/LDV-analysis | R | false | false | 333 | r | # find samples without vanB for Ali's spike-in experiment
qPCR = read.csv("../genome_alignments/qPCR results tabulated.csv", header = T)
manifest = read.csv("../genome_alignments/manifest.limited.csv", header = T)
no_vanB = qPCR[is.na(qPCR$VanB) & qPCR$Sample.ID %in% manifest$specimen, ]
no_vanB[no_vanB$Sample.ID %i... |
\name{\%cn\%}
\alias{\%cn\%}
\title{Partial Value Matching}
\usage{
%cn%(x, pattern)
}
\arguments{
\item{x}{the character vector to be matched. Missing
values are permitted.}
\item{pattern}{the pattern to be matched against, may be
a regular expression.}
}
\value{
A vector the same length as \code{x} of lo... | /man/zcn.Rd | permissive | tfransen/USGSwsBase | R | false | false | 614 | rd | \name{\%cn\%}
\alias{\%cn\%}
\title{Partial Value Matching}
\usage{
%cn%(x, pattern)
}
\arguments{
\item{x}{the character vector to be matched. Missing
values are permitted.}
\item{pattern}{the pattern to be matched against, may be
a regular expression.}
}
\value{
A vector the same length as \code{x} of lo... |
# Create a map of the lower 48 states of the USA as an SVG file
svg("usStates.svg")
k = maps::map('state', fill = TRUE, col = "white", main = "Cases By Day")
dev.off()
# Post-process the SVG file containing the map, finding the polygons for the different regions.
library(XML)
doc = xmlParse("usStates.svg")
paths = ge... | /animatedMap.R | no_license | Yesuunee/Covid-19-Interactive-Map- | R | false | false | 2,562 | r | # Create a map of the lower 48 states of the USA as an SVG file
svg("usStates.svg")
k = maps::map('state', fill = TRUE, col = "white", main = "Cases By Day")
dev.off()
# Post-process the SVG file containing the map, finding the polygons for the different regions.
library(XML)
doc = xmlParse("usStates.svg")
paths = ge... |
#' @importFrom readr read_csv
#' @export
read_eventlog_csv <- function(filename) {
# read given file
eventlog <- read_csv(filename)
# stop if case and event columns are not found
stopifnot(eventlog %hascols% c("caseid", "activity", "completeTime"))
# return log if there are no errors
eventlog
}
#'... | /R/trace_clustering.R | no_license | nirmalpatel/eduminer | R | false | false | 2,646 | r | #' @importFrom readr read_csv
#' @export
read_eventlog_csv <- function(filename) {
# read given file
eventlog <- read_csv(filename)
# stop if case and event columns are not found
stopifnot(eventlog %hascols% c("caseid", "activity", "completeTime"))
# return log if there are no errors
eventlog
}
#'... |
# This checks that the findFirstSphere function is operating properly.
# require(cydar); require(testthat); source("test-first.R")
set.seed(400)
test_that("findFirstSphere is working correctly", {
nhypers <- 1000
nmarkers <- 10
coords <- matrix(rnorm(nhypers*nmarkers, sd=1), ncol=nmarkers)
pval <- rb... | /tests/testthat/test-first.R | no_license | MarioniLab/cydar | R | false | false | 2,244 | r | # This checks that the findFirstSphere function is operating properly.
# require(cydar); require(testthat); source("test-first.R")
set.seed(400)
test_that("findFirstSphere is working correctly", {
nhypers <- 1000
nmarkers <- 10
coords <- matrix(rnorm(nhypers*nmarkers, sd=1), ncol=nmarkers)
pval <- rb... |
myfunction <- function() {
x <- rnorm(100)
mean(x)
}
second <- function(x) {
x + rnorm(lenght(x))
}
m <- matrix(1:6, nrow = 2, ncol = 3)
print(m)
m <- 1:10
print(m)
dim(m) <- c(2, 5)
print(m)
x <- 1:3
y <- 10:12
d <- cbind(x, y)
print(d)
e <- rbind(x, y)
print(e)
x <- factor(c("yes", "no", "yes", "yes", "no"... | /First file.R | no_license | joselucas28/Coursera-R | R | false | false | 1,585 | r | myfunction <- function() {
x <- rnorm(100)
mean(x)
}
second <- function(x) {
x + rnorm(lenght(x))
}
m <- matrix(1:6, nrow = 2, ncol = 3)
print(m)
m <- 1:10
print(m)
dim(m) <- c(2, 5)
print(m)
x <- 1:3
y <- 10:12
d <- cbind(x, y)
print(d)
e <- rbind(x, y)
print(e)
x <- factor(c("yes", "no", "yes", "yes", "no"... |
library("seqinr")
choosebank()
choosebank("genbank") # Specify that we want to search the 'genbank' ACNUC sub-database
choosebank("refseq") # Specify that we want to search the 'refseq' ACNUC sub-database
#then you use query()
choosebank("genbank")
query("SchistosomamRNA", "SP=Schistosoma mansoni AND M=mrna")
closeban... | /bio_3.R | no_license | rogiskhan/Bioinformatics-1.0 | R | false | false | 771 | r | library("seqinr")
choosebank()
choosebank("genbank") # Specify that we want to search the 'genbank' ACNUC sub-database
choosebank("refseq") # Specify that we want to search the 'refseq' ACNUC sub-database
#then you use query()
choosebank("genbank")
query("SchistosomamRNA", "SP=Schistosoma mansoni AND M=mrna")
closeban... |
###
# to check timings carefully do:
#
## remove all comment tags ##-t-## from kStepEstimator.R
## -> this costs about > 1sec per step in kStep
## but reveals where time is spent (better than too detailed R-prof
#
###
###
## this file is used for testing only
require(ROptEst)
ind <- rbinom(100, size=... | /inst/chkTimeCode/TimingChecks.R | no_license | cran/RobAStBase | R | false | false | 4,962 | r | ###
# to check timings carefully do:
#
## remove all comment tags ##-t-## from kStepEstimator.R
## -> this costs about > 1sec per step in kStep
## but reveals where time is spent (better than too detailed R-prof
#
###
###
## this file is used for testing only
require(ROptEst)
ind <- rbinom(100, size=... |
library(dplyr)
library(tidyr)
library(showtext)
library(igraph)
library(networkD3)
# import fonts
font.add.google("Poppins", "myfont")
showtext.auto()
# download data from Statistics New Zealand
X <- read.csv("http://www.stats.govt.nz/~/media/Statistics/Census/2013%20Census/profile-and-summary-reports/commuter-view-i... | /_working/0025_commuting_patterns.R | no_license | ellisp/blog-source | R | false | false | 4,713 | r | library(dplyr)
library(tidyr)
library(showtext)
library(igraph)
library(networkD3)
# import fonts
font.add.google("Poppins", "myfont")
showtext.auto()
# download data from Statistics New Zealand
X <- read.csv("http://www.stats.govt.nz/~/media/Statistics/Census/2013%20Census/profile-and-summary-reports/commuter-view-i... |
set.seed(100)
library(ggplot2)
library(grid)
library(gridExtra)
setwd(Sys.getenv("masters-thesis"))
source("Simulation/Heston.R")
source("Simulation/BlackScholes.R")
source("Simulation/Bursts.R")
source("Simulation/Jumps.R")
source("Estimation/pre-average.R")
source("Estimation/estimates.R")
p0 <- Sys.time()
#######... | /Figures2/12_new_QQ-plot.R | no_license | SebastianGPedersen/masters-thesis | R | false | false | 2,736 | r | set.seed(100)
library(ggplot2)
library(grid)
library(gridExtra)
setwd(Sys.getenv("masters-thesis"))
source("Simulation/Heston.R")
source("Simulation/BlackScholes.R")
source("Simulation/Bursts.R")
source("Simulation/Jumps.R")
source("Estimation/pre-average.R")
source("Estimation/estimates.R")
p0 <- Sys.time()
#######... |
testlist <- list(x = numeric(0), y = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(blorr:::blr_pairs_cpp,testlist)
str(result) | /blorr/inst/testfiles/blr_pairs_cpp/libFuzzer_blr_pairs_cpp/blr_pairs_cpp_valgrind_files/1609955505-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 131 | r | testlist <- list(x = numeric(0), y = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(blorr:::blr_pairs_cpp,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coo-shapedescriptors.R
\name{coo_tac}
\alias{coo_tac}
\title{Calculates the total absolute curvature of a shape}
\source{
Siobhan Braybrook.
}
\usage{
coo_tac(coo)
}
\arguments{
\item{coo}{a \code{matrix} of (x; y) coordinates or any \code{Co... | /man/coo_tac.Rd | no_license | mdelrio1/Momocs | R | false | true | 1,157 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coo-shapedescriptors.R
\name{coo_tac}
\alias{coo_tac}
\title{Calculates the total absolute curvature of a shape}
\source{
Siobhan Braybrook.
}
\usage{
coo_tac(coo)
}
\arguments{
\item{coo}{a \code{matrix} of (x; y) coordinates or any \code{Co... |
createData <-
function(n.case, n.control, mean.upper=13, mean.lower=5, sd.upper=1, sd.lower=1,
n.features = 10000,
subtype1.feats = 1:5,
subtype2.feats = 6:10,
subtype3.feats = 11:15){
# features 1 through 15 are used to... | /R/createData.R | no_license | cran/FamilyRank | R | false | false | 1,277 | r | createData <-
function(n.case, n.control, mean.upper=13, mean.lower=5, sd.upper=1, sd.lower=1,
n.features = 10000,
subtype1.feats = 1:5,
subtype2.feats = 6:10,
subtype3.feats = 11:15){
# features 1 through 15 are used to... |
#' @rdname xAxis.c3
#' @family xAxis
#' @export
xAxis <- function(c3,
show = TRUE,
type = 'indexed',
localtime = NULL,
categories = NULL,
max = NULL,
min = NULL,
padding = list(),
... | /R/options.R | no_license | lukr90/c3 | R | false | false | 14,228 | r |
#' @rdname xAxis.c3
#' @family xAxis
#' @export
xAxis <- function(c3,
show = TRUE,
type = 'indexed',
localtime = NULL,
categories = NULL,
max = NULL,
min = NULL,
padding = list(),
... |
set.seed(1)
values <- rnorm(5)
mean(values)
t <- sqrt(5) * mean(values)/sd(values)
t
set.seed(1)
ttestgenerator <- function(n) {
X <- rnorm(n)
tstat <- (sqrt(n)*mean(X))/sd(X)
return(tstat)
}
B <- 1000
ttests <- replicate(B, ttestgenerator(5))
mean(ttests>=2)
library(rafalib)
mypar(3,2)
Ns<-seq(5,30,5)
B <- 1... | /monteCarloExercises.R | no_license | surajK610/Stats-and-R | R | false | false | 1,598 | r | set.seed(1)
values <- rnorm(5)
mean(values)
t <- sqrt(5) * mean(values)/sd(values)
t
set.seed(1)
ttestgenerator <- function(n) {
X <- rnorm(n)
tstat <- (sqrt(n)*mean(X))/sd(X)
return(tstat)
}
B <- 1000
ttests <- replicate(B, ttestgenerator(5))
mean(ttests>=2)
library(rafalib)
mypar(3,2)
Ns<-seq(5,30,5)
B <- 1... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Returns a value of the correlation sum. No NAs assumed.
#'
#' @param x the vector
#' @param r distance coefficient
#' @export
corrSum <- function(x, r) {
.Call('Rgrassproc_corrSum', PACK... | /R/RcppExports.R | no_license | kongra/Rgrassproc | R | false | false | 567 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Returns a value of the correlation sum. No NAs assumed.
#'
#' @param x the vector
#' @param r distance coefficient
#' @export
corrSum <- function(x, r) {
.Call('Rgrassproc_corrSum', PACK... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gnr_resolve.R
\name{gnr_resolve}
\alias{gnr_resolve}
\title{Resolve names using Global Names Resolver.}
\usage{
gnr_resolve(names, data_source_ids = NULL, resolve_once = FALSE,
with_context = FALSE, canonical = FALSE, highestscore = TRUE,
... | /man/gnr_resolve.Rd | permissive | fozy81/taxize | R | false | true | 6,215 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gnr_resolve.R
\name{gnr_resolve}
\alias{gnr_resolve}
\title{Resolve names using Global Names Resolver.}
\usage{
gnr_resolve(names, data_source_ids = NULL, resolve_once = FALSE,
with_context = FALSE, canonical = FALSE, highestscore = TRUE,
... |
#' Format a parttime object
#'
#' @param x A `partial_time` object
#' @param ... Additional arguments passed to \link{format_field_matrix}
#' @param quote A `logical` indicating whether to add quotation marks around
#' formatted objects
#'
#' @return A `character` vector representation of a `partial_time` vector
#'
#... | /R/class_partial_time_format.R | permissive | dgkf/parttime | R | false | false | 3,800 | r | #' Format a parttime object
#'
#' @param x A `partial_time` object
#' @param ... Additional arguments passed to \link{format_field_matrix}
#' @param quote A `logical` indicating whether to add quotation marks around
#' formatted objects
#'
#' @return A `character` vector representation of a `partial_time` vector
#'
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ecomplex.R
\name{ecomplex}
\alias{ecomplex}
\title{Compute the epsilon-complexity of a time series.}
\usage{
ecomplex(x, ds = 6, max_degree = 5, method = c("cspline", "bspline",
"lift", "all"), err_norm = c("mae", "mse", "max"), sample_type... | /man/ecomplex.Rd | permissive | nateaff/ecomplex | R | false | true | 1,429 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ecomplex.R
\name{ecomplex}
\alias{ecomplex}
\title{Compute the epsilon-complexity of a time series.}
\usage{
ecomplex(x, ds = 6, max_degree = 5, method = c("cspline", "bspline",
"lift", "all"), err_norm = c("mae", "mse", "max"), sample_type... |
#' @title Project rasters onto a set of EOFs.
#' @description \code{proj.raster.EOFs} projects a set of rasters contained in a list onto an existing set of Empirical Orthogonal Functions (EOFs).
#' #'
#' @param rasterList is a list containing raster objects.
#' @param EOFs is a matrix whose columns contain individual E... | /R/proj.raster.EOFs.R | no_license | dpagendam/deepLearningR | R | false | false | 1,037 | r | #' @title Project rasters onto a set of EOFs.
#' @description \code{proj.raster.EOFs} projects a set of rasters contained in a list onto an existing set of Empirical Orthogonal Functions (EOFs).
#' #'
#' @param rasterList is a list containing raster objects.
#' @param EOFs is a matrix whose columns contain individual E... |
library(RPMG)
### Name: itoxyz
### Title: Vector Index to Matrix Index
### Aliases: itoxyz
### Keywords: misc
### ** Examples
itoxyz(24, 6, 6, 1)
kpos = itoxyz(2443:2500 , 20, 20, 13)
| /data/genthat_extracted_code/RPMG/examples/xyztoi.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 196 | r | library(RPMG)
### Name: itoxyz
### Title: Vector Index to Matrix Index
### Aliases: itoxyz
### Keywords: misc
### ** Examples
itoxyz(24, 6, 6, 1)
kpos = itoxyz(2443:2500 , 20, 20, 13)
|
library(here)
library(Hmisc)
install.packages("remotes")
remotes::install_github("dustinfife/fifer")
library(fifer)
# #Plot variant locations function
snpLocLine <- function(list, list2 = NA, col1 = "purple", col2 = "orange", col3 = "purple", listOrient="single"){
j <- 0
k <- 0
par(mfrow=c(14, 1), mar=c(0.5, 1, 1,... | /scripts/05-cladeAB.R | no_license | acgerstein/UgClGenomics | R | false | false | 12,228 | r | library(here)
library(Hmisc)
install.packages("remotes")
remotes::install_github("dustinfife/fifer")
library(fifer)
# #Plot variant locations function
snpLocLine <- function(list, list2 = NA, col1 = "purple", col2 = "orange", col3 = "purple", listOrient="single"){
j <- 0
k <- 0
par(mfrow=c(14, 1), mar=c(0.5, 1, 1,... |
library(tidyverse)
library(gridExtra)
setwd("/Volumes/ELDS/ECOLIMITS/Ghana/Kakum/")
year="2014"
season="1415"
dF.3<-read.csv(paste0(getwd(),"/Analysis/ES/Income.calculation.inputs.",season,".csv"))
#remove duplicates
dF.3 <- dF.3 %>% distinct(plot,.keep_all=T)
#cocoa price per 65 kg bag
kg<-65
bag_cedi<-350
#calcu... | /incomeCalculations.R | no_license | morellybutton/ES | R | false | false | 21,891 | r | library(tidyverse)
library(gridExtra)
setwd("/Volumes/ELDS/ECOLIMITS/Ghana/Kakum/")
year="2014"
season="1415"
dF.3<-read.csv(paste0(getwd(),"/Analysis/ES/Income.calculation.inputs.",season,".csv"))
#remove duplicates
dF.3 <- dF.3 %>% distinct(plot,.keep_all=T)
#cocoa price per 65 kg bag
kg<-65
bag_cedi<-350
#calcu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{synthetic.sub50}
\alias{synthetic.sub50}
\title{Samples subset of 10 pesudo periodic signals}
\format{A data table with a column for each signal:}
\usage{
synthetic.sub50
}
\description{
Sampling rate: 300ms for s... | /man/synthetic.sub50.Rd | no_license | cran/deadband | R | false | true | 713 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{synthetic.sub50}
\alias{synthetic.sub50}
\title{Samples subset of 10 pesudo periodic signals}
\format{A data table with a column for each signal:}
\usage{
synthetic.sub50
}
\description{
Sampling rate: 300ms for s... |
context('Create categorical variables template')
library(EMLassemblyline)
# Test usage with file inputs -------------------------------------------------
testthat::test_that('Test usage with file inputs', {
# write.file = TRUE writes files to path
file.copy(
from = system.file(
'/examples/templat... | /tests/testthat/test_template_categorical_variables.R | permissive | Ashley-LW/EMLassemblyline | R | false | false | 9,695 | r |
context('Create categorical variables template')
library(EMLassemblyline)
# Test usage with file inputs -------------------------------------------------
testthat::test_that('Test usage with file inputs', {
# write.file = TRUE writes files to path
file.copy(
from = system.file(
'/examples/templat... |
# Chap11_Descriptive Statistics
# 기술통계(Descriptive Statistics)
# 대푯값 : 평균(Mean), 합계(Sum), 중위수(Median), 최빈수(mode), 사분위수(quartile) 등
# 산포도 : 분산(Variance), 표준편차(Standard deviation), 최소값(Minimum), 최대값(Maximum), 범위(Range) 등
# 비대칭도 : 왜도(Skewness), 첨도(Kurtosis)
# 실습파일 가져오기
setwd("C:/ITWILL/2_Rwork/Part-III")
... | /Chap11_Descriptive Statistics.R | no_license | imitationray/stellaris | R | false | false | 6,037 | r | # Chap11_Descriptive Statistics
# 기술통계(Descriptive Statistics)
# 대푯값 : 평균(Mean), 합계(Sum), 중위수(Median), 최빈수(mode), 사분위수(quartile) 등
# 산포도 : 분산(Variance), 표준편차(Standard deviation), 최소값(Minimum), 최대값(Maximum), 범위(Range) 등
# 비대칭도 : 왜도(Skewness), 첨도(Kurtosis)
# 실습파일 가져오기
setwd("C:/ITWILL/2_Rwork/Part-III")
... |
getwd()
setwd("D:/Users/kploessl/Documents/R/R files/R-Prog-Assignment-3/R-Prog-Assignment-3")
outcome <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
## You may get a warning about NAs being introduced; that is okay
hist(outcomeData[, 23])
names(outcomeData)
install.packages("sqldf")
library(s... | /R-ProgAssignment3-v2.R | no_license | kploessl/R-Prog-Assignment-3 | R | false | false | 3,339 | r | getwd()
setwd("D:/Users/kploessl/Documents/R/R files/R-Prog-Assignment-3/R-Prog-Assignment-3")
outcome <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
## You may get a warning about NAs being introduced; that is okay
hist(outcomeData[, 23])
names(outcomeData)
install.packages("sqldf")
library(s... |
print.submean <-
function(x,...)
{
cat("\nsubmean object: Sub-sample mean estimate\n", sep="")
if(x$call$fpc == FALSE) cat("Without ")
else cat("With ")
cat("finite population correction.")
cat("\nUsing method: ", x$call$method, "\n", sep="")
cat("\nMean estimate: ", round(x$mean,4), "\n", sep="")
... | /R/print.submean.R | no_license | cran/samplingbook | R | false | false | 504 | r | print.submean <-
function(x,...)
{
cat("\nsubmean object: Sub-sample mean estimate\n", sep="")
if(x$call$fpc == FALSE) cat("Without ")
else cat("With ")
cat("finite population correction.")
cat("\nUsing method: ", x$call$method, "\n", sep="")
cat("\nMean estimate: ", round(x$mean,4), "\n", sep="")
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gpuMatix.R
\docType{methods}
\name{gpuMatrix}
\alias{gpuMatrix}
\alias{gpuEmptMatrix}
\alias{upload}
\alias{upload,gpuMatrix-method}
\alias{download}
\alias{download,gpuMatrix-method}
\alias{nrow}
\alias{nrow,gpuMatrix-method}
\alias{dim,gpuM... | /man/gpuMatrix.Rd | no_license | Jiefei-Wang/gpuMagic | R | false | true | 2,131 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gpuMatix.R
\docType{methods}
\name{gpuMatrix}
\alias{gpuMatrix}
\alias{gpuEmptMatrix}
\alias{upload}
\alias{upload,gpuMatrix-method}
\alias{download}
\alias{download,gpuMatrix-method}
\alias{nrow}
\alias{nrow,gpuMatrix-method}
\alias{dim,gpuM... |
#' eQTLUtils
#'
#' Collection of reusable R functions for eQTL mapping
#'
#' @name eQTLUtils
#' @docType package
#' @importFrom dplyr "%>%"
| /R/eQTLUtils-package.r | permissive | kauralasoo/eQTLUtils | R | false | false | 140 | r | #' eQTLUtils
#'
#' Collection of reusable R functions for eQTL mapping
#'
#' @name eQTLUtils
#' @docType package
#' @importFrom dplyr "%>%"
|
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Classes
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#' The Assay Class
#'
#' The \code{Assay} object is the basic unit of Seurat; for more details, please
#' see the documentation in \code{\link[Seu... | /R/reexports.R | permissive | satijalab/seurat | R | false | false | 8,314 | r |
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Classes
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#' The Assay Class
#'
#' The \code{Assay} object is the basic unit of Seurat; for more details, please
#' see the documentation in \code{\link[Seu... |
DB<-read.table("household_power_consumption.txt",header=T,sep=";")
db<-DB[DB$Date=="1/2/2007" | DB$Date=="2/2/2007",]
#I chose to use lubridate's function, that are more easy to handle
library(lubridate)
a<-dmy(db$Date)
b<-hms(db$Time)
db$time<-a+hours(hour(b))+minutes(minute(b))+seconds(second(b))
#reformating t... | /plot2.r | no_license | FraNoelVet/ExData_Plotting1 | R | false | false | 886 | r | DB<-read.table("household_power_consumption.txt",header=T,sep=";")
db<-DB[DB$Date=="1/2/2007" | DB$Date=="2/2/2007",]
#I chose to use lubridate's function, that are more easy to handle
library(lubridate)
a<-dmy(db$Date)
b<-hms(db$Time)
db$time<-a+hours(hour(b))+minutes(minute(b))+seconds(second(b))
#reformating t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.