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 |
|---|---|---|---|---|---|---|---|---|---|
testlist <- list(a = 0L, b = 0L, x = c(-21589L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, ... | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610387591-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 418 | r | testlist <- list(a = 0L, b = 0L, x = c(-21589L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, ... |
#' Symbolic Circle of Correlations
#' @name sym.circle.plot
#' @aliases sym.circle.plot
#' @author Oldemar Rodriguez Rojas
#' @description Plot the symbolic circle of correlations.
#' @usage sym.circle.plot(prin.corre)
#' @param prin.corre A symbolic interval data matrix with correlations between the variables and the
... | /R/sym.circle.plot.R | no_license | rcannood/RSDA | R | false | false | 2,484 | r | #' Symbolic Circle of Correlations
#' @name sym.circle.plot
#' @aliases sym.circle.plot
#' @author Oldemar Rodriguez Rojas
#' @description Plot the symbolic circle of correlations.
#' @usage sym.circle.plot(prin.corre)
#' @param prin.corre A symbolic interval data matrix with correlations between the variables and the
... |
## Use cache to save time in loops, specially if results of a calculation
## don't change between iterations.
## this function, called makeCacheMatrix, creates a list, that "saves"
## the solve of the matrix, after
## the first call of cacheSolve.
## If cacheSolve is called again, before another run of makeCacheMatrix... | /cachematrix.R | no_license | Stakseng/ProgrammingAssignment2 | R | false | false | 2,529 | r | ## Use cache to save time in loops, specially if results of a calculation
## don't change between iterations.
## this function, called makeCacheMatrix, creates a list, that "saves"
## the solve of the matrix, after
## the first call of cacheSolve.
## If cacheSolve is called again, before another run of makeCacheMatrix... |
<html>
<head>
<meta name="TextLength" content="SENT_NUM:2, WORD_NUM:58">
</head>
<body bgcolor="white">
<a href="#0" id="0">We then create a training instance for each pair of two consecutive basic edits: if two consecutive basic edits need to be merged, we will mark the outcome as True , otherwise it is False .</a>
<a... | /ACL-Dataset/Summary_rnd/P14-2098.xhtml.A.R | no_license | Angela7126/SLNSumEval | R | false | false | 489 | r | <html>
<head>
<meta name="TextLength" content="SENT_NUM:2, WORD_NUM:58">
</head>
<body bgcolor="white">
<a href="#0" id="0">We then create a training instance for each pair of two consecutive basic edits: if two consecutive basic edits need to be merged, we will mark the outcome as True , otherwise it is False .</a>
<a... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/autoplot.klm.R
\name{autoplot.klm}
\alias{autoplot.klm}
\title{Builds a ggplot object to plot parameter estimates against distance}
\usage{
autoplot.klm(x, ...)
}
\arguments{
\item{x}{A \code{\link{klm}} object.}
\item{...}{additional argume... | /man/autoplot.klm.Rd | no_license | BagchiLab-Uconn/RSPPlme4 | R | false | true | 903 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/autoplot.klm.R
\name{autoplot.klm}
\alias{autoplot.klm}
\title{Builds a ggplot object to plot parameter estimates against distance}
\usage{
autoplot.klm(x, ...)
}
\arguments{
\item{x}{A \code{\link{klm}} object.}
\item{...}{additional argume... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/drawing.R
\name{drawUtilityPlots}
\alias{drawUtilityPlots}
\title{Draw marginal value functions and chart of alternative utilities}
\usage{
drawUtilityPlots(problem, solution, printLabels = TRUE, criteria = NULL,
plotsPerRow ... | /man/drawUtilityPlots.Rd | no_license | cran/rorutadis | R | false | false | 1,358 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/drawing.R
\name{drawUtilityPlots}
\alias{drawUtilityPlots}
\title{Draw marginal value functions and chart of alternative utilities}
\usage{
drawUtilityPlots(problem, solution, printLabels = TRUE, criteria = NULL,
plotsPerRow ... |
# 09/20/2020
# 13 - Date and Times
library(tidyverse)
library(lubridate)
library(nycflights13)
today()
now()
ymd("2017-01-31")
mdy("January 31st, 2017")
dmy("31-Jan-2017")
ymd(20170131)
ymd_hms("2017-01-31 20:11:59")
mdy_hm("01/31/2017 08:01")
ymd(20170131, tz = "UTC")
flights %>%
select(year, month, day, hou... | /insights/13-date-lubridate.R | no_license | eacatalyst/insights-with-r | R | false | false | 4,000 | r | # 09/20/2020
# 13 - Date and Times
library(tidyverse)
library(lubridate)
library(nycflights13)
today()
now()
ymd("2017-01-31")
mdy("January 31st, 2017")
dmy("31-Jan-2017")
ymd(20170131)
ymd_hms("2017-01-31 20:11:59")
mdy_hm("01/31/2017 08:01")
ymd(20170131, tz = "UTC")
flights %>%
select(year, month, day, hou... |
context("test build_lm part 2")
test_that("binary prediction with character target column", {
test_data <- structure(
list(
`CANCELLED X` = c("N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "Y", "N", "Y", "N"),
`Carrier Name` = c("Delta Air Lines", "American Eagle", "Am... | /tests/testthat/test_build_lm_1.R | permissive | exploratory-io/exploratory_func | R | false | false | 41,191 | r | context("test build_lm part 2")
test_that("binary prediction with character target column", {
test_data <- structure(
list(
`CANCELLED X` = c("N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "Y", "N", "Y", "N"),
`Carrier Name` = c("Delta Air Lines", "American Eagle", "Am... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helper.r
\name{limitCovariatesToPopulation}
\alias{limitCovariatesToPopulation}
\title{function to limit covariates of plpData to population}
\usage{
limitCovariatesToPopulation(covariates, rowIds)
}
\description{
function to limit covariates... | /man/limitCovariatesToPopulation.Rd | no_license | JaehyeongCho/Argos | R | false | true | 348 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helper.r
\name{limitCovariatesToPopulation}
\alias{limitCovariatesToPopulation}
\title{function to limit covariates of plpData to population}
\usage{
limitCovariatesToPopulation(covariates, rowIds)
}
\description{
function to limit covariates... |
#' <Add Title>
#'
#' <Add Description>
#'
#' @import htmlwidgets
#'
#' @export
rpivotTable <- function(message = NULL, width = NULL, height = NULL) {
# forward options using x
x = message
# list(
# message = message
# )
# create widget
htmlwidgets::createWidget(
name = 'rpivotTable',
x,
... | /R/rpivotTable.R | no_license | arturochian/rpivotTable | R | false | false | 870 | r | #' <Add Title>
#'
#' <Add Description>
#'
#' @import htmlwidgets
#'
#' @export
rpivotTable <- function(message = NULL, width = NULL, height = NULL) {
# forward options using x
x = message
# list(
# message = message
# )
# create widget
htmlwidgets::createWidget(
name = 'rpivotTable',
x,
... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(1.42266834764401e+82, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 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(CNull:::communities_individual_... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615775852-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 362 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(1.42266834764401e+82, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 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(CNull:::communities_individual_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dprime.R
\name{dprime}
\alias{dprime}
\title{Dprime and Other Signal Detection Theory indices.}
\usage{
dprime(n_hit, n_fa, n_miss = NULL, n_cr = NULL, n_targets = NULL,
n_distractors = NULL, adjusted = TRUE)
}
\arguments{
\item{n_hit}{Numb... | /man/dprime.Rd | permissive | HugoNjb/psycho.R | R | false | true | 2,889 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dprime.R
\name{dprime}
\alias{dprime}
\title{Dprime and Other Signal Detection Theory indices.}
\usage{
dprime(n_hit, n_fa, n_miss = NULL, n_cr = NULL, n_targets = NULL,
n_distractors = NULL, adjusted = TRUE)
}
\arguments{
\item{n_hit}{Numb... |
#' d1_upload
#'
#' upload an object to dataone
#' @param object new data file to be uploaded
#' @param uid the user id of the data maintainer
#' @param id what identifier should be used for the object; default will try and guess from object metadata (e.g. EML metadata).
#' @param cert path to the x509 certificate from ... | /R/d1_upload.R | no_license | cboettig/dataone-lite | R | false | false | 1,715 | r | #' d1_upload
#'
#' upload an object to dataone
#' @param object new data file to be uploaded
#' @param uid the user id of the data maintainer
#' @param id what identifier should be used for the object; default will try and guess from object metadata (e.g. EML metadata).
#' @param cert path to the x509 certificate from ... |
#List example: employee details
ID=c(1,2,3,4)
emp.name=c("man","rag","sha","din")
num.emp=4
emp.list=list(ID,emp.name,num.emp)
print(emp.list)
#accessing components(by names)
print(emp.list[[1]])
print(emp.list[[2]])
print(emp.list[[2]][1])
print(emp.list$Names)
#Manipulating list
emp.list[[2]][5]="Nir"
em... | /scr.R | no_license | wascodigama/hello-programs | R | false | false | 463 | r | #List example: employee details
ID=c(1,2,3,4)
emp.name=c("man","rag","sha","din")
num.emp=4
emp.list=list(ID,emp.name,num.emp)
print(emp.list)
#accessing components(by names)
print(emp.list[[1]])
print(emp.list[[2]])
print(emp.list[[2]][1])
print(emp.list$Names)
#Manipulating list
emp.list[[2]][5]="Nir"
em... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glance_data.R
\name{glance_data}
\alias{glance_data}
\title{Glance Data}
\usage{
glance_data(x, limit2tally = 20)
}
\arguments{
\item{x}{A dataframe with named columns.}
\item{limit2tally}{One of the summaries is a tally of the distinct
valu... | /man/glance_data.Rd | no_license | cran/glancedata | R | false | true | 1,673 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glance_data.R
\name{glance_data}
\alias{glance_data}
\title{Glance Data}
\usage{
glance_data(x, limit2tally = 20)
}
\arguments{
\item{x}{A dataframe with named columns.}
\item{limit2tally}{One of the summaries is a tally of the distinct
valu... |
# loading the data set
bank_full<-read.csv(file.choose())
summary(bank_full) # basic statistics and business movement decessions
str(bank_full)
attach(bank_full)
plot(bank_full$y) #visuvalization on yes and no senario wether client has term deposit taken or not
model<- glm(y~.,data=bank_full,family = "binom... | /ExcelR-solution-assignments-/logistic regression/bank_full(logistic regression).R | no_license | jinka161997/ExcelR-solution-assignments- | R | false | false | 764 | r | # loading the data set
bank_full<-read.csv(file.choose())
summary(bank_full) # basic statistics and business movement decessions
str(bank_full)
attach(bank_full)
plot(bank_full$y) #visuvalization on yes and no senario wether client has term deposit taken or not
model<- glm(y~.,data=bank_full,family = "binom... |
# Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... | /mepstrends/hc_use/json/code/r/meanEXP__sex__poverty__.r | permissive | RandomCriticalAnalysis/MEPS-summary-tables | R | false | false | 1,509 | r | # Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... |
#Importing the dataset
dataset = read.csv('Salary_Data.csv')
#dataset = dataset[, 2:3]
#Splitting data into training and test set
#install.packages('caTools')
library(caTools)
set.seed(123)
split = sample.split(dataset$Salary, SplitRatio = 2/3)
training_set = subset(dataset, split == TRUE)
test_set = subset(dataset, s... | /Part 2 - Regression/Section 4 - Simple Linear Regression/data_preprocessing_template.R | no_license | snehpahilwani/udemy-python-machinelearningaz | R | false | false | 1,501 | r | #Importing the dataset
dataset = read.csv('Salary_Data.csv')
#dataset = dataset[, 2:3]
#Splitting data into training and test set
#install.packages('caTools')
library(caTools)
set.seed(123)
split = sample.split(dataset$Salary, SplitRatio = 2/3)
training_set = subset(dataset, split == TRUE)
test_set = subset(dataset, s... |
predict.fRegress <- function(object, newdata=NULL, se.fit = FALSE,
interval = c("none", "confidence", "prediction"),
level = 0.95, ...){
##
## 1. fit ???
##
if(is.null(newdata))
pred <- object$yhatfdobj
else{
nx <- length(object$xfdlist)
Nnew <- length(newdata)
pred <- rep(0, Nnew)
fo... | /R/predict.fRegress.R | no_license | bonniewan/fda | R | false | false | 731 | r | predict.fRegress <- function(object, newdata=NULL, se.fit = FALSE,
interval = c("none", "confidence", "prediction"),
level = 0.95, ...){
##
## 1. fit ???
##
if(is.null(newdata))
pred <- object$yhatfdobj
else{
nx <- length(object$xfdlist)
Nnew <- length(newdata)
pred <- rep(0, Nnew)
fo... |
#!/usr/local/bin/Rscript --vanilla
# compiles all .Rmd files in _R directory into .md files in blog directory,
# if the input file is older than the output file.
# run ./knitpages.R to update all knitr files that need to be updated.
# run this script from your base content directory
library(knitr)
#' Knit Post
#'
#... | /maazinr/R/knitpages.R | no_license | maazinansari/maazinansari | R | false | false | 1,612 | r | #!/usr/local/bin/Rscript --vanilla
# compiles all .Rmd files in _R directory into .md files in blog directory,
# if the input file is older than the output file.
# run ./knitpages.R to update all knitr files that need to be updated.
# run this script from your base content directory
library(knitr)
#' Knit Post
#'
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/single_effect_regression.R
\name{single_effect_regression}
\alias{single_effect_regression}
\title{Bayesian single-effect linear regression of Y on X}
\usage{
single_effect_regression(Y, X, sa2 = 1, s2 = 1, optimize_sa2 = FALSE)
}
\arguments{... | /man/single_effect_regression.Rd | no_license | jhmarcus/susieR | R | false | true | 1,282 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/single_effect_regression.R
\name{single_effect_regression}
\alias{single_effect_regression}
\title{Bayesian single-effect linear regression of Y on X}
\usage{
single_effect_regression(Y, X, sa2 = 1, s2 = 1, optimize_sa2 = FALSE)
}
\arguments{... |
\name{soboltouati}
\alias{soboltouati}
\alias{tell.soboltouati}
\alias{print.soboltouati}
\alias{plot.soboltouati}
\alias{ggplot.soboltouati}
\title{Monte Carlo Estimation of Sobol' Indices (formulas of Martinez (2011) and Touati (2016))}
\description{
\code{soboltouati} implements the Monte Carlo estimat... | /man/soboltouati.Rd | no_license | cran/sensitivity | R | false | false | 4,322 | rd | \name{soboltouati}
\alias{soboltouati}
\alias{tell.soboltouati}
\alias{print.soboltouati}
\alias{plot.soboltouati}
\alias{ggplot.soboltouati}
\title{Monte Carlo Estimation of Sobol' Indices (formulas of Martinez (2011) and Touati (2016))}
\description{
\code{soboltouati} implements the Monte Carlo estimat... |
library(checkarg)
### Name: isNegativeNumberOrNaOrInfVectorOrNull
### Title: Wrapper for the checkarg function, using specific parameter
### settings.
### Aliases: isNegativeNumberOrNaOrInfVectorOrNull
### ** Examples
isNegativeNumberOrNaOrInfVectorOrNull(-2)
# returns TRUE (argument is valid)
isNegativeNumber... | /data/genthat_extracted_code/checkarg/examples/isNegativeNumberOrNaOrInfVectorOrNull.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 942 | r | library(checkarg)
### Name: isNegativeNumberOrNaOrInfVectorOrNull
### Title: Wrapper for the checkarg function, using specific parameter
### settings.
### Aliases: isNegativeNumberOrNaOrInfVectorOrNull
### ** Examples
isNegativeNumberOrNaOrInfVectorOrNull(-2)
# returns TRUE (argument is valid)
isNegativeNumber... |
setwd("./project")
# set parall compute
library(doMC) # install.packages('doMC')
registerDoMC(4) #adjust to your number of cores
library(caret)
tmp_ds<-read.csv("pml-training.csv", na.strings=c("NA","","#DIV/0!"))
# train_ds<-read.csv("pml-training.csv")
test_ds<-read.csv("pml-testing.csv", na.strings=c("NA","","#DI... | /project/p2.R | no_license | gdwangh/coursera-dataScientists-8-Practical-Machine-Learning | R | false | false | 3,940 | r | setwd("./project")
# set parall compute
library(doMC) # install.packages('doMC')
registerDoMC(4) #adjust to your number of cores
library(caret)
tmp_ds<-read.csv("pml-training.csv", na.strings=c("NA","","#DIV/0!"))
# train_ds<-read.csv("pml-training.csv")
test_ds<-read.csv("pml-testing.csv", na.strings=c("NA","","#DI... |
#' # Title of R Project Here
#+ knitr setup, include=FALSE
# some setup options for outputing markdown files; feel free to ignore these
# These are the default options for this report; more information about options here: https://yihui.name/knitr/options/
knitr::opts_chunk$set(eval = TRUE, # evaluate code chunks
... | /R_analyses_template_spin_ready.R | no_license | hhollandmoritz/Useful_templates | R | false | false | 1,914 | r | #' # Title of R Project Here
#+ knitr setup, include=FALSE
# some setup options for outputing markdown files; feel free to ignore these
# These are the default options for this report; more information about options here: https://yihui.name/knitr/options/
knitr::opts_chunk$set(eval = TRUE, # evaluate code chunks
... |
#library(doParallel)
#require(foreach)
# paralle setting
#cl <- makeCluster(2)
#registerDoParallel(cl)
# list .vcf.gz files
original_file_dir = "~/data/HLI/"
destination_dir = "~/data/HLI_filtered/"
#reference_dir = "~/data/references/hg38_ucsc.sdf"
#combined_dir = "~/data/HLI_output/combined_cases/"
filenames <- lis... | /scripts/aws_ec2_RTG_vcffilter_keepPASS.R | permissive | hhuang2018/WGS_analysis | R | false | false | 2,667 | r | #library(doParallel)
#require(foreach)
# paralle setting
#cl <- makeCluster(2)
#registerDoParallel(cl)
# list .vcf.gz files
original_file_dir = "~/data/HLI/"
destination_dir = "~/data/HLI_filtered/"
#reference_dir = "~/data/references/hg38_ucsc.sdf"
#combined_dir = "~/data/HLI_output/combined_cases/"
filenames <- lis... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connect_operations.R
\name{connect_start_contact_recording}
\alias{connect_start_contact_recording}
\title{Starts recording the contact:}
\usage{
connect_start_contact_recording(
InstanceId,
ContactId,
InitialContactId,
VoiceRecording... | /cran/paws.customer.engagement/man/connect_start_contact_recording.Rd | permissive | paws-r/paws | R | false | true | 1,064 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connect_operations.R
\name{connect_start_contact_recording}
\alias{connect_start_contact_recording}
\title{Starts recording the contact:}
\usage{
connect_start_contact_recording(
InstanceId,
ContactId,
InitialContactId,
VoiceRecording... |
#### Test for significant changes in the predicted yield values for the climate period ####
'
- Load the tidy data
- Filter for climate models
- Filter for the reference and climate periods
- Make on data.frame including the observations for all three climate periods
- Group by comIds and apply test to each cohort
- Co... | /script_raw/WilcoxonTest.R | no_license | MikyPiky/Project2Script | R | false | false | 18,889 | r | #### Test for significant changes in the predicted yield values for the climate period ####
'
- Load the tidy data
- Filter for climate models
- Filter for the reference and climate periods
- Make on data.frame including the observations for all three climate periods
- Group by comIds and apply test to each cohort
- Co... |
setwd( "C:/Users/janja/Desktop/HarrisBurg/Semester 2/506 - Exploratory Data Analytics/Code Portfolio")
library(readr)
# To load CSV file
ozone <- read_csv("US EPA data 2017.csv")
View(ozone)
#rewrite the names of the columns to remove any spaces.
names(ozone) <- make.names(names(ozone))
# To check the numb... | /Code Portfolio/Week3/week3.R | no_license | njanjam1/EDA | R | false | false | 1,953 | r | setwd( "C:/Users/janja/Desktop/HarrisBurg/Semester 2/506 - Exploratory Data Analytics/Code Portfolio")
library(readr)
# To load CSV file
ozone <- read_csv("US EPA data 2017.csv")
View(ozone)
#rewrite the names of the columns to remove any spaces.
names(ozone) <- make.names(names(ozone))
# To check the numb... |
anual(rgb(0,0,1), rgb(0.6156862745098039,0.7333333333333333,1))
rm(list = ls())
ENC<- cargaMasiva("matrimonios/matrimonios")
g1<- graficaLinea(ENC$"Hoja2", inicio = 60, rotar = "h")
exportarLatex("graficas/matrimonios/1_01.tex", g1)
g1<- graficaColCategorias(ENC$"Hoja3", etiquetasCategorias = "A",a... | /MATRIMONIOS.R | no_license | hugoallan9/UNFACOMPENDIO | R | false | false | 1,254 | r |
anual(rgb(0,0,1), rgb(0.6156862745098039,0.7333333333333333,1))
rm(list = ls())
ENC<- cargaMasiva("matrimonios/matrimonios")
g1<- graficaLinea(ENC$"Hoja2", inicio = 60, rotar = "h")
exportarLatex("graficas/matrimonios/1_01.tex", g1)
g1<- graficaColCategorias(ENC$"Hoja3", etiquetasCategorias = "A",a... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{df_ex}
\alias{df_ex}
\title{Pivot table in data frame with with thousands indicator and decimal numbers}
\format{
A data frame.
}
\usage{
df_ex
}
\description{
Pivot table in data frame with with thousands indicato... | /man/df_ex.Rd | permissive | josesamos/flattabler | R | false | true | 525 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{df_ex}
\alias{df_ex}
\title{Pivot table in data frame with with thousands indicator and decimal numbers}
\format{
A data frame.
}
\usage{
df_ex
}
\description{
Pivot table in data frame with with thousands indicato... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{dm6_NcoI_10000}
\alias{dm6_NcoI_10000}
\title{Genomic features for dm6 genome and NcoI restriction enzyme at 10 Kbp}
\format{A data frame with 13758 rows and 5 variables:
\describe{
\item{chr:}{chromosome}
\... | /man/dm6_NcoI_10000.Rd | no_license | 4DGenome/hicfeatures | R | false | true | 842 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{dm6_NcoI_10000}
\alias{dm6_NcoI_10000}
\title{Genomic features for dm6 genome and NcoI restriction enzyme at 10 Kbp}
\format{A data frame with 13758 rows and 5 variables:
\describe{
\item{chr:}{chromosome}
\... |
#' @title fun_name
#'
#' @description kolejna funkcja podmieniona
#'
#' @param param fun_name
#'
#'
#'
#' @export
unique.array<- function(params){
rap <- c("Czesc czesc tu Sebol nawija, Mordo nie ma gandy a ja wbijam klina",
"Tutaj start, mega bujanka. Zaczynamy tutaj strefe jaranka",
... | /R/unique.array.R | no_license | granatb/RapeR | R | false | false | 679 | r |
#' @title fun_name
#'
#' @description kolejna funkcja podmieniona
#'
#' @param param fun_name
#'
#'
#'
#' @export
unique.array<- function(params){
rap <- c("Czesc czesc tu Sebol nawija, Mordo nie ma gandy a ja wbijam klina",
"Tutaj start, mega bujanka. Zaczynamy tutaj strefe jaranka",
... |
## ----cache=TRUE----------------------------------------------------------
storm <- read.csv(bzfile("repdata_data_StormData.csv.bz2"))
## ------------------------------------------------------------------------
# number of unique event types
length(unique(storm$EVTYPE))
# translate all letters to lowercase
e... | /storm_analysis.R | no_license | vikramvishal/datasharing | R | false | false | 4,454 | r | ## ----cache=TRUE----------------------------------------------------------
storm <- read.csv(bzfile("repdata_data_StormData.csv.bz2"))
## ------------------------------------------------------------------------
# number of unique event types
length(unique(storm$EVTYPE))
# translate all letters to lowercase
e... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cloudwatch_operations.R
\name{cloudwatch_put_dashboard}
\alias{cloudwatch_put_dashboard}
\title{Creates a dashboard if it does not already exist, or updates an existing
dashboard}
\usage{
cloudwatch_put_dashboard(DashboardName, DashboardBody)... | /cran/paws.management/man/cloudwatch_put_dashboard.Rd | permissive | paws-r/paws | R | false | true | 1,346 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cloudwatch_operations.R
\name{cloudwatch_put_dashboard}
\alias{cloudwatch_put_dashboard}
\title{Creates a dashboard if it does not already exist, or updates an existing
dashboard}
\usage{
cloudwatch_put_dashboard(DashboardName, DashboardBody)... |
rm(list=ls())
##colnames(north_05) = c("Time","Pressure (mH2O)")
data = readLines("data/T3_thermistor_array.csv")
data = data[c(-1)]
data = read.csv(textConnection(data),stringsAsFactors=FALSE,header=FALSE)
data[[1]] = strptime(data[[1]],format="%m/%d/%Y %H:%M",tz="GMT")
thermistor = data.frame(data)
colnames(thermist... | /sensitivity/themistor/plot_pressure.data.R | no_license | mrubayet/archived_codes_for_sfa_modeling | R | false | false | 3,583 | r | rm(list=ls())
##colnames(north_05) = c("Time","Pressure (mH2O)")
data = readLines("data/T3_thermistor_array.csv")
data = data[c(-1)]
data = read.csv(textConnection(data),stringsAsFactors=FALSE,header=FALSE)
data[[1]] = strptime(data[[1]],format="%m/%d/%Y %H:%M",tz="GMT")
thermistor = data.frame(data)
colnames(thermist... |
# set locale to english on windows platform
Sys.setlocale(category = "LC_ALL", locale = "English_United States.1252")
# 1.read data
hpc <- read.csv("household_power_consumption.txt", sep=";", stringsAsFactors=FALSE)
# 2.subset by dates 2007-02-01 and 2007-02-02
hpc_sub <- subset(hpc, Date == "1/2/2007"| Date == "2/2/20... | /plot1.R | no_license | jhcheng/ExData_Plotting1 | R | false | false | 533 | r | # set locale to english on windows platform
Sys.setlocale(category = "LC_ALL", locale = "English_United States.1252")
# 1.read data
hpc <- read.csv("household_power_consumption.txt", sep=";", stringsAsFactors=FALSE)
# 2.subset by dates 2007-02-01 and 2007-02-02
hpc_sub <- subset(hpc, Date == "1/2/2007"| Date == "2/2/20... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{hcr_set_recErrors}
\alias{hcr_set_recErrors}
\title{HCR: Setup of recruitment error structure}
\usage{
hcr_set_recErrors(d, ctr)
}
\arguments{
\item{d}{XXX}
\item{ctr}{XXX}
}
\description{
XXX
}
| /man/hcr_set_recErrors.Rd | no_license | einarhjorleifsson/fishvise | R | false | false | 256 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{hcr_set_recErrors}
\alias{hcr_set_recErrors}
\title{HCR: Setup of recruitment error structure}
\usage{
hcr_set_recErrors(d, ctr)
}
\arguments{
\item{d}{XXX}
\item{ctr}{XXX}
}
\description{
XXX
}
|
#--------------------------------------------------------------------------------------------------
# LOAD DATA
#--------------------------------------------------------------------------------------------------
## library(rcellminerUtilsCDB)
load("./data/drugSynonymTab.RData")
temptable=drugSynonymTab
dim(temptable)
#... | /inst/drugMatching/UpdateDrugMatchTab_LMP744_GDSC.R | no_license | CBIIT/rcellminerUtilsCDB | R | false | false | 589 | r | #--------------------------------------------------------------------------------------------------
# LOAD DATA
#--------------------------------------------------------------------------------------------------
## library(rcellminerUtilsCDB)
load("./data/drugSynonymTab.RData")
temptable=drugSynonymTab
dim(temptable)
#... |
# ....###....##....##....###....##.......##....##..######..####..######.
# ...##.##...###...##...##.##...##........##..##..##....##..##..##....##
# ..##...##..####..##..##...##..##.........####...##........##..##......
# .##.....##.##.##.##.##.....##.##..........##.....######...##...######.
# .#########.##..####.######... | /analysisBlock2.R | no_license | Sage-Bionetworks/synapsify-demo | R | false | false | 1,830 | r | # ....###....##....##....###....##.......##....##..######..####..######.
# ...##.##...###...##...##.##...##........##..##..##....##..##..##....##
# ..##...##..####..##..##...##..##.........####...##........##..##......
# .##.....##.##.##.##.##.....##.##..........##.....######...##...######.
# .#########.##..####.######... |
library(shiny)
library(tidyverse)
library(magrittr)
library(gapminder)
gapminder %<>% mutate_at(c("year", "country"), as.factor)
gapminder_years = levels(gapminder$year) %>% str_sort()
gapminder_countries = levels(gapminder$country)
dataPanel <- tabPanel("Data", tableOutput("data"))
plotPanel <- tabPanel("Plot",
... | /app.R | no_license | bernardo-dauria/2021-rshiny-case-study | R | false | false | 1,833 | r | library(shiny)
library(tidyverse)
library(magrittr)
library(gapminder)
gapminder %<>% mutate_at(c("year", "country"), as.factor)
gapminder_years = levels(gapminder$year) %>% str_sort()
gapminder_countries = levels(gapminder$country)
dataPanel <- tabPanel("Data", tableOutput("data"))
plotPanel <- tabPanel("Plot",
... |
# Extract the data for the required dates
dataFile <- paste0(getwd(),"/household_power_consumption.txt")
startIndex <- grep("1/2/2007", readLines(dataFile))[1]
endIndex <- grep("3/2/2007", readLines(dataFile))[1]
data <- read.table(dataFile,
header=FALSE,sep=";",na.strings="?",stringsAsFactors=FALSE... | /plot3.R | no_license | frenzyfortune/ExData_Plotting1 | R | false | false | 1,061 | r | # Extract the data for the required dates
dataFile <- paste0(getwd(),"/household_power_consumption.txt")
startIndex <- grep("1/2/2007", readLines(dataFile))[1]
endIndex <- grep("3/2/2007", readLines(dataFile))[1]
data <- read.table(dataFile,
header=FALSE,sep=";",na.strings="?",stringsAsFactors=FALSE... |
########## Week 1 - Lecture Notes ##########
myfunction <- function() {
x <- rnorm(100)
print(x)
mean(x)
}
second <- function(x) {
x + rnorm(length(x))
}
## Missing Values - NaN is NA but NA is not NaN. NA's can have classes
x <- c(1, 2, NA, 20, 3)
is.na(x)
is.nan(x)
x <- c(1, 2, NaN, NA, 4)
is.na(x)
is.na... | /hw1.R | no_license | zarastria/Coursera---Programming-with-R | R | false | false | 5,662 | r | ########## Week 1 - Lecture Notes ##########
myfunction <- function() {
x <- rnorm(100)
print(x)
mean(x)
}
second <- function(x) {
x + rnorm(length(x))
}
## Missing Values - NaN is NA but NA is not NaN. NA's can have classes
x <- c(1, 2, NA, 20, 3)
is.na(x)
is.nan(x)
x <- c(1, 2, NaN, NA, 4)
is.na(x)
is.na... |
install.packages('tidyverse')
install.packages('visnetwork')
install.packages('sqldf')
install.packages('stringi')
install.packages('stringr')
install.packages('RSelenium')
install.packages('rvest')
install.packages('reshape2')
install.packages('readxl')
install.packages('rattle')
install.packages('lubridate')
install.... | /R/installPackages.R | no_license | hpiedcoq/dobuke | R | false | false | 482 | r | install.packages('tidyverse')
install.packages('visnetwork')
install.packages('sqldf')
install.packages('stringi')
install.packages('stringr')
install.packages('RSelenium')
install.packages('rvest')
install.packages('reshape2')
install.packages('readxl')
install.packages('rattle')
install.packages('lubridate')
install.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getCBP.R
\name{getCBP}
\alias{getCBP}
\title{Prepare CBP data}
\usage{
getCBP(
years = 2017,
location = "national",
industry = 0,
LFO = "-",
input_path,
output_path
)
}
\arguments{
\item{years}{(integer) any integer between 2000 a... | /EconData/man/getCBP.Rd | permissive | setzler/EconData | R | false | true | 559 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getCBP.R
\name{getCBP}
\alias{getCBP}
\title{Prepare CBP data}
\usage{
getCBP(
years = 2017,
location = "national",
industry = 0,
LFO = "-",
input_path,
output_path
)
}
\arguments{
\item{years}{(integer) any integer between 2000 a... |
## Below are a pair of functions that cache the inverse of a matrix
## makeCacheMatrix creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
## stores the cached value
## initialise to NULL
cache<-NULL
set<-function(y){
... | /cachematrix.R | no_license | ashtearty/ProgrammingAssignment2 | R | false | false | 2,049 | r | ## Below are a pair of functions that cache the inverse of a matrix
## makeCacheMatrix creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
## stores the cached value
## initialise to NULL
cache<-NULL
set<-function(y){
... |
########### Calculate pairwise base pair distance ##########
#
# MF 8/20/2018
#
############################################################
# Set Working Directory / Load Packages -----------------------------------
setwd("D:/Pacific cod/DataAnalysis/PCod-Korea-repo/analyses/LD")
library(dplyr)
library(ggplot2)
# ... | /analyses/LD/calc_pairwise_bp_dist.R | no_license | mfisher5/PCod-Korea-repo | R | false | false | 2,759 | r | ########### Calculate pairwise base pair distance ##########
#
# MF 8/20/2018
#
############################################################
# Set Working Directory / Load Packages -----------------------------------
setwd("D:/Pacific cod/DataAnalysis/PCod-Korea-repo/analyses/LD")
library(dplyr)
library(ggplot2)
# ... |
context(paste("Symbolic differentiation rules v", packageVersion("Deriv"), sep=""))
lc_orig=Sys.getlocale(category = "LC_COLLATE")
Sys.setlocale(category = "LC_COLLATE", locale = "C")
num_test_deriv <- function(fun, larg, narg=1, h=1.e-5, tolerance=2000*h^2) {
# test the first derivative of a function fun() (given ... | /Deriv/tests/testthat/test_Deriv.R | no_license | ingted/R-Examples | R | false | false | 12,779 | r | context(paste("Symbolic differentiation rules v", packageVersion("Deriv"), sep=""))
lc_orig=Sys.getlocale(category = "LC_COLLATE")
Sys.setlocale(category = "LC_COLLATE", locale = "C")
num_test_deriv <- function(fun, larg, narg=1, h=1.e-5, tolerance=2000*h^2) {
# test the first derivative of a function fun() (given ... |
library(openxlsx)
library(officer)
library(ReporteRs)
save_to_word <- function(table_object,
table_title,
docx_path = "tables.docx",
overwrite = F) {
# Create Word file if specified one is not found
if (!file.exists(docx_path) |
over... | /table_export.R | no_license | alexeyknorre/stir | R | false | false | 1,405 | r | library(openxlsx)
library(officer)
library(ReporteRs)
save_to_word <- function(table_object,
table_title,
docx_path = "tables.docx",
overwrite = F) {
# Create Word file if specified one is not found
if (!file.exists(docx_path) |
over... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_nifti.R
\name{read_nifti}
\alias{read_nifti}
\title{Read OCTExplorer-ready NIFTI file}
\usage{
read_nifti(nifti_file)
}
\description{
Read OCTExplorer-ready NIFTI file in the manner of read_vol
}
| /man/read_nifti.Rd | permissive | barefootbiology/heyexr | R | false | true | 279 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_nifti.R
\name{read_nifti}
\alias{read_nifti}
\title{Read OCTExplorer-ready NIFTI file}
\usage{
read_nifti(nifti_file)
}
\description{
Read OCTExplorer-ready NIFTI file in the manner of read_vol
}
|
# packages
library(tidyverse)
# read in data
dat <- read.csv("data.csv")
# create plot
O2_plot <- quickplot(data = dat,
x = O2_uM,
y = Depth_m,
color = Season) +
xlab("Oxygen")
# Save plot
ggsave("O2_plot.png") | /plot.R | no_license | holloxob/reproducible_research_files | R | false | false | 247 | r | # packages
library(tidyverse)
# read in data
dat <- read.csv("data.csv")
# create plot
O2_plot <- quickplot(data = dat,
x = O2_uM,
y = Depth_m,
color = Season) +
xlab("Oxygen")
# Save plot
ggsave("O2_plot.png") |
#Importar el data set
dataset = read.csv('Data.csv')
#Tratamiento de los dataset
dataset$Age =
ifelse(
is.na(dataset$Age),
ave(dataset$Age, FUN = function(x) mean(x, na.rm = TRUE)),
dataset$Age)
dataset$Salary =
ifelse(
is.na(dataset$Salary),
ave(dataset$Salary, FUN = function(x) mean(x, n... | /datasets/Part 1 - Data Preprocessing/Section 2 -------------------- Part 1 - Data Preprocessing --------------------/data_preprocessing.R | permissive | canteroferron/machinelearning-az | R | false | false | 1,062 | r | #Importar el data set
dataset = read.csv('Data.csv')
#Tratamiento de los dataset
dataset$Age =
ifelse(
is.na(dataset$Age),
ave(dataset$Age, FUN = function(x) mean(x, na.rm = TRUE)),
dataset$Age)
dataset$Salary =
ifelse(
is.na(dataset$Salary),
ave(dataset$Salary, FUN = function(x) mean(x, n... |
# running all scripts in demo folder
demo(basic_walkthrough)
demo(custom_objective)
demo(boost_from_prediction)
demo(predict_first_ntree)
demo(generalized_linear_model)
demo(cross_validation)
demo(create_sparse_matrix)
demo(predict_leaf_indices)
demo(early_stopping)
demo(poisson_regression)
| /R-package/demo/runall.R | permissive | saurav111/xgboost | R | false | false | 292 | r | # running all scripts in demo folder
demo(basic_walkthrough)
demo(custom_objective)
demo(boost_from_prediction)
demo(predict_first_ntree)
demo(generalized_linear_model)
demo(cross_validation)
demo(create_sparse_matrix)
demo(predict_leaf_indices)
demo(early_stopping)
demo(poisson_regression)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/duplicates_check.R
\name{duplicates_check}
\alias{duplicates_check}
\title{Check and remove duplicate ids}
\usage{
duplicates_check(
x,
id = "Subject",
unique = c("SessionDate", "SessionTime"),
n = 1,
remove = TRUE,
keep = "none",... | /man/duplicates_check.Rd | no_license | dr-JT/datawrangling | R | false | true | 884 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/duplicates_check.R
\name{duplicates_check}
\alias{duplicates_check}
\title{Check and remove duplicate ids}
\usage{
duplicates_check(
x,
id = "Subject",
unique = c("SessionDate", "SessionTime"),
n = 1,
remove = TRUE,
keep = "none",... |
library(shinytest)
recordTest(test_path("apps", "table_module"))
| /tests/testthat/apps/table_module/tests/table_module-test.R | permissive | MartinSchobben/oceanexplorer | R | false | false | 65 | r | library(shinytest)
recordTest(test_path("apps", "table_module"))
|
# Loading packages
library(funHDDC)
library(R.matlab)
library(dplyr)
# Simulation Scenario
nSim = 50
Group_size = 20
var_random1 = 50
var_random2 = 200
var_random3 = 100
var_noise = 1
njobs = 20
random_seed <- c(0, 100*(1:(njobs-1)))
True.nSim = nSim*njobs
# High SNR, Group_size = 20
# basisSNR = 7
# orderSNR = 3
... | /funHDDC/multi_simu_VaryfunHDDC.R | no_license | jialinyi94/FTSC | R | false | false | 3,923 | r | # Loading packages
library(funHDDC)
library(R.matlab)
library(dplyr)
# Simulation Scenario
nSim = 50
Group_size = 20
var_random1 = 50
var_random2 = 200
var_random3 = 100
var_noise = 1
njobs = 20
random_seed <- c(0, 100*(1:(njobs-1)))
True.nSim = nSim*njobs
# High SNR, Group_size = 20
# basisSNR = 7
# orderSNR = 3
... |
library(tidyverse)
# Create output directory ------------------------------------------------------
fs::dir_create(here::here("lib"))
# Create empty data frame ------------------------------------------------------
df <- data.frame(active = logical(),
outcome = character(),
outcome... | /analysis/active_analyses.R | permissive | opensafely/post-covid-unvaccinated | R | false | false | 10,737 | r | library(tidyverse)
# Create output directory ------------------------------------------------------
fs::dir_create(here::here("lib"))
# Create empty data frame ------------------------------------------------------
df <- data.frame(active = logical(),
outcome = character(),
outcome... |
##############################################################
# R code for QTL mapping
#
# http://www.rqtl.org
#
# 2018-1-25
##############################################################
#########################################################################
wkdir <- commandArgs(TRUE)[1]
in_file ... | /QTL_mapping/qtl_analysis.R | no_license | jiaxianqing/Pipelines | R | false | false | 4,094 | r | ##############################################################
# R code for QTL mapping
#
# http://www.rqtl.org
#
# 2018-1-25
##############################################################
#########################################################################
wkdir <- commandArgs(TRUE)[1]
in_file ... |
\name{annotateTrans}
\alias{annotateTrans}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
A function to annotate a transcript grl with variant information.
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
Given a txbd, co... | /oldman/annotateTrans.Rd | no_license | lawremi/VariantTools | R | false | false | 1,731 | rd | \name{annotateTrans}
\alias{annotateTrans}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
A function to annotate a transcript grl with variant information.
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
Given a txbd, co... |
##########################################################
## Demo: Instructive destructive example
##########################################################
require(distr)
options("newDevice"=TRUE)
## package "distr" encourages
## consistency but does not
## enforce it---so in general
## d o n o t m... | /demo/destructive.R | no_license | cran/distr | R | false | false | 466 | r | ##########################################################
## Demo: Instructive destructive example
##########################################################
require(distr)
options("newDevice"=TRUE)
## package "distr" encourages
## consistency but does not
## enforce it---so in general
## d o n o t m... |
mloop <- function(cx=0,cy=0,retention=0.2,b.x=0.6,b.y=0.8,n=1,m=1,sd.x=0,sd.y=0,phase.angle=0,n.points=24,period=24,extended.classical=FALSE,seed=NULL) {
if (!is.null(seed)) set.seed(seed)
if (extended.classical==FALSE) {
x<-cx+b.x*cos((1:n.points)/period*2*pi+phase.angle/180*pi)+rnorm(n.points,0,sd.x)
y<-cy+rete... | /R/mloop.r | no_license | aparkhurst/hysteresis-2.5 | R | false | false | 1,560 | r | mloop <- function(cx=0,cy=0,retention=0.2,b.x=0.6,b.y=0.8,n=1,m=1,sd.x=0,sd.y=0,phase.angle=0,n.points=24,period=24,extended.classical=FALSE,seed=NULL) {
if (!is.null(seed)) set.seed(seed)
if (extended.classical==FALSE) {
x<-cx+b.x*cos((1:n.points)/period*2*pi+phase.angle/180*pi)+rnorm(n.points,0,sd.x)
y<-cy+rete... |
#' Partial Martingale Difference Divergence
#'
#' \code{pmdd} measures conditional mean dependence of \code{Y} given \code{X} adjusting for the
#' dependence on \code{Z}, where each contains one variable (univariate) or more variables (multivariate).
#' Only the U-centering approach is applied.
#'
#' @param X A ... | /R/pmdd.R | no_license | cran/EDMeasure | R | false | false | 1,961 | r | #' Partial Martingale Difference Divergence
#'
#' \code{pmdd} measures conditional mean dependence of \code{Y} given \code{X} adjusting for the
#' dependence on \code{Z}, where each contains one variable (univariate) or more variables (multivariate).
#' Only the U-centering approach is applied.
#'
#' @param X A ... |
#' Add edges and attributes to graph from a table
#' @description Add edges and their attributes to an
#' existing graph object from data in a CSV file or a
#' data frame.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @param table either a path to a CSV file, or, a data
#' frame object.
#' @param from... | /R/add_edges_from_table.R | no_license | ekstroem/DiagrammeR | R | false | false | 9,117 | r | #' Add edges and attributes to graph from a table
#' @description Add edges and their attributes to an
#' existing graph object from data in a CSV file or a
#' data frame.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @param table either a path to a CSV file, or, a data
#' frame object.
#' @param from... |
# tests for listing gists
context("gists")
test_that("listing gists works", {
skip_on_cran()
expect_is(gists()[[1]], "gist")
expect_equal(length(gists(per_page=2)), 2)
})
test_that("config options work", {
skip_on_cran()
library('httr')
expect_error(gists(config=timeout(0.001)))
})
| /tests/testthat/test-gists.R | permissive | silvrwolfboy/gistr | R | false | false | 303 | r | # tests for listing gists
context("gists")
test_that("listing gists works", {
skip_on_cran()
expect_is(gists()[[1]], "gist")
expect_equal(length(gists(per_page=2)), 2)
})
test_that("config options work", {
skip_on_cran()
library('httr')
expect_error(gists(config=timeout(0.001)))
})
|
#global assignment of project dir -> change to whatever in order to find plots/data/etc.. files
calcAUC <- function(prob, label){
AUC <- NA
# if(!identical(getLevels(label),2)){
# return(NA)
# }
AUC <- try({
(performance(prediction(predictions=prob, labels=label), "auc"))@y.values[[1]]
})
if ('try-e... | /mlAlgoAW/analysis/predLib.R | no_license | stjordanis/enhancer_pred | R | false | false | 4,427 | r |
#global assignment of project dir -> change to whatever in order to find plots/data/etc.. files
calcAUC <- function(prob, label){
AUC <- NA
# if(!identical(getLevels(label),2)){
# return(NA)
# }
AUC <- try({
(performance(prediction(predictions=prob, labels=label), "auc"))@y.values[[1]]
})
if ('try-e... |
library(shiny)
ui <- fluidPage(
"Olá, mundo"
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
# library(shiny)
#
# ui <- fluidPage("Olá, mundo!")
#
# server <- function(input, output, session) {
# # O nosso código em R será colocado aqui.
# }
#
# shinyApp(ui, server)
| /scripts/01-ola-mundo.R | no_license | curso-r/latinr-shiny | R | false | false | 303 | r | library(shiny)
ui <- fluidPage(
"Olá, mundo"
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
# library(shiny)
#
# ui <- fluidPage("Olá, mundo!")
#
# server <- function(input, output, session) {
# # O nosso código em R será colocado aqui.
# }
#
# shinyApp(ui, server)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/catboost.R
\name{catboost.train}
\alias{catboost.train}
\title{Train the model}
\usage{
catboost.train(learn_pool, test_pool = NULL, params = list())
}
\arguments{
\item{learn_pool}{The dataset used for training the model.
Default value: Req... | /catboost/R-package/man/catboost.train.Rd | permissive | VLVLKY/catboost | R | false | true | 19,588 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/catboost.R
\name{catboost.train}
\alias{catboost.train}
\title{Train the model}
\usage{
catboost.train(learn_pool, test_pool = NULL, params = list())
}
\arguments{
\item{learn_pool}{The dataset used for training the model.
Default value: Req... |
.baseprj <- function(clon) {
sprintf(
"+proj=stere +lon_0=%f +lat_0=-90 +lat_ts=-70 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs",
clon
)
}
.mkregion <-
function(xmin, xmax, ymin, ymax, lonmin, lonmax, latmin, latmax, proj) {
list(
xmin = xmin, xmax = xmax, ymin = ymin, ymax = ... | /R/asosi.R | no_license | mdsumner/asosi | R | false | false | 6,010 | r | .baseprj <- function(clon) {
sprintf(
"+proj=stere +lon_0=%f +lat_0=-90 +lat_ts=-70 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs",
clon
)
}
.mkregion <-
function(xmin, xmax, ymin, ymax, lonmin, lonmax, latmin, latmax, proj) {
list(
xmin = xmin, xmax = xmax, ymin = ymin, ymax = ... |
\docType{class}
\name{IncrRBFN_C}
\alias{IncrRBFN_C}
\alias{R6_IncrRBFN_C}
\title{IncrRBFN_C KEEL Classification Algorithm}
\description{
IncrRBFN_C Classification Algorithm from KEEL.
}
\usage{
IncrRBFN_C(train, test, epsilon, alfa, delta, seed)
}
\arguments{
\item{train}{Train dataset as a data.frame object}
\item{t... | /man/Incr-RBFN-C.Rd | no_license | terry07/RKEEL | R | false | false | 984 | rd | \docType{class}
\name{IncrRBFN_C}
\alias{IncrRBFN_C}
\alias{R6_IncrRBFN_C}
\title{IncrRBFN_C KEEL Classification Algorithm}
\description{
IncrRBFN_C Classification Algorithm from KEEL.
}
\usage{
IncrRBFN_C(train, test, epsilon, alfa, delta, seed)
}
\arguments{
\item{train}{Train dataset as a data.frame object}
\item{t... |
args = commandArgs(TRUE)
exprs = args[1]
#distance = args[2]
#n = args[3]
#linkage = args[4]
path = args[2]
path_output = args[3]
library('amap')
library('dynamicTreeCut')
setwd(path)
exprs = as.matrix(exprs)
exprs = read.table(exprs, header=T,row.names=1,sep="\t")
d <- Dist(as.matrix(exprs), method="... | /Clustering/hclust_dynamic_031414.R | no_license | anandksrao/Gene_coexpression_scripts | R | false | false | 568 | r | args = commandArgs(TRUE)
exprs = args[1]
#distance = args[2]
#n = args[3]
#linkage = args[4]
path = args[2]
path_output = args[3]
library('amap')
library('dynamicTreeCut')
setwd(path)
exprs = as.matrix(exprs)
exprs = read.table(exprs, header=T,row.names=1,sep="\t")
d <- Dist(as.matrix(exprs), method="... |
#####################################################################################
### This script age-split aggregated age data by using DisMod output
####################################################################################
pacman::p_load(data.table, openxlsx, ggplot2, magrittr)
date <- gsub("-", "_", ... | /gbd_2019/nonfatal_code/digest_ibd/Ulcerative_colitis/GBD2019_UC_post-DisMod_age-split.R | no_license | Nermin-Ghith/ihme-modeling | R | false | false | 16,425 | r | #####################################################################################
### This script age-split aggregated age data by using DisMod output
####################################################################################
pacman::p_load(data.table, openxlsx, ggplot2, magrittr)
date <- gsub("-", "_", ... |
\name{getFamily}
\alias{getFamily}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Get the miRNA Family and add to the miRNA Enrichment Results
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
getFamily(results, mir.fam)
}
%- maybe also 'usage' for... | /man/getFamily.Rd | no_license | komalsrathi/miRNAEnrich | R | false | false | 1,643 | rd | \name{getFamily}
\alias{getFamily}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Get the miRNA Family and add to the miRNA Enrichment Results
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
getFamily(results, mir.fam)
}
%- maybe also 'usage' for... |
# Library of functions to streamline processing LGR GGA output into fluxes.
## Gives count, mean, standard deviation, standard error of the mean, and confidence interval (default 95%).
## data: a data frame.
## measurevar: the name of a column that contains the variable to be summariezed
## groupvars: a vector ... | /R/LGR_GGA_functionlib.R | no_license | jhmatthes/LGR_GGA_soilflux | R | false | false | 1,746 | r | # Library of functions to streamline processing LGR GGA output into fluxes.
## Gives count, mean, standard deviation, standard error of the mean, and confidence interval (default 95%).
## data: a data frame.
## measurevar: the name of a column that contains the variable to be summariezed
## groupvars: a vector ... |
get_files <- function(folder_path, extension, targets){
stopifnot(length(folder_path)==1)
if(!file.exists(folder_path) || !file.info(folder_path)$isdir){
stop('The speficied folder_path "', folder_path, '" either does not exist or is not a directory')
}
## Find files:
files <- unlist(lapply(extension, functi... | /R/read_files.R | no_license | boydorr/BoluspH | R | false | false | 3,531 | r | get_files <- function(folder_path, extension, targets){
stopifnot(length(folder_path)==1)
if(!file.exists(folder_path) || !file.info(folder_path)$isdir){
stop('The speficied folder_path "', folder_path, '" either does not exist or is not a directory')
}
## Find files:
files <- unlist(lapply(extension, functi... |
library(caret);library(rpart);library(randomForest);
source('src//multiClassLogisticRegression.R')
source('src//preProcess//preProcess.R')
source('src//graphics//clusterPlot.R')
source('src/preProcess/filter.R')
source('src//preProcess//topNImportantFeature.R')
data <- getCleanData()
set.seed(1234)
trainIndex <- creat... | /src/models/randomForest.R | no_license | prasu05/practical_machine_learning_assignment | R | false | false | 1,547 | r | library(caret);library(rpart);library(randomForest);
source('src//multiClassLogisticRegression.R')
source('src//preProcess//preProcess.R')
source('src//graphics//clusterPlot.R')
source('src/preProcess/filter.R')
source('src//preProcess//topNImportantFeature.R')
data <- getCleanData()
set.seed(1234)
trainIndex <- creat... |
source("libs/functions.R")
echo("BacGWAS command line: ", commandArgs(trailingOnly = TRUE))
options("scipen" = 100, "digits" = 4)
.htmlOptions <- c("smartypants", "base64_images", "toc")
.startWd <- getwd()
.usageString <- "
Usage:
bacgwas.R --plugin=NAME --input=DIR --output=DIR [--html]
Options:
--plugin=NAME ... | /bacgwas.R | permissive | ikavalio/MDRTB-pipe | R | false | false | 3,183 | r | source("libs/functions.R")
echo("BacGWAS command line: ", commandArgs(trailingOnly = TRUE))
options("scipen" = 100, "digits" = 4)
.htmlOptions <- c("smartypants", "base64_images", "toc")
.startWd <- getwd()
.usageString <- "
Usage:
bacgwas.R --plugin=NAME --input=DIR --output=DIR [--html]
Options:
--plugin=NAME ... |
#### 1. 데이터 전처리 ####
library(tidyverse); library(reshape2); library(tibble); library(stringr)
rdata <- list()
#### 가. 전세계 확진자와 사망자 등 ####
rdata$url <- c("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv",
"h... | /20 이탈리아현황.R | permissive | seeun1203/COVID-19 | R | false | false | 7,110 | r | #### 1. 데이터 전처리 ####
library(tidyverse); library(reshape2); library(tibble); library(stringr)
rdata <- list()
#### 가. 전세계 확진자와 사망자 등 ####
rdata$url <- c("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv",
"h... |
# Hierarchical clustering
## libraries
require(scorecard) # split_df
require(FSA)
require(factoextra) # fviz_dend
require(fields) # image.plot
require(dplyr) # %>%
require(class)
require(caret)
require(dendextend) #circle dendogram
require(circlize) #circle dendogram
require(cluster)
## seed
seed = 1... | /1st_project/hierarchical_clust.R | no_license | mariajoaolavoura/sda_project | R | false | false | 15,495 | r | # Hierarchical clustering
## libraries
require(scorecard) # split_df
require(FSA)
require(factoextra) # fviz_dend
require(fields) # image.plot
require(dplyr) # %>%
require(class)
require(caret)
require(dendextend) #circle dendogram
require(circlize) #circle dendogram
require(cluster)
## seed
seed = 1... |
#!/usr/bin/env Rscript
###---PACKAGES---###
if (!require("pacman")) { install.packages("pacman", repos='http://cran.us.r-project.org') }
library(pacman)
#required packages
required_packages = c(
"tidyverse",
"grid",
"ggplotify",
"svglite"
)
github_packages = c(
"slowkow/ggrepel"
)
#load packages
pacman::... | /figures/(5) BART Transcription Factors/R/2_bart_plot.R | no_license | monovich/giblin-sirt5-melanoma | R | false | false | 6,575 | r | #!/usr/bin/env Rscript
###---PACKAGES---###
if (!require("pacman")) { install.packages("pacman", repos='http://cran.us.r-project.org') }
library(pacman)
#required packages
required_packages = c(
"tidyverse",
"grid",
"ggplotify",
"svglite"
)
github_packages = c(
"slowkow/ggrepel"
)
#load packages
pacman::... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/as_tibble.R
\name{as_tibble.gtsummary}
\alias{as_tibble.gtsummary}
\title{Convert gtsummary object to a tibble}
\usage{
\method{as_tibble}{gtsummary}(
x,
include = everything(),
col_labels = TRUE,
return_calls = FALSE,
exclude = NUL... | /man/as_tibble.gtsummary.Rd | permissive | ClinicoPath/gtsummary | R | false | true | 1,592 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/as_tibble.R
\name{as_tibble.gtsummary}
\alias{as_tibble.gtsummary}
\title{Convert gtsummary object to a tibble}
\usage{
\method{as_tibble}{gtsummary}(
x,
include = everything(),
col_labels = TRUE,
return_calls = FALSE,
exclude = NUL... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dasl.R
\docType{data}
\name{dasl.oecd_economic_regulations}
\alias{dasl.oecd_economic_regulations}
\title{OECD economic regulations}
\format{24 observations}
\source{
DASL – The Data And Story Library: \href{https://dasl.datadescription.com/d... | /man/dasl.oecd_economic_regulations.Rd | no_license | sigbertklinke/mmstat.data | R | false | true | 1,346 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dasl.R
\docType{data}
\name{dasl.oecd_economic_regulations}
\alias{dasl.oecd_economic_regulations}
\title{OECD economic regulations}
\format{24 observations}
\source{
DASL – The Data And Story Library: \href{https://dasl.datadescription.com/d... |
################
# analyzing wave 6 (ie singapore) data
# with randomforest and only top 50 features of what is found by
# rf_feature_elim_WV6.R
################
source('~/GitHub/World_Values_Survey/WVS_lib.R')
# load data
source('~/GitHub/World_Values_Survey/load_WV6_for_caret.R')
# load feature elimination result,... | /rf50_wave6.R | no_license | sonicrick/World_Values_Survey | R | false | false | 2,250 | r | ################
# analyzing wave 6 (ie singapore) data
# with randomforest and only top 50 features of what is found by
# rf_feature_elim_WV6.R
################
source('~/GitHub/World_Values_Survey/WVS_lib.R')
# load data
source('~/GitHub/World_Values_Survey/load_WV6_for_caret.R')
# load feature elimination result,... |
margEff.censReg <- function( object, calcVCov = TRUE, returnJacobian = FALSE,
... ) {
## calculate marginal effects on E[y] at the mean explanatory variables
allPar <- coef( object, logSigma = FALSE )
# check if the model was estimated with panel data
isPanel <- "sigmaMu" %in% names( allPar )
... | /censReg/R/margEff.censReg.R | no_license | ingted/R-Examples | R | false | false | 2,467 | r | margEff.censReg <- function( object, calcVCov = TRUE, returnJacobian = FALSE,
... ) {
## calculate marginal effects on E[y] at the mean explanatory variables
allPar <- coef( object, logSigma = FALSE )
# check if the model was estimated with panel data
isPanel <- "sigmaMu" %in% names( allPar )
... |
# getdata-008
# project requirements:
# 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 descriptive activity names to name the activities in the data set
# 4. Appropriately labels the data set w... | /run_analysis.R | no_license | mcodd/coursera-getdata-008 | R | false | false | 5,253 | r | # getdata-008
# project requirements:
# 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 descriptive activity names to name the activities in the data set
# 4. Appropriately labels the data set w... |
k <- 1
n <- 15
tp1 <- .1
tp2 <- .1
| /Models/Bayesian_Cognitive_Modeling/ParameterEstimation/Binomial/Rate_4/Rate_4.data.R | no_license | wmmurrah/cognitivemodeling | R | false | false | 35 | r | k <- 1
n <- 15
tp1 <- .1
tp2 <- .1
|
#
# Elementary Effects Study Design
#
rm(list=ls()) # clear workspace
R_LIBS= ("/home/R/library") # set path for R libraries
options(scipen=999) # turn scientific notation off
options(stringsAsFactors = FALSE) # turn off representing strings as factors
# Set parameters for each study
setwd ("~/GitHub/epa-biogas-ri... | /WESyS/epa-biogas-rin-HTL-TEA/studies/FY18/ee trouble shoot/wesys studies/1.studydesign.R | no_license | irinatsiryapkina/work | R | false | false | 2,108 | r | #
# Elementary Effects Study Design
#
rm(list=ls()) # clear workspace
R_LIBS= ("/home/R/library") # set path for R libraries
options(scipen=999) # turn scientific notation off
options(stringsAsFactors = FALSE) # turn off representing strings as factors
# Set parameters for each study
setwd ("~/GitHub/epa-biogas-ri... |
# Perform sensitivity analysis for the quantile used to estimate
# the top of the sphere simultaneously with the cutoff value k
# to determine whether someone has removed their device.
# Vary |H_i| from 0.9 T_i ... 0.99 T_i
# check angular change in upright orientation
# check change in classifications
#############... | /Code/Building_Set_14/2c_clustering__Sensitivity_Analysis.R | no_license | etzkorn/postuR_analysis | R | false | false | 2,290 | r | # Perform sensitivity analysis for the quantile used to estimate
# the top of the sphere simultaneously with the cutoff value k
# to determine whether someone has removed their device.
# Vary |H_i| from 0.9 T_i ... 0.99 T_i
# check angular change in upright orientation
# check change in classifications
#############... |
library(shiny)
library(shinymetrum)
ui <- metworxApp(
metworxTitle = "Sample App",
#-- standard shiny UI code --#
fluidPage(
sidebarLayout(
sidebarPanel(
sliderInput('nDraws', '# of Draws', 5, 100, 50)
),
mainPanel(
plotOutput('randNorm')
)
)
)
#--... | /tests/metworxApp/app.R | no_license | anhnguyendepocen/shinymetrum | R | false | false | 506 | r | library(shiny)
library(shinymetrum)
ui <- metworxApp(
metworxTitle = "Sample App",
#-- standard shiny UI code --#
fluidPage(
sidebarLayout(
sidebarPanel(
sliderInput('nDraws', '# of Draws', 5, 100, 50)
),
mainPanel(
plotOutput('randNorm')
)
)
)
#--... |
library(tidyverse)
#set working directory
setwd("Y:/Julia Crunden/Results/Plate Reader/Optimising Cys + Met concentrations for Met3p repressor strain/2020-10-23/Comparison of nitrogen source for Radicicol potency")
#read in the file
df <- read.csv("radicicol potency with Am sulf or MSG.txt", header=TRUE, sep="\... | /Multiple growth curves on one plot/Multiple growth curves on one plot.R | no_license | jcrunden/Microbiology | R | false | false | 1,357 | r | library(tidyverse)
#set working directory
setwd("Y:/Julia Crunden/Results/Plate Reader/Optimising Cys + Met concentrations for Met3p repressor strain/2020-10-23/Comparison of nitrogen source for Radicicol potency")
#read in the file
df <- read.csv("radicicol potency with Am sulf or MSG.txt", header=TRUE, sep="\... |
# Statistics for Linguists: An Introduction Using R
# Code presented inside Chapter 12
# --------------------------------------------------------
# 12.1. Theoretical background: Data-generating processes
# Applying the logistic function to a few values:
plogis(-2)
plogis(0)
plogis(2)
# Even if you enter extremely ... | /textbook/scripts/chapter12.R | no_license | mahowak/LING104 | R | false | false | 5,017 | r | # Statistics for Linguists: An Introduction Using R
# Code presented inside Chapter 12
# --------------------------------------------------------
# 12.1. Theoretical background: Data-generating processes
# Applying the logistic function to a few values:
plogis(-2)
plogis(0)
plogis(2)
# Even if you enter extremely ... |
summary.CAvariants <-
function(object,printdims = 3,digits = 3,...) {
cat("\n SUMMARY",object$catype, "Correspondence Analysis\n")
cat("\n Names of output objects\n")
print(names(object))
d <- object$r
d <- min(printdims, object$r)
#---------------------------------------------------------------------------
... | /R/summary.CAvariants.R | no_license | cran/CAvariants | R | false | false | 4,515 | r | summary.CAvariants <-
function(object,printdims = 3,digits = 3,...) {
cat("\n SUMMARY",object$catype, "Correspondence Analysis\n")
cat("\n Names of output objects\n")
print(names(object))
d <- object$r
d <- min(printdims, object$r)
#---------------------------------------------------------------------------
... |
testlist <- list(type = -819920896L, z = NaN)
result <- do.call(esreg::G1_fun,testlist)
str(result) | /esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609893750-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 99 | r | testlist <- list(type = -819920896L, z = NaN)
result <- do.call(esreg::G1_fun,testlist)
str(result) |
#Useful for knowing missing data
install.packages("Amelia")
library(ggplot2)
library(dplyr)
library(ggthemes)
library(corrgram)
library(corrplot)
library(caTools)
library(Amelia)
#Goal: Predict Survival of passengers onboard titanic (Current accuracy 76.67%)
#Data: https://www.kaggle.com/c/titanic/data
filepath <- "... | /Datasets/Kaggle_Titanic/RScripts/Titanic_logistic.R | no_license | pixelmaster11/DataScience | R | false | false | 8,717 | r | #Useful for knowing missing data
install.packages("Amelia")
library(ggplot2)
library(dplyr)
library(ggthemes)
library(corrgram)
library(corrplot)
library(caTools)
library(Amelia)
#Goal: Predict Survival of passengers onboard titanic (Current accuracy 76.67%)
#Data: https://www.kaggle.com/c/titanic/data
filepath <- "... |
## > source('cachematrix.R')
## > m <- makeCacheMatrix(matrix(c(2, 0, 0, 2), c(2, 2)))
## > cacheSolve(m)
## [,1] [,2]
## [1,] 0.5 0.0
## [2,] 0.0 0.5
## Create a special "matrix", which is a list containing
## a function to
## - set the value of the matrix
## - get the value of the matrix
## - set the valu... | /cachematrix.R | no_license | chaitanyavmf/ProgrammingAssignment2 | R | false | false | 1,069 | r |
## > source('cachematrix.R')
## > m <- makeCacheMatrix(matrix(c(2, 0, 0, 2), c(2, 2)))
## > cacheSolve(m)
## [,1] [,2]
## [1,] 0.5 0.0
## [2,] 0.0 0.5
## Create a special "matrix", which is a list containing
## a function to
## - set the value of the matrix
## - get the value of the matrix
## - set the valu... |
options(stringsAsFactors = FALSE)
# Load data of spot and 1-month forward exchange rates
data = read.csv("proj15_spot_forward_exchange_rate.csv")
# Data setup
colnames(data) = c('date','AUD','AUD_f','JPY','JPY_f','GBP','GBP_f')
data$date = as.Date(data$date,"%m/%d/%Y")
# Convert the quoted form to US dollar/currency
da... | /proj15.r | no_license | derek1032/Time-Series-Project | R | false | false | 13,946 | r | options(stringsAsFactors = FALSE)
# Load data of spot and 1-month forward exchange rates
data = read.csv("proj15_spot_forward_exchange_rate.csv")
# Data setup
colnames(data) = c('date','AUD','AUD_f','JPY','JPY_f','GBP','GBP_f')
data$date = as.Date(data$date,"%m/%d/%Y")
# Convert the quoted form to US dollar/currency
da... |
#library(foreach)
#library(doParallel)
#registerDoParallel(makeCluster(2))
ti <- Sys.time()
binario <- function(d, l) {
b <- rep(FALSE, l)
while (l > 0 | d > 0) {
b[l] <- (d %% 2 == 1)
l <- l - 1
d <- bitwShiftR(d, 1)
}
return(b)
}
decimal <- function(bits, l) {
valor <- 0
fo... | /p12/p12_3mcalor.R | no_license | PabloChavez94/Simulacion | R | false | false | 2,035 | r | #library(foreach)
#library(doParallel)
#registerDoParallel(makeCluster(2))
ti <- Sys.time()
binario <- function(d, l) {
b <- rep(FALSE, l)
while (l > 0 | d > 0) {
b[l] <- (d %% 2 == 1)
l <- l - 1
d <- bitwShiftR(d, 1)
}
return(b)
}
decimal <- function(bits, l) {
valor <- 0
fo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/digest.R
\name{readDigestFile}
\alias{readDigestFile}
\title{Read digest file}
\usage{
readDigestFile(opts, endpoint = "mc-all/grid/digest.txt")
}
\arguments{
\item{opts}{simulation options}
\item{endpoint}{Suffix of path for dige... | /man/readDigestFile.Rd | no_license | cran/antaresRead | R | false | true | 512 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/digest.R
\name{readDigestFile}
\alias{readDigestFile}
\title{Read digest file}
\usage{
readDigestFile(opts, endpoint = "mc-all/grid/digest.txt")
}
\arguments{
\item{opts}{simulation options}
\item{endpoint}{Suffix of path for dige... |
library(data.table)
library(ggplot2)
library(grid)
library(gridExtra)
library(cowplot)
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
source("util.R")
stdize <- function(x, ...) {(x - min(x, ...)) / (max(x, ...) - min(x, ...))}
atom.counts <- data.table(read.csv("data/atom-counts_2018-09-05_for-debuggi... | /src/analysis/atom_counts.R | permissive | dgopstein/atom-finder | R | false | false | 14,052 | r | library(data.table)
library(ggplot2)
library(grid)
library(gridExtra)
library(cowplot)
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
source("util.R")
stdize <- function(x, ...) {(x - min(x, ...)) / (max(x, ...) - min(x, ...))}
atom.counts <- data.table(read.csv("data/atom-counts_2018-09-05_for-debuggi... |
testlist <- list(latLongs = structure(c(-1.99382434780448e+304, 1.39065416902259e-309, 8.91420948946625e+303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(2L, 9L)), r = 0)
result <- do.call(MGDrivE::calcCos,testlist)
str(result) | /MGDrivE/inst/testfiles/calcCos/libFuzzer_calcCos/calcCos_valgrind_files/1612727893-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 240 | r | testlist <- list(latLongs = structure(c(-1.99382434780448e+304, 1.39065416902259e-309, 8.91420948946625e+303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(2L, 9L)), r = 0)
result <- do.call(MGDrivE::calcCos,testlist)
str(result) |
#'get project title from working directory
#' This function gets the project title from the working directory for use in the metadata.rmd
#' @return the project title as a charcter vector
#' @export
get_project_title<-function(){
txt<-paste0(getwd())
if (grepl("minimum", txt, fixed = TRUE)==TRUE){
txt<-string... | /R/get_project_title.R | no_license | DrMattG/LivingNorwayR | R | false | false | 536 | r | #'get project title from working directory
#' This function gets the project title from the working directory for use in the metadata.rmd
#' @return the project title as a charcter vector
#' @export
get_project_title<-function(){
txt<-paste0(getwd())
if (grepl("minimum", txt, fixed = TRUE)==TRUE){
txt<-string... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.