content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
library(shiny)
library(tibble)
library(DT)
library(devtools)
devtools::install_github("PHP2560-Statistical-Programming-R/r-package-courses-brown/BDegreeAdvisor")
library(BDegreeAdvisor)
# Compile a list of undergraduate concentrations available at Brown from the website, so
# that if the concentrations are updated on... | /shinyApp_BDegreeAdvisor1.R | no_license | PHP2560-Statistical-Programming-R/shiny-app-bdegreeadvisor | R | false | false | 33,747 | r | library(shiny)
library(tibble)
library(DT)
library(devtools)
devtools::install_github("PHP2560-Statistical-Programming-R/r-package-courses-brown/BDegreeAdvisor")
library(BDegreeAdvisor)
# Compile a list of undergraduate concentrations available at Brown from the website, so
# that if the concentrations are updated on... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/est_ldv.R
\name{pldv}
\alias{pldv}
\title{Panel estimators for limited dependent variables}
\usage{
pldv(formula, data, subset, weights, na.action, model = c("fd", "random",
"pooling"), index = NULL, R = 20, start = NULL, lower = 0,
upper... | /man/pldv.Rd | no_license | JiaxiangBU/plm | R | false | true | 1,763 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/est_ldv.R
\name{pldv}
\alias{pldv}
\title{Panel estimators for limited dependent variables}
\usage{
pldv(formula, data, subset, weights, na.action, model = c("fd", "random",
"pooling"), index = NULL, R = 20, start = NULL, lower = 0,
upper... |
library(metScanR)
### Name: siteFinder
### Title: Filter environmental monitoring stations (wrapper)
### Aliases: siteFinder
### Keywords: atmopsheric atmosphere, climate, data, environment,
### environmental in-situ, meteorological meteorology, weather,
### ** Examples
## Not run:
##D #Return metadata of sites ... | /data/genthat_extracted_code/metScanR/examples/siteFinder.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 828 | r | library(metScanR)
### Name: siteFinder
### Title: Filter environmental monitoring stations (wrapper)
### Aliases: siteFinder
### Keywords: atmopsheric atmosphere, climate, data, environment,
### environmental in-situ, meteorological meteorology, weather,
### ** Examples
## Not run:
##D #Return metadata of sites ... |
# [문제144] 부서별 급여의 총액을 pie chart를 생성하세요.
#tapply
x <- tapply(emp$SALARY, emp$DEPARTMENT_ID, sum)
pie(x, label=names(x), main='부서별 급여 총액')
pie(x, label=paste0(names(x),'번 부서 급여 총액 ', x), main='부서별 급여 총액')
#aggregate
x <- aggregate(SALARY~DEPARTMENT_ID, emp, sum)
pie(x[[2]], label=paste0(x[[1]], '번 부서', x[[2]], '만원'), ma... | /180806.R | no_license | RainyHeaven/DA_Academy | R | false | false | 6,123 | r | # [문제144] 부서별 급여의 총액을 pie chart를 생성하세요.
#tapply
x <- tapply(emp$SALARY, emp$DEPARTMENT_ID, sum)
pie(x, label=names(x), main='부서별 급여 총액')
pie(x, label=paste0(names(x),'번 부서 급여 총액 ', x), main='부서별 급여 총액')
#aggregate
x <- aggregate(SALARY~DEPARTMENT_ID, emp, sum)
pie(x[[2]], label=paste0(x[[1]], '번 부서', x[[2]], '만원'), ma... |
\name{weed.update}
\alias{weed.update}
\title{The Weed model - calculate change for one year}
\usage{
weed.update(d, S, SSBa, DSBa, Soil, Crop, Herb, param)
}
\arguments{
\item{d}{: weed density at seed emergence (plants/m2) -
value for year}
\item{S}{: seed production per m2 - value for year}
\... | /man/weed.update.Rd | no_license | ritviksahajpal/ZeBook | R | false | false | 807 | rd | \name{weed.update}
\alias{weed.update}
\title{The Weed model - calculate change for one year}
\usage{
weed.update(d, S, SSBa, DSBa, Soil, Crop, Herb, param)
}
\arguments{
\item{d}{: weed density at seed emergence (plants/m2) -
value for year}
\item{S}{: seed production per m2 - value for year}
\... |
#title: Shot Charts
#description: Shot Charts of 5 players in GSW of 2016 season
#inputs: The performance of 5 GSW players in the games
#outputs: Shot Charts of 5 players in GSW of 2016 season in pdf and png files
library(ggplot2)
library(grid)
library(jpeg)
#scatterplot
Klay_scatterplot <- ggplot(data = thompson) +
... | /workout01/code/make-shot-charts-script.R | no_license | stat133-sp19/hw-stat133-Binwuhu | R | false | false | 3,188 | r | #title: Shot Charts
#description: Shot Charts of 5 players in GSW of 2016 season
#inputs: The performance of 5 GSW players in the games
#outputs: Shot Charts of 5 players in GSW of 2016 season in pdf and png files
library(ggplot2)
library(grid)
library(jpeg)
#scatterplot
Klay_scatterplot <- ggplot(data = thompson) +
... |
##############################################################
###
### Code to extract and format FHR data from samples
###
##############################################################
## Run query to extract FHR data from samples.
## Optionally returns subsample.
##
## Parameters:
##
## output.folder - the HD... | /R/fhr/query.R | no_license | dzeber/work-tools | R | false | false | 22,936 | r | ##############################################################
###
### Code to extract and format FHR data from samples
###
##############################################################
## Run query to extract FHR data from samples.
## Optionally returns subsample.
##
## Parameters:
##
## output.folder - the HD... |
cran_checks_table <- function(parsed, ...) UseMethod("cran_checks_table")
##' @importFrom rvest html_table
##' @importFrom tibble as_tibble
cran_checks_table.cran_checks_email <- function(parsed, ...) {
res <- lapply(parsed, function(x) {
tbl <- rvest::html_table(x)
if (length(tbl) < 1) {
... | /R/cran_check_table.R | no_license | hrbrmstr/foghorn | R | false | false | 1,935 | r | cran_checks_table <- function(parsed, ...) UseMethod("cran_checks_table")
##' @importFrom rvest html_table
##' @importFrom tibble as_tibble
cran_checks_table.cran_checks_email <- function(parsed, ...) {
res <- lapply(parsed, function(x) {
tbl <- rvest::html_table(x)
if (length(tbl) < 1) {
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/is.x.R
\name{is.x64}
\alias{is.x64}
\title{Checks if the running OS is x64}
\usage{
is.x64(...)
}
\arguments{
\item{...}{none are available.}
}
\value{
Returns TRUE/FALSE if the R session is running on Windows 64-bit or not.
}
\description{
R... | /man/is.x64.Rd | no_license | cran/installr | R | false | true | 702 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/is.x.R
\name{is.x64}
\alias{is.x64}
\title{Checks if the running OS is x64}
\usage{
is.x64(...)
}
\arguments{
\item{...}{none are available.}
}
\value{
Returns TRUE/FALSE if the R session is running on Windows 64-bit or not.
}
\description{
R... |
########
temp_75 <- read.csv("temprature_all.csv")[c(2:26),]
names(temp_75)[3] <- "start_temp"
names(temp_75)[5] <- "outside_temp"
rownames(temp_75) <- 1:25
################ 1 hours ###################
print_table_opt1 <- as.data.frame(matrix(c(0), nrow = 60, ncol = 5))
names(print_table_opt1)[1] <- "time"
names(prin... | /simulation_SVM_heating.R | no_license | ChangDeng1110/Final_project_master | R | false | false | 21,645 | r | ########
temp_75 <- read.csv("temprature_all.csv")[c(2:26),]
names(temp_75)[3] <- "start_temp"
names(temp_75)[5] <- "outside_temp"
rownames(temp_75) <- 1:25
################ 1 hours ###################
print_table_opt1 <- as.data.frame(matrix(c(0), nrow = 60, ncol = 5))
names(print_table_opt1)[1] <- "time"
names(prin... |
### Exploratory Data Analysis - Course Project 1
###
### Reproduce Plot 4
### 1. Read in Electric Power Consumption data, found here:
### https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip
### 2. Take subset of this data for dates 2007-02-01 and 2007-02-02
### 3. Create a PNG of... | /plot4.R | no_license | pinsky21/ExData_Plotting1 | R | false | false | 2,442 | r |
### Exploratory Data Analysis - Course Project 1
###
### Reproduce Plot 4
### 1. Read in Electric Power Consumption data, found here:
### https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip
### 2. Take subset of this data for dates 2007-02-01 and 2007-02-02
### 3. Create a PNG of... |
library(welchADF)
### Name: adhdData
### Title: Children's reaction times (milliseconds) to stimuli of different
### nature, arranged with four response columns.
### Aliases: adhdData
### Keywords: datasets
### ** Examples
# Assuming a multivariate response
omnibus_LSM_multi <- welchADF.test(adhdData, response = ... | /data/genthat_extracted_code/welchADF/examples/adhdData.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 876 | r | library(welchADF)
### Name: adhdData
### Title: Children's reaction times (milliseconds) to stimuli of different
### nature, arranged with four response columns.
### Aliases: adhdData
### Keywords: datasets
### ** Examples
# Assuming a multivariate response
omnibus_LSM_multi <- welchADF.test(adhdData, response = ... |
# the aim of this code is to simulate a data.frame to check for the degrees of freedom in the following mixde model.
library(lme4)
library(lmerTest)
subj=20
electrode=12
Condition=2
RT = rnorm(subj*electrode*Condition*trials)
electrode_c=rep(as.factor(1:electrode), subj*Condition*trials)
subj_c=rep(as.factor(1:subj)... | /unsorted_code/to_check_df.R | permissive | giorgioarcara/R-code-Misc | R | false | false | 499 | r | # the aim of this code is to simulate a data.frame to check for the degrees of freedom in the following mixde model.
library(lme4)
library(lmerTest)
subj=20
electrode=12
Condition=2
RT = rnorm(subj*electrode*Condition*trials)
electrode_c=rep(as.factor(1:electrode), subj*Condition*trials)
subj_c=rep(as.factor(1:subj)... |
# run factanal and then get nllk,
# compare with mvtpfact with 1 and 2 factors
library(CopulaModel)
data(euro07gf);
zdat=euro07gf$zscore
rr=cor(zdat)
d=ncol(zdat)
n=nrow(zdat)
start=rep(0.4,d)
st2=rep(0.4,2*d)
out1=mvtpfact(zdat,start,df=350,pfact=1,prlevel=0)
print(out1$estimate)
# 0.7508538 0.9357568 0.9457988 0... | /factmodtests/fa-nllk-test.r | no_license | hoanguc3m/CopulaModel | R | false | false | 1,351 | r | # run factanal and then get nllk,
# compare with mvtpfact with 1 and 2 factors
library(CopulaModel)
data(euro07gf);
zdat=euro07gf$zscore
rr=cor(zdat)
d=ncol(zdat)
n=nrow(zdat)
start=rep(0.4,d)
st2=rep(0.4,2*d)
out1=mvtpfact(zdat,start,df=350,pfact=1,prlevel=0)
print(out1$estimate)
# 0.7508538 0.9357568 0.9457988 0... |
library(openxlsx)
library(ggplot2)
library(reshape2)
source("~/documents/lab/workspace/Classification_scripts/multiplot.R")
#source("~/workspace/classification_scripts/multiplot.R")
library(zoo)
library(gplots)
library(RColorBrewer)
library(abind)
library(gridGraphics)
library(grid)
library(gridExtra)
library(R.matlab)... | /collate_results_avg_alt_noabs.R | no_license | jhess90/classification_scripts | R | false | false | 23,241 | r | library(openxlsx)
library(ggplot2)
library(reshape2)
source("~/documents/lab/workspace/Classification_scripts/multiplot.R")
#source("~/workspace/classification_scripts/multiplot.R")
library(zoo)
library(gplots)
library(RColorBrewer)
library(abind)
library(gridGraphics)
library(grid)
library(gridExtra)
library(R.matlab)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_performance.lm.R
\name{model_performance.lm}
\alias{model_performance.lm}
\title{Performance of Regression Models}
\usage{
\method{model_performance}{lm}(model, metrics = "all", verbose = TRUE, ...)
}
\arguments{
\item{model}{A... | /man/model_performance.lm.Rd | no_license | cran/performance | R | false | true | 2,527 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_performance.lm.R
\name{model_performance.lm}
\alias{model_performance.lm}
\title{Performance of Regression Models}
\usage{
\method{model_performance}{lm}(model, metrics = "all", verbose = TRUE, ...)
}
\arguments{
\item{model}{A... |
9fc060a7c12ac3e1e23a165c10c98f47 driver_b10y.unsat.qdimacs 4535 12535 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Database/Tentrup/driver/driver_b10y.unsat/driver_b10y.unsat.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 69 | r | 9fc060a7c12ac3e1e23a165c10c98f47 driver_b10y.unsat.qdimacs 4535 12535 |
source("figure_supp generator/library_path.R")
############## Supplementary Pannel 3 A
ylabel="prop_major_sv_busco"
xlabel="CoverageBuscoExon"
p1 = ggplot( data_1,aes(data_1[,xlabel],data_1[,ylabel]*100, fill=clade,text=species) )+ geom_point(shape=21,size=7,alpha=0.7)+
scale_fill_manual("Clades",values=vectorCol... | /figure_supp generator/Figure3_supp.R | no_license | FloBeni/2023-alternative_splicing | R | false | false | 2,055 | r | source("figure_supp generator/library_path.R")
############## Supplementary Pannel 3 A
ylabel="prop_major_sv_busco"
xlabel="CoverageBuscoExon"
p1 = ggplot( data_1,aes(data_1[,xlabel],data_1[,ylabel]*100, fill=clade,text=species) )+ geom_point(shape=21,size=7,alpha=0.7)+
scale_fill_manual("Clades",values=vectorCol... |
##' QGIS Algorithm provided by SAGA Change detection (saga:changedetection)
##'
##' @title QGIS algorithm Change detection
##'
##' @param INITIAL `raster` - Initial State. Path to a raster layer.
##' @param INI_LUT `source` - Look-up Table. Path to a vector layer.
##' @param INI_LUT_MIN `field` - Value. The name of an ... | /R/saga_changedetection.R | permissive | VB6Hobbyst7/r_package_qgis | R | false | false | 3,305 | r | ##' QGIS Algorithm provided by SAGA Change detection (saga:changedetection)
##'
##' @title QGIS algorithm Change detection
##'
##' @param INITIAL `raster` - Initial State. Path to a raster layer.
##' @param INI_LUT `source` - Look-up Table. Path to a vector layer.
##' @param INI_LUT_MIN `field` - Value. The name of an ... |
paired_vcf_dir <- "/mnt/cloudbiodata_nfs_1/hli_scratch/hhuang/paired_vcf/"
all_vcf_files <- list.files(paired_vcf_dir, pattern = "\\.vcf.gz$")
chr <- 21
output_dir <- paste0("/mnt/cloudbiodata_nfs_1/hli_scratch/hhuang/vcf_chr", chr, "/")
dir.create(file.path(output_dir), showWarnings = FALSE)
num_files <- length(a... | /scripts/extract_chr21_nMerge.R | permissive | hhuang2018/WGS_analysis | R | false | false | 1,466 | r |
paired_vcf_dir <- "/mnt/cloudbiodata_nfs_1/hli_scratch/hhuang/paired_vcf/"
all_vcf_files <- list.files(paired_vcf_dir, pattern = "\\.vcf.gz$")
chr <- 21
output_dir <- paste0("/mnt/cloudbiodata_nfs_1/hli_scratch/hhuang/vcf_chr", chr, "/")
dir.create(file.path(output_dir), showWarnings = FALSE)
num_files <- length(a... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/createMplusCFA.r
\name{createMplusCFA}
\alias{createMplusCFA}
\title{Create a Mplus definition for a CFA
Requires a list of dataframes}
\usage{
createMplusCFA(
x,
groups,
directory = ".",
bfile = NULL,
invariance_factors = F,
titl... | /man/createMplusCFA.Rd | no_license | clbustos/rcebn | R | false | true | 780 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/createMplusCFA.r
\name{createMplusCFA}
\alias{createMplusCFA}
\title{Create a Mplus definition for a CFA
Requires a list of dataframes}
\usage{
createMplusCFA(
x,
groups,
directory = ".",
bfile = NULL,
invariance_factors = F,
titl... |
# installing packages
install.packages('dplyr')
install.packages('dummies')
install.packages('caTools')
install.packages('data.table')
install.packages('roll')
# load libraries
library(dplyr)
library(dummies)
library(caTools)
library(purrr)
library(data.table)
library(roll)
# read
data_url = "https://raw.githubuserco... | /dwproj.R | no_license | vjpepe/DataMining_project | R | false | false | 2,116 | r | # installing packages
install.packages('dplyr')
install.packages('dummies')
install.packages('caTools')
install.packages('data.table')
install.packages('roll')
# load libraries
library(dplyr)
library(dummies)
library(caTools)
library(purrr)
library(data.table)
library(roll)
# read
data_url = "https://raw.githubuserco... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/taxize-package.R
\docType{data}
\name{plantGenusNames}
\alias{plantGenusNames}
\title{Vector of plant genus names from ThePlantList}
\format{A vector of length 793}
\source{
http://www.theplantlist.org
}
\description{
These names are from htt... | /man/plantGenusNames.Rd | permissive | ktargows/taxize | R | false | true | 493 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/taxize-package.R
\docType{data}
\name{plantGenusNames}
\alias{plantGenusNames}
\title{Vector of plant genus names from ThePlantList}
\format{A vector of length 793}
\source{
http://www.theplantlist.org
}
\description{
These names are from htt... |
\name{qtest.mixmeta}
\alias{qtest.mixmeta}
\alias{print.qtest.mixmeta}
\title{ Cochran Q Test of Heterogeneity for mixmeta Models }
\description{
This method function performs a Cochran Q test of (residual) heterogeneity on fitted meta-analytical models represented in objects of class \code{"mixmeta"}.
}
... | /man/qtest.mixmeta.Rd | no_license | mbexhrs3/mixmeta | R | false | false | 4,024 | rd | \name{qtest.mixmeta}
\alias{qtest.mixmeta}
\alias{print.qtest.mixmeta}
\title{ Cochran Q Test of Heterogeneity for mixmeta Models }
\description{
This method function performs a Cochran Q test of (residual) heterogeneity on fitted meta-analytical models represented in objects of class \code{"mixmeta"}.
}
... |
# Set Up for Modeling -------------------------------------------------------------------------
library(loescher)
library(dplyr)
library(lme4)
library(Gmisc)
# # Create a column for staph aureus specifically
# dfu <- taxa$Species %>% apply(2, function(x) x/sum(x)) %>%
# .['s__aureus',] %>%
# data.frame(SampleID ... | /Projects/INSIGHTS/Microbiome/Grice-Scripts/dfu_models.R | no_license | katebliz/bonhamlab | R | false | false | 11,058 | r | # Set Up for Modeling -------------------------------------------------------------------------
library(loescher)
library(dplyr)
library(lme4)
library(Gmisc)
# # Create a column for staph aureus specifically
# dfu <- taxa$Species %>% apply(2, function(x) x/sum(x)) %>%
# .['s__aureus',] %>%
# data.frame(SampleID ... |
library(fclust)
### Name: SIL.F
### Title: Fuzzy silhouette index
### Aliases: SIL.F
### Keywords: multivariate
### ** Examples
## McDonald's data
data(Mc)
names(Mc)
## data normalization by dividing the nutrition facts by the Serving Size (column 1)
for (j in 2:(ncol(Mc)-1))
Mc[,j]=Mc[,j]/Mc[,1]
## removing the co... | /data/genthat_extracted_code/fclust/examples/SIL.F.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 526 | r | library(fclust)
### Name: SIL.F
### Title: Fuzzy silhouette index
### Aliases: SIL.F
### Keywords: multivariate
### ** Examples
## McDonald's data
data(Mc)
names(Mc)
## data normalization by dividing the nutrition facts by the Serving Size (column 1)
for (j in 2:(ncol(Mc)-1))
Mc[,j]=Mc[,j]/Mc[,1]
## removing the co... |
# load required functions and packages
library("testthat")
suppressWarnings(library("SuperLearner"))
# generate the data -- note that this is a simple setting, for speed -----------
set.seed(4747)
p <- 2
n <- 5e4
x <- replicate(p, stats::rnorm(n, 0, 1))
# apply the function to the x's
y <- 1 + 0.5 * x[, 1] +... | /tests/testthat/test-average_vim.R | permissive | bdwilliamson/vimp | R | false | false | 2,918 | r | # load required functions and packages
library("testthat")
suppressWarnings(library("SuperLearner"))
# generate the data -- note that this is a simple setting, for speed -----------
set.seed(4747)
p <- 2
n <- 5e4
x <- replicate(p, stats::rnorm(n, 0, 1))
# apply the function to the x's
y <- 1 + 0.5 * x[, 1] +... |
#Plot 3.
#The actual plot script, is in the end part of this file.
#First, we need to download, import and format the data.
#There is also a check to see if the file is already downloaded.
#Set the filenames needed in this script.
filename <- "Assignment_file.zip"
filname_unzipped <- "household_power_consumpt... | /plot3.R | no_license | Stakseng/ExData_Plotting1 | R | false | false | 2,597 | r | #Plot 3.
#The actual plot script, is in the end part of this file.
#First, we need to download, import and format the data.
#There is also a check to see if the file is already downloaded.
#Set the filenames needed in this script.
filename <- "Assignment_file.zip"
filname_unzipped <- "household_power_consumpt... |
###########libraries and functions#############
if (grepl("Windows", Sys.getenv("OS"))){
PATH ="V:/"} else {
PATH ="/C010-projects/"}
if (grepl("Windows", Sys.getenv("OS"))){
PATH_Y="N:/"} else {
PATH_Y="/C010-datasets/"}
#get segmentation in R
library(BSgenome.Mmusculus.UCSC.mm10)
seq <- seqlengths(BSgen... | /code/cnv_calling_seg.R | no_license | tkik/Lung_CoO_2 | R | false | false | 643 | r |
###########libraries and functions#############
if (grepl("Windows", Sys.getenv("OS"))){
PATH ="V:/"} else {
PATH ="/C010-projects/"}
if (grepl("Windows", Sys.getenv("OS"))){
PATH_Y="N:/"} else {
PATH_Y="/C010-datasets/"}
#get segmentation in R
library(BSgenome.Mmusculus.UCSC.mm10)
seq <- seqlengths(BSgen... |
#' Global Configuration Options
#'
#' Configurable options that define vcr's default behavior.
#'
#' @param ... configuration settings used to override defaults. See below for a
#' complete list of valid arguments.
#'
#' @section Configurable settings:
#'
#' ## vcr options
#'
#' ### File locations
#'
#' - `dir` Casse... | /R/configuration.R | permissive | zachary-foster/vcr | R | false | false | 13,203 | r | #' Global Configuration Options
#'
#' Configurable options that define vcr's default behavior.
#'
#' @param ... configuration settings used to override defaults. See below for a
#' complete list of valid arguments.
#'
#' @section Configurable settings:
#'
#' ## vcr options
#'
#' ### File locations
#'
#' - `dir` Casse... |
############################################################
# For macaque paper, 09.20
# Just does some of the Chi-squared tests for gene counts.
# Gregg Thomas
############################################################
this.dir <- dirname(parent.frame(2)$ofile)
setwd(this.dir)
cat("----------\n\n")
#############... | /gene-counts/chi_tests.r | permissive | gwct/macaque-cnv-figs | R | false | false | 2,351 | r | ############################################################
# For macaque paper, 09.20
# Just does some of the Chi-squared tests for gene counts.
# Gregg Thomas
############################################################
this.dir <- dirname(parent.frame(2)$ofile)
setwd(this.dir)
cat("----------\n\n")
#############... |
connection_progress_api_available <- function() {
exists(".rs.api.addJob")
}
connection_progress_api <- function() {
list(
add_job = get(".rs.api.addJob"),
set_job_status = get(".rs.api.setJobStatus"),
add_job_progress = get(".rs.api.addJobProgress")
)
}
connection_progress_update <- function(jobNam... | /R/connection_progress.R | permissive | lawremi/sparklyr | R | false | false | 6,207 | r | connection_progress_api_available <- function() {
exists(".rs.api.addJob")
}
connection_progress_api <- function() {
list(
add_job = get(".rs.api.addJob"),
set_job_status = get(".rs.api.setJobStatus"),
add_job_progress = get(".rs.api.addJobProgress")
)
}
connection_progress_update <- function(jobNam... |
library(shiny)
library(ggplot2)
#All the webs have the same skeleton
#GUI
ui<-fluidPage(
titlePanel("Diamonds Data"),
h1("I am header 1"),
#different arguments, need commas
h2("I am header 2"),
sidebarLayout(
sidebarPanel(
helpText("This app is to visulaize diamonds dataset"),
textInput(input... | /diamondsVis/app.R | no_license | KaylaX/diamonds | R | false | false | 1,247 | r | library(shiny)
library(ggplot2)
#All the webs have the same skeleton
#GUI
ui<-fluidPage(
titlePanel("Diamonds Data"),
h1("I am header 1"),
#different arguments, need commas
h2("I am header 2"),
sidebarLayout(
sidebarPanel(
helpText("This app is to visulaize diamonds dataset"),
textInput(input... |
library(tidyverse)
library(sf)
mapla.aggregates = read_csv('data/processed/mapla-crowding-history.csv')
mapla.aggregates
mapla.shp = read_sf('data/processed/mapping-la-neighborhoods.geojson') %>%
filter(hood.name != 'Avalon', !str_detect(hood.name, 'Catalina'))
mapla.shp
# mapla.shp %>% ggplot() + geom_sf()
ma... | /gis/04_plot.R | no_license | ryanvmenezes/crowding | R | false | false | 2,199 | r | library(tidyverse)
library(sf)
mapla.aggregates = read_csv('data/processed/mapla-crowding-history.csv')
mapla.aggregates
mapla.shp = read_sf('data/processed/mapping-la-neighborhoods.geojson') %>%
filter(hood.name != 'Avalon', !str_detect(hood.name, 'Catalina'))
mapla.shp
# mapla.shp %>% ggplot() + geom_sf()
ma... |
plot4 <- function() {
## Get the data. While it was recommended that we not download the entire file,
## it was not required that we do so.
## I decided to download and read in the whole thing and subset it
## later.
temp <-tempfile()
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhouseho... | /MyAnswers/plot4.R | no_license | AlphaBetaCourseraDelta/ExData_Plotting1 | R | false | false | 2,552 | r | plot4 <- function() {
## Get the data. While it was recommended that we not download the entire file,
## it was not required that we do so.
## I decided to download and read in the whole thing and subset it
## later.
temp <-tempfile()
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhouseho... |
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../h2o-runit.R')
test.rdocash2o.golden <- function() {
#Example from as.factor R example
data(iris)
summary(iris)
iris.r <- iris
iris.h2o <- as.h2o(iris.r, destination_frame="iris.h2o")
class<- class(iris.h2o)
Log.info("Print class of i... | /h2o-r/tests/testdir_docexamples/runit_Rdoc_as_h2o.R | permissive | tamseo/h2o-3 | R | false | false | 421 | r | setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../h2o-runit.R')
test.rdocash2o.golden <- function() {
#Example from as.factor R example
data(iris)
summary(iris)
iris.r <- iris
iris.h2o <- as.h2o(iris.r, destination_frame="iris.h2o")
class<- class(iris.h2o)
Log.info("Print class of i... |
logisticfun <- list(
births1 = function(b1, envres) b1 * envres,
deaths1 = function(d1, envres) d1,
deaths2 = function(d2, envres) d2
)
| /Demographic functions/logisticfun.R | no_license | legault/SSAplus | R | false | false | 153 | r | logisticfun <- list(
births1 = function(b1, envres) b1 * envres,
deaths1 = function(d1, envres) d1,
deaths2 = function(d2, envres) d2
)
|
################################################################################
##' @title produce models projections and ensemble projections
##'
##' @author Damien G.
##' @date 10/09/2015
##' @author damien.georges2 at gmail.com
##'
##' @description
##' This script will produce projections of species distribut... | /scripts/3_climate_and_biointer_modelling/shrubs_climat_and_biointer_projections.R | no_license | DamienGeorges/briscahub | R | false | false | 9,788 | r | ################################################################################
##' @title produce models projections and ensemble projections
##'
##' @author Damien G.
##' @date 10/09/2015
##' @author damien.georges2 at gmail.com
##'
##' @description
##' This script will produce projections of species distribut... |
/plot.R | no_license | JoonsukPark/recharted | R | false | false | 1,574 | r | ||
#' Fit Continuous-Time Correlated Random Walk Models to Animal Telemetry Data
#'
#' The function uses the Kalman filter to estimate movement paramters in a
#' state-space version of the continuous-time movement model. Separate models
#' are specified for movement portion and the location error portion. Each
#' model c... | /R/crwMLE.R | no_license | kenady/crawl | R | false | false | 16,146 | r | #' Fit Continuous-Time Correlated Random Walk Models to Animal Telemetry Data
#'
#' The function uses the Kalman filter to estimate movement paramters in a
#' state-space version of the continuous-time movement model. Separate models
#' are specified for movement portion and the location error portion. Each
#' model c... |
##missing data parameters
UnionTBL=tblRetrieve(Table='',Parameters='', Years=c('2013','2014','2015'), Projects=c('NV','GSENM','COPLT','WRSA','NORCAL','2015ProtocolOverlap','AKEFO'),Protocols=c('NRSA13','WRSA14','BOAT14','AK14'))
#ALLp=AllParam,UIDS=UIDs,ALL=AllData,Filter=filter,SiteCodes=sitecode... | /DataQA_WRSA.R | no_license | swajud/WRSA | R | false | false | 56,682 | r |
##missing data parameters
UnionTBL=tblRetrieve(Table='',Parameters='', Years=c('2013','2014','2015'), Projects=c('NV','GSENM','COPLT','WRSA','NORCAL','2015ProtocolOverlap','AKEFO'),Protocols=c('NRSA13','WRSA14','BOAT14','AK14'))
#ALLp=AllParam,UIDS=UIDs,ALL=AllData,Filter=filter,SiteCodes=sitecode... |
test_that("glue_collapse works like paste(glue_collapse=)", {
# Always return 0 length outputs for 0 length inputs.
#expect_identical(paste(glue_collapse = "", character(0)), glue_collapse(character(0)))
expect_identical(as_glue(paste(collapse = "", "")), glue_collapse(""))
expect_identical(as_glue(paste(coll... | /tests/testthat/test-collapse.R | permissive | shrektan/glue | R | false | false | 1,990 | r | test_that("glue_collapse works like paste(glue_collapse=)", {
# Always return 0 length outputs for 0 length inputs.
#expect_identical(paste(glue_collapse = "", character(0)), glue_collapse(character(0)))
expect_identical(as_glue(paste(collapse = "", "")), glue_collapse(""))
expect_identical(as_glue(paste(coll... |
#' Lubridate Supplements
#'
#' Lubridate supllements lifted from github.com/wacl-york/waclr
parse_excel_date <- function(x, tz = "UTC", type = "windows") {
# Check
type <- stringr::str_to_lower(type)
type <- stringr::str_replace_all(type, "\\.| ", "_")
if (!type %in% c("windows", "os_x_2007")) {
sto... | /R/lubridate_supplements.R | no_license | willdrysdale/wsdmiscr | R | false | false | 832 | r | #' Lubridate Supplements
#'
#' Lubridate supllements lifted from github.com/wacl-york/waclr
parse_excel_date <- function(x, tz = "UTC", type = "windows") {
# Check
type <- stringr::str_to_lower(type)
type <- stringr::str_replace_all(type, "\\.| ", "_")
if (!type %in% c("windows", "os_x_2007")) {
sto... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fonctions_complementaires.R
\name{attribution_statut_nx_patient}
\alias{attribution_statut_nx_patient}
\title{Attribution du statut nouveau patient pour les objets de type rsa (utilisé pour la cancérologie)
Les rsa de cancerologie sont préala... | /man/attribution_statut_nx_patient.Rd | no_license | 24p11/dimRactivite | R | false | true | 1,148 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fonctions_complementaires.R
\name{attribution_statut_nx_patient}
\alias{attribution_statut_nx_patient}
\title{Attribution du statut nouveau patient pour les objets de type rsa (utilisé pour la cancérologie)
Les rsa de cancerologie sont préala... |
library(tidyverse)
library(rgdal)
library(sf)
read_shape <- function(folder_path,
tidy_vars = TRUE, # select and rename key variables
include_aus = FALSE, # include aus_code_2021 and aus_name_2021 variables
add_vars = NULL, # vars to add
... | /data-raw/read_shape.R | no_license | wfmackey/absmapsdata | R | false | false | 3,597 | r |
library(tidyverse)
library(rgdal)
library(sf)
read_shape <- function(folder_path,
tidy_vars = TRUE, # select and rename key variables
include_aus = FALSE, # include aus_code_2021 and aus_name_2021 variables
add_vars = NULL, # vars to add
... |
words_df<-sns%>%
unnest_tokens(word,text)
words_df<-words_df%>%
filter(!(word %in% stop_words$word))
word_freq<-words_df%>%
group_by(word)%>%
summarize(count=n())
wordcloud(word_freq$word,word_freq$count,min.freq=25)
| /650austen11-1/wordcloud.R | no_license | hbeezub/DATA650TopicsFA2017nov | R | false | false | 228 | r | words_df<-sns%>%
unnest_tokens(word,text)
words_df<-words_df%>%
filter(!(word %in% stop_words$word))
word_freq<-words_df%>%
group_by(word)%>%
summarize(count=n())
wordcloud(word_freq$word,word_freq$count,min.freq=25)
|
# Preconditions
# Zip has been downloaded and extracted into ./UCI HAR Dataset
#
# loading package
library(dplyr)
##############
# STEP1 Merges the training and the test sets to create one data set.
# Reading contents
datafeatures <- read.table("./UCI HAR Dataset/features.txt",
col.names... | /run_analysis.R | no_license | alfredofp/GettingAndCleaningDataCourseProject | R | false | false | 4,374 | r |
# Preconditions
# Zip has been downloaded and extracted into ./UCI HAR Dataset
#
# loading package
library(dplyr)
##############
# STEP1 Merges the training and the test sets to create one data set.
# Reading contents
datafeatures <- read.table("./UCI HAR Dataset/features.txt",
col.names... |
rm(list=ls(all=TRUE))
require(XML)
require(bitops)
require(RCurl)
require(NLP)
require(httr)
require(chron)
source('./Functions.R')
alldata = read.csv('testcsv.csv')
orgURL = 'http://www.boxofficemojo.com'
fulldata = data.frame()
myHttpheader<- c(
"User-Agent"="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.3... | /Movie_Parser/MovieContent_2.R | no_license | peter0749/Statistics_Final | R | false | false | 2,856 | r | rm(list=ls(all=TRUE))
require(XML)
require(bitops)
require(RCurl)
require(NLP)
require(httr)
require(chron)
source('./Functions.R')
alldata = read.csv('testcsv.csv')
orgURL = 'http://www.boxofficemojo.com'
fulldata = data.frame()
myHttpheader<- c(
"User-Agent"="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.3... |
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))
result <- do.call(diversityFores... | /diversityForest/inst/testfiles/numSmaller/libFuzzer_numSmaller/numSmaller_valgrind_files/1610037462-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 356 | 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))
result <- do.call(diversityFores... |
#' Combine Vectors From List And Return Basic Count Statistics
#'
#' The aim of this function is to choose a fixed number (\code{nCombin}) of list-elments from \code{lst} and count the number of common values/words.
#' Furthermore, one can define levels to fine-tune the types of combinations to examine.
#' In case mult... | /R/combineAsN.R | no_license | cran/wrMisc | R | false | false | 11,133 | r | #' Combine Vectors From List And Return Basic Count Statistics
#'
#' The aim of this function is to choose a fixed number (\code{nCombin}) of list-elments from \code{lst} and count the number of common values/words.
#' Furthermore, one can define levels to fine-tune the types of combinations to examine.
#' In case mult... |
breakHandler =
function(call, env, ir, ...)
{
if(!exists(".nextBlock", env) || is.null(env$.nextBlock))
stop("No next block available. Can't break from this code")
ir$createBr(env$.nextBlock[[1]])
}
nextHandler =
function(call, env, ir, ...)
{
if(!exists(".continueBlock", env) || is.null(env$.continueBlock... | /R/nextBreak.R | no_license | vsbuffalo/RLLVMCompile | R | false | false | 438 | r | breakHandler =
function(call, env, ir, ...)
{
if(!exists(".nextBlock", env) || is.null(env$.nextBlock))
stop("No next block available. Can't break from this code")
ir$createBr(env$.nextBlock[[1]])
}
nextHandler =
function(call, env, ir, ...)
{
if(!exists(".continueBlock", env) || is.null(env$.continueBlock... |
#' ---
#' title: 'Sonia Mode'
#' author: Bruno Fischer Colonimos
#' date: "`r format(Sys.Date(), '%d %B %Y')`"
#' output:
#' pdf_document:
#' number_sections: yes
#' latex_engine: pdflatex
#' urlcolor: blue
#' fontsize: 11pt
#' geometry: top= 0.8in, left= 0.8in, right= 0.8in, bottom = 0.... | /soniamode.R | no_license | Brufico/statsprev2016 | R | false | false | 4,435 | r | #' ---
#' title: 'Sonia Mode'
#' author: Bruno Fischer Colonimos
#' date: "`r format(Sys.Date(), '%d %B %Y')`"
#' output:
#' pdf_document:
#' number_sections: yes
#' latex_engine: pdflatex
#' urlcolor: blue
#' fontsize: 11pt
#' geometry: top= 0.8in, left= 0.8in, right= 0.8in, bottom = 0.... |
options(repos="https://cran.rstudio.com/")
is_r_startup <- function(){
#! determing if R is starting up.
root <- sys.call(1)
!is.null(root) && (deparse(root) == ".First.sys")
}
using <-
function( ... #< Packages to load
, install.missing=!is.null(getOption("repos"))
#< Should a... | /using.R | no_license | icecream5058/predictive_analytics | R | false | false | 3,124 | r | options(repos="https://cran.rstudio.com/")
is_r_startup <- function(){
#! determing if R is starting up.
root <- sys.call(1)
!is.null(root) && (deparse(root) == ".First.sys")
}
using <-
function( ... #< Packages to load
, install.missing=!is.null(getOption("repos"))
#< Should a... |
#
#
# triplet.family.R
#
# $Revision: 1.1 $ $Date: 2011/11/05 07:18:51 $
#
# Family of `third-order' point process models
#
# triplet.family: object of class 'isf'
#
#
# -------------------------------------------------------------------
#
triplet.family <-
list(
name = "triplet",
... | /R/triplet.family.R | no_license | rubak/spatstat | R | false | false | 3,329 | r | #
#
# triplet.family.R
#
# $Revision: 1.1 $ $Date: 2011/11/05 07:18:51 $
#
# Family of `third-order' point process models
#
# triplet.family: object of class 'isf'
#
#
# -------------------------------------------------------------------
#
triplet.family <-
list(
name = "triplet",
... |
# Chapter 3 - Random Variables and Distributions, Section - 3.8 (Functions of a Random Variable), Page No. - 168
# Let all possible values of X and Y be stored in variables 'X' and 'Y'.
# "vector" function is used in order to create a vector.
# For more description, type ?vector in the console.
X<-c(1,2,3,4,5,6... | /Probability_And_Statistics,_4th_Edition_by_Morris_H._Degroot,_Carnegie-Mellon_University_&_Mark_J._Schervish,_Carnegie-Mellon_University/CH3/EX3.8.1/Ex3_8_1.R | permissive | prashantsinalkar/R_TBC_Uploads | R | false | false | 1,017 | r | # Chapter 3 - Random Variables and Distributions, Section - 3.8 (Functions of a Random Variable), Page No. - 168
# Let all possible values of X and Y be stored in variables 'X' and 'Y'.
# "vector" function is used in order to create a vector.
# For more description, type ?vector in the console.
X<-c(1,2,3,4,5,6... |
library("rpart")
library("rpart.plot")
business=read.csv("Attributes_pizza.csv")
business=business[,c("business_id","stars",
"GoodForKids",
"RestaurantsPriceRange2",
"RestaurantsDelivery","Caters","WiFi")]
words=read.csv("WordEmbedding_selected.csv",row.na... | /code/Model Fitting.R | no_license | y220/Yelp | R | false | false | 1,246 | r | library("rpart")
library("rpart.plot")
business=read.csv("Attributes_pizza.csv")
business=business[,c("business_id","stars",
"GoodForKids",
"RestaurantsPriceRange2",
"RestaurantsDelivery","Caters","WiFi")]
words=read.csv("WordEmbedding_selected.csv",row.na... |
/AppWarrior/Source/Libs/QuickTime/RIncludes/DatabaseAccess.r | no_license | NebuHiiEjamu/Openline | R | false | false | 1,555 | r | ||
# VERSION:
# 1.1.1 - added sanitizer to segmentsDir input in xml; only grab gene symbols when refseq symbol prefixed by NC
# 1.2.0 - write entries with NA as gene to different output
args <- commandArgs(TRUE)
cnvvcf <- args[1]
geneFile <- args[2]
readCountsFile <- args[3]
segmentsDir <- args[4]
library("tidyverse")
l... | /gatk_germline_cnv/annotate/gatkCNVannotate.R | no_license | ohsu-comp-bio/compbio-galaxy-wrappers | R | false | false | 7,444 | r | # VERSION:
# 1.1.1 - added sanitizer to segmentsDir input in xml; only grab gene symbols when refseq symbol prefixed by NC
# 1.2.0 - write entries with NA as gene to different output
args <- commandArgs(TRUE)
cnvvcf <- args[1]
geneFile <- args[2]
readCountsFile <- args[3]
segmentsDir <- args[4]
library("tidyverse")
l... |
library(tsfknn)
### Name: autoplot.knnForecast
### Title: Create a ggplot object from a knnForecast object
### Aliases: autoplot.knnForecast
### ** Examples
pred <- knn_forecasting(USAccDeaths, h = 12, lags = 1:12, k = 2)
library(ggplot2)
autoplot(pred)
autoplot(pred, highlight = "neighbors")
| /data/genthat_extracted_code/tsfknn/examples/autoplot.knnForecast.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 301 | r | library(tsfknn)
### Name: autoplot.knnForecast
### Title: Create a ggplot object from a knnForecast object
### Aliases: autoplot.knnForecast
### ** Examples
pred <- knn_forecasting(USAccDeaths, h = 12, lags = 1:12, k = 2)
library(ggplot2)
autoplot(pred)
autoplot(pred, highlight = "neighbors")
|
## itzhak 2017 novelty
data("itzhak2017")
fData(itzhak2017)$markers[fData(itzhak2017)$markers %in% c("Large Protein Complex")] <- "unknown"
itzhak2017 <- filterNA(itzhak2017[,c(1:18)])
normalise(itzhak2017,method = "vsn")
itzhak2017TagmNoveltyparams <- tagmMcmcTrain_Nov(object = itzhak2017,
... | /code/codeforHPC/itzhak2017Novelty.R | no_license | ococrook/2019-noveltyTagm | R | false | false | 687 | r | ## itzhak 2017 novelty
data("itzhak2017")
fData(itzhak2017)$markers[fData(itzhak2017)$markers %in% c("Large Protein Complex")] <- "unknown"
itzhak2017 <- filterNA(itzhak2017[,c(1:18)])
normalise(itzhak2017,method = "vsn")
itzhak2017TagmNoveltyparams <- tagmMcmcTrain_Nov(object = itzhak2017,
... |
## Extract eBMS data for the sECURE project
## DATE: 03/03/2018
## AUTHOR: Reto Schmucki retoschm@ceh.ac.uk
##
## add a clever way to clip transect to have comparable length :smile:
## ==========================================
R --vanilla
dbconnect_param <- read.csv("data\\connect_file.csv", stringsAsFactors = FALSE... | /R/ebms_transect_clip.r | no_license | androsgianuca1234/sECUREdiversity_scaling | R | false | false | 15,320 | r | ## Extract eBMS data for the sECURE project
## DATE: 03/03/2018
## AUTHOR: Reto Schmucki retoschm@ceh.ac.uk
##
## add a clever way to clip transect to have comparable length :smile:
## ==========================================
R --vanilla
dbconnect_param <- read.csv("data\\connect_file.csv", stringsAsFactors = FALSE... |
library(tidyverse)
linear<-function(i){
n <- sample(c(100, 300), 1)
beta <- sample(c((-10:-0.1), (0.1:10)), 1)
sigma <- sample(1:12 , 1)
x<-rnorm(n, 0, 1)
y<-rnorm(n, beta*x, sigma)
res <- y
yhat <- x
ct <- cor.test(res, yhat)
return(ct$p.value)
}
norela<-function(i){
n <- sample(c(100, 300), 1)
... | /t-test-4-fun.R | no_license | shuofan18/ETF5550 | R | false | false | 1,950 | r | library(tidyverse)
linear<-function(i){
n <- sample(c(100, 300), 1)
beta <- sample(c((-10:-0.1), (0.1:10)), 1)
sigma <- sample(1:12 , 1)
x<-rnorm(n, 0, 1)
y<-rnorm(n, beta*x, sigma)
res <- y
yhat <- x
ct <- cor.test(res, yhat)
return(ct$p.value)
}
norela<-function(i){
n <- sample(c(100, 300), 1)
... |
#practica
x <- c()
for(i in 1:100){
z <- 5
while (z>=3 && z<= 10) {
moneda <- rbinom(1,1,0.5)
if (moneda==1)
{
z <- z + 1
}else {
z <- z -1
}
}
if(z==2){
x <- c(x,"Down")
} else {if(z == 11){x <- c(x, "UP")}}
}
table(x) | /Practica 100 veces.R | no_license | GaloMontero/Programacion_Actuarial_III_OT16 | R | false | false | 303 | r | #practica
x <- c()
for(i in 1:100){
z <- 5
while (z>=3 && z<= 10) {
moneda <- rbinom(1,1,0.5)
if (moneda==1)
{
z <- z + 1
}else {
z <- z -1
}
}
if(z==2){
x <- c(x,"Down")
} else {if(z == 11){x <- c(x, "UP")}}
}
table(x) |
plot.gSlc <-
function(x, pages = 0,responseScale = FALSE, xlab = NULL, ylab = NULL, main = NULL, bty = NULL,...)
{
gSlcObj <- x
#Get the information from gSlcObj
grid.size <- 101
formula.infor <- gSlcObj$formulaInfor
data <- gSlcObj$scaleData
sigsqu <- gSlcObj$sigmaSquared
nu <- gSlcObj$... | /gammSlice/R/plot.gSlc.R | no_license | ingted/R-Examples | R | false | false | 5,497 | r |
plot.gSlc <-
function(x, pages = 0,responseScale = FALSE, xlab = NULL, ylab = NULL, main = NULL, bty = NULL,...)
{
gSlcObj <- x
#Get the information from gSlcObj
grid.size <- 101
formula.infor <- gSlcObj$formulaInfor
data <- gSlcObj$scaleData
sigsqu <- gSlcObj$sigmaSquared
nu <- gSlcObj$... |
.interact_hexbin_function <- function(first_x, second_x, interact, cID) {
if (interact == "corr_spearman") {
func_if <- !(is.numeric(first_x) | is.numeric(second_x))
if (func_if) {
stop("Features need to be numeric.")
} else {
res_first <- tapply(first... | /R/interact_hexbin_function.R | no_license | kant/schex | R | false | false | 1,236 | r | .interact_hexbin_function <- function(first_x, second_x, interact, cID) {
if (interact == "corr_spearman") {
func_if <- !(is.numeric(first_x) | is.numeric(second_x))
if (func_if) {
stop("Features need to be numeric.")
} else {
res_first <- tapply(first... |
#' Sample spatial cluster visualization workhorse function
#'
#' This function visualizes the clusters for one given sample at the spot-level
#' using (by default) the histology information on the background. This is the
#' function that does all the plotting behind [sce_image_clus()]. To visualize
#' gene-level (or an... | /R/sce_image_clus_p.R | no_license | drighelli/spatialLIBD | R | false | false | 3,312 | r | #' Sample spatial cluster visualization workhorse function
#'
#' This function visualizes the clusters for one given sample at the spot-level
#' using (by default) the histology information on the background. This is the
#' function that does all the plotting behind [sce_image_clus()]. To visualize
#' gene-level (or an... |
########################################################################################################
# DeterministicWavesAnalysis.R
#
#
# Author: Eduarda Chagas
# Date : Aug 2020
# Contact: eduarda.chagas@dcc.ufmg.br
###################################################################################################... | /Code/DeterministicWavesAnalysis.R | no_license | GanggangDong/SAR-WATG | R | false | false | 13,147 | r | ########################################################################################################
# DeterministicWavesAnalysis.R
#
#
# Author: Eduarda Chagas
# Date : Aug 2020
# Contact: eduarda.chagas@dcc.ufmg.br
###################################################################################################... |
install.packages("textreuse")
library(textreuse)
dir <- system.file("C:/Users/uids4029/workspace/digital_humanities/TextReuse-Exercise/4_testdaten/2_Hypertexte", package = "textreuse")
minhash <- minhash_generator(200, seed = 235)
ats <- TextReuseCorpus(dir = dir,
tokenizer = tokenize_ng... | /dh-script.r | no_license | marc101101/digital_humanities | R | false | false | 1,206 | r | install.packages("textreuse")
library(textreuse)
dir <- system.file("C:/Users/uids4029/workspace/digital_humanities/TextReuse-Exercise/4_testdaten/2_Hypertexte", package = "textreuse")
minhash <- minhash_generator(200, seed = 235)
ats <- TextReuseCorpus(dir = dir,
tokenizer = tokenize_ng... |
### データ読み込み ###
library(vegan)
library(labdsv) #indval用
d<-read.csv("pspe.csv",row.names=1)
d[is.na(d)]<-0
d<-t(d)
d<-t(d)
col<-ncol(d)
row<-nrow(d)
is.numeric(d)
d
### 分割数設定 任意の数に変更してください ###
gnum_st<-5 ##地点
gnum_sp<-6 ##種
# DCAの場合
d.mds<-decorana(d)
summary(d.mds)
#MDSの場合
d.mds<-metaMDS(d,zerodist="add") ##### ze... | /elements/forana2.R | no_license | KazuhaM/Resources | R | false | false | 4,093 | r | ### データ読み込み ###
library(vegan)
library(labdsv) #indval用
d<-read.csv("pspe.csv",row.names=1)
d[is.na(d)]<-0
d<-t(d)
d<-t(d)
col<-ncol(d)
row<-nrow(d)
is.numeric(d)
d
### 分割数設定 任意の数に変更してください ###
gnum_st<-5 ##地点
gnum_sp<-6 ##種
# DCAの場合
d.mds<-decorana(d)
summary(d.mds)
#MDSの場合
d.mds<-metaMDS(d,zerodist="add") ##### ze... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/core-opn-polynomials.R
\name{opoly_i}
\alias{npoly_i}
\alias{opoly_i}
\title{Calculates shape from a polynomial model}
\usage{
opoly_i(pol, nb.pts = 120, reregister = TRUE)
npoly_i(pol, nb.pts = 120, reregister = TRUE)
}
\arguments{
\item{po... | /man/poly_i.Rd | no_license | yuting27/Momocs | R | false | true | 911 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/core-opn-polynomials.R
\name{opoly_i}
\alias{npoly_i}
\alias{opoly_i}
\title{Calculates shape from a polynomial model}
\usage{
opoly_i(pol, nb.pts = 120, reregister = TRUE)
npoly_i(pol, nb.pts = 120, reregister = TRUE)
}
\arguments{
\item{po... |
# Chapter 8 Lab: Decision Trees - Classification Trees, Regression Trees, Bagging
# and Random Forest, and Boosting
# modified by: Billy Raseman (https://github.com/wraseman)
## clear environment
rm(list=ls())
# Fitting Classification Trees
## load packages
library(tree) # classification and regression trees
lib... | /ch8/lab.R | no_license | wraseman/stat-learning | R | false | false | 4,509 | r | # Chapter 8 Lab: Decision Trees - Classification Trees, Regression Trees, Bagging
# and Random Forest, and Boosting
# modified by: Billy Raseman (https://github.com/wraseman)
## clear environment
rm(list=ls())
# Fitting Classification Trees
## load packages
library(tree) # classification and regression trees
lib... |
#' Created a Pooled Dataset from a Subject-Specific One
#'
#' Useful for simulation studies on biospecimen pooling designs.
#'
#'
#' @param dat Data frame with individual level data.
#' @param pool_sizes Integer vector of pool sizes ordered from largest to
#' smallest.
#' @param num_each Integer vector specifying numbe... | /R/form_pools.R | no_license | vandomed/pooling | R | false | false | 2,475 | r | #' Created a Pooled Dataset from a Subject-Specific One
#'
#' Useful for simulation studies on biospecimen pooling designs.
#'
#'
#' @param dat Data frame with individual level data.
#' @param pool_sizes Integer vector of pool sizes ordered from largest to
#' smallest.
#' @param num_each Integer vector specifying numbe... |
circle.projection.interactive <-
function (origin = c(0, 0), colr = "black", cent.line = FALSE,
...)
{
loc <- locator(1)
coordin <- c(loc$x, loc$y)/2
origin <- origin/2
rr <- sqrt(sum((coordin - origin)^2))
draw.circle(r = rr, h1 = coordin[1] + origin[1], h2 = coordin[2] +
origin[2], ... | /R/circle.projection.interactive.R | no_license | carelvdmerwe/UBbipl3 | R | false | false | 466 | r | circle.projection.interactive <-
function (origin = c(0, 0), colr = "black", cent.line = FALSE,
...)
{
loc <- locator(1)
coordin <- c(loc$x, loc$y)/2
origin <- origin/2
rr <- sqrt(sum((coordin - origin)^2))
draw.circle(r = rr, h1 = coordin[1] + origin[1], h2 = coordin[2] +
origin[2], ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lda-diag.r
\name{print.lda_diag}
\alias{print.lda_diag}
\title{Outputs the summary for a DLDA classifier object.}
\usage{
\method{print}{lda_diag}(x, ...)
}
\value{
\code{x} (invisibly).
}
\description{
Summarizes the trained DLDA classifier ... | /man/print.lda_diag.Rd | no_license | cran/sparsediscrim | R | false | true | 359 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lda-diag.r
\name{print.lda_diag}
\alias{print.lda_diag}
\title{Outputs the summary for a DLDA classifier object.}
\usage{
\method{print}{lda_diag}(x, ...)
}
\value{
\code{x} (invisibly).
}
\description{
Summarizes the trained DLDA classifier ... |
#### fitted value plots
setwd("~/Desktop/sfei")
load(file = "perStationParsimoniousModels.Rda")
load(file = "perStationFullModels.Rda")
load(file="perStationInteractionModels.Rda")
load(file="mod1Spatial.RData")
# load(file="mod2Spatial.RData")
# load(file="mod3Spatial.RData")
# load(file="mod4Spatial.RData")
#... | /SFEI_chl/shiny/settingUpStreamlineData.R | no_license | sastoudt/DS421_summerProject | R | false | false | 6,584 | r | #### fitted value plots
setwd("~/Desktop/sfei")
load(file = "perStationParsimoniousModels.Rda")
load(file = "perStationFullModels.Rda")
load(file="perStationInteractionModels.Rda")
load(file="mod1Spatial.RData")
# load(file="mod2Spatial.RData")
# load(file="mod3Spatial.RData")
# load(file="mod4Spatial.RData")
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gpalx.R
\name{gpalx}
\alias{gpalx}
\title{The extended colour palette}
\usage{
gpalx(n)
}
\arguments{
\item{n}{a positive integer}
}
\value{
A vector of n HTML colours.
}
\description{
The extended colour palette
}
\details{
This function int... | /man/gpalx.Rd | no_license | HughParsonage/grattanCharts | R | false | true | 412 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gpalx.R
\name{gpalx}
\alias{gpalx}
\title{The extended colour palette}
\usage{
gpalx(n)
}
\arguments{
\item{n}{a positive integer}
}
\value{
A vector of n HTML colours.
}
\description{
The extended colour palette
}
\details{
This function int... |
# Create a data-frame for the requested dates "2007-02-01 and 2007-02-02"
header <- read.table('household_power_consumption.txt', header = FALSE, nrows = 1, sep = ';')
power_data <- read.table('household_power_consumption.txt', header = FALSE ,skip = 66637, nrows = 2880, sep = ';', na.strings='?', col.names = unlist(... | /Load_Data_ExData_Plotting1.R | no_license | indra09-roy/ExData_Plotting1 | R | false | false | 521 | r |
# Create a data-frame for the requested dates "2007-02-01 and 2007-02-02"
header <- read.table('household_power_consumption.txt', header = FALSE, nrows = 1, sep = ';')
power_data <- read.table('household_power_consumption.txt', header = FALSE ,skip = 66637, nrows = 2880, sep = ';', na.strings='?', col.names = unlist(... |
\name{rc}
\alias{rc}
\alias{print.rc}
\alias{print.rc.symm}
\title{Fitting Row-Column Association Models}
\description{
Fit log-multiplicative row-column association models, also called RC(M) models or Goodman's (1979) Model II,
with one or several dimensions. Supported variants (for square tables) include symmetri... | /man/rc.Rd | no_license | nalimilan/logmult | R | false | false | 10,063 | rd | \name{rc}
\alias{rc}
\alias{print.rc}
\alias{print.rc.symm}
\title{Fitting Row-Column Association Models}
\description{
Fit log-multiplicative row-column association models, also called RC(M) models or Goodman's (1979) Model II,
with one or several dimensions. Supported variants (for square tables) include symmetri... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{contact_home}
\alias{contact_home}
\title{contact_home}
\format{
A Large list of 152 tibbles, each a 16x16 list of doubles.
}
\source{
\url{https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.100... | /man/contact_home.Rd | permissive | Como-DTC-Collaboration/comoDTC | R | false | true | 881 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{contact_home}
\alias{contact_home}
\title{contact_home}
\format{
A Large list of 152 tibbles, each a 16x16 list of doubles.
}
\source{
\url{https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.100... |
library(ggplot2)
# Set working directory, put the path to the folder containing your files inbetween the inverted commas
setwd("./")
#Import your data, save it as a csv in excel with the column headings
df <- read.csv("effect-radius-deflection-airy.csv", sep=",", header=TRUE)
# Line plot with error bar
p <- ggplot(df,... | /plot.r | no_license | kks32/pelvic-floor | R | false | false | 1,194 | r | library(ggplot2)
# Set working directory, put the path to the folder containing your files inbetween the inverted commas
setwd("./")
#Import your data, save it as a csv in excel with the column headings
df <- read.csv("effect-radius-deflection-airy.csv", sep=",", header=TRUE)
# Line plot with error bar
p <- ggplot(df,... |
## Read input csv file.
library(here)
data <- read.csv(header=TRUE, sep = "#", file = here("out_run-stats.csv"))
## Merge two or more commits when they cannot impact performance because
## a commit only changes auxiliary files.
## Replace git commit short-hash f91... with df1...
data[data == "f91c7b0"] <- "df144c5"
da... | /general/performance/stats.R | permissive | autocare/tlaplus | R | false | false | 1,678 | r | ## Read input csv file.
library(here)
data <- read.csv(header=TRUE, sep = "#", file = here("out_run-stats.csv"))
## Merge two or more commits when they cannot impact performance because
## a commit only changes auxiliary files.
## Replace git commit short-hash f91... with df1...
data[data == "f91c7b0"] <- "df144c5"
da... |
library(testthat)
library(bggAnalysis)
test_check("bggAnalysis")
| /tests/testthat.R | permissive | JTKostman/bgg-analysis | R | false | false | 66 | r | library(testthat)
library(bggAnalysis)
test_check("bggAnalysis")
|
Java 3
Домашнее задание 3
1. Прочитать файл (около 50 байт) в байтовый массив и вывести этот массив в консоль;
2. Последовательно сшить 5 файлов в один (файлы примерно 100 байт). Может пригодиться
следующая конструкция:
ArrayList<InputStream> al = new ArrayList<>();
...
Enumeration<InputStream> e = Collections.enume... | /Lesson3/README.rd | permissive | dserov/Java3HomeWork | R | false | false | 1,174 | rd | Java 3
Домашнее задание 3
1. Прочитать файл (около 50 байт) в байтовый массив и вывести этот массив в консоль;
2. Последовательно сшить 5 файлов в один (файлы примерно 100 байт). Может пригодиться
следующая конструкция:
ArrayList<InputStream> al = new ArrayList<>();
...
Enumeration<InputStream> e = Collections.enume... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/guardduty_operations.R
\name{guardduty_get_findings}
\alias{guardduty_get_findings}
\title{Describes Amazon GuardDuty findings specified by finding IDs}
\usage{
guardduty_get_findings(DetectorId, FindingIds, SortCriteria)
}
\arguments{
\item{... | /cran/paws.security.identity/man/guardduty_get_findings.Rd | permissive | jcheng5/paws | R | false | true | 908 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/guardduty_operations.R
\name{guardduty_get_findings}
\alias{guardduty_get_findings}
\title{Describes Amazon GuardDuty findings specified by finding IDs}
\usage{
guardduty_get_findings(DetectorId, FindingIds, SortCriteria)
}
\arguments{
\item{... |
MontecarloAntitheticCalls <-
function(s0,k,t,r,vol,n){
epsilon<-rnorm(n)
s1<-s0*exp((r-0.5*vol^2)*t+vol*sqrt(t)*epsilon)
s2<-s0*exp((r-0.5*vol^2)*t+vol*sqrt(t)*(-epsilon))
payoff1<-pmax(s1-k,0)
payoff2<-pmax(s2-k,0)
dPayoff<-exp(-r*t)*0.5*(payoff1+payoff2)
priceCall<-mean(dPayoff)
return(... | /R/MontecarloAntitheticCalls.R | no_license | cran/pcalls | R | false | false | 335 | r | MontecarloAntitheticCalls <-
function(s0,k,t,r,vol,n){
epsilon<-rnorm(n)
s1<-s0*exp((r-0.5*vol^2)*t+vol*sqrt(t)*epsilon)
s2<-s0*exp((r-0.5*vol^2)*t+vol*sqrt(t)*(-epsilon))
payoff1<-pmax(s1-k,0)
payoff2<-pmax(s2-k,0)
dPayoff<-exp(-r*t)*0.5*(payoff1+payoff2)
priceCall<-mean(dPayoff)
return(... |
library(lenses)
### Name: to_l
### Title: Promote a function to a 'getter' lens
### Aliases: to_l
### ** Examples
# This wouldn't make sense as a general legal lens, but fine as a `getter`
sqrt_l <- to_l(sqrt)
iris_root <- index(1) %.% index(1) %.% sqrt_l
sqrt(iris[[1]][[1]])
iris %>% view(iris_root)
tryCatch(iris... | /data/genthat_extracted_code/lenses/examples/to_l.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 398 | r | library(lenses)
### Name: to_l
### Title: Promote a function to a 'getter' lens
### Aliases: to_l
### ** Examples
# This wouldn't make sense as a general legal lens, but fine as a `getter`
sqrt_l <- to_l(sqrt)
iris_root <- index(1) %.% index(1) %.% sqrt_l
sqrt(iris[[1]][[1]])
iris %>% view(iris_root)
tryCatch(iris... |
#' Low-level functions for manipulating levels
#'
#' `lvls_reorder` leaves values as they are, but changes the order.
#' `lvls_revalue` changes the values of existing levels; there must
#' be one new level for each old level.
#' `lvls_expand` expands the set of levels; the new levels must
#' include the old levels.
#'
... | /R/lvls.R | no_license | Happy-Ferret/forcats | R | false | false | 3,083 | r | #' Low-level functions for manipulating levels
#'
#' `lvls_reorder` leaves values as they are, but changes the order.
#' `lvls_revalue` changes the values of existing levels; there must
#' be one new level for each old level.
#' `lvls_expand` expands the set of levels; the new levels must
#' include the old levels.
#'
... |
# Adobe Experience Manager OSGI config (AEM) API
#
# Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API
#
# OpenAPI spec version: 1.0.0-pre.0
# Contact: opensource@shinesolutions.com
# Generated by: https://openapi-generator.tech
#' ComAdobeGraniteSystemMonitoringI... | /clients/r/generated/R/ComAdobeGraniteSystemMonitoringImplSystemStatsMBeanImplProperties.r | permissive | shinesolutions/swagger-aem-osgi | R | false | false | 3,902 | r | # Adobe Experience Manager OSGI config (AEM) API
#
# Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API
#
# OpenAPI spec version: 1.0.0-pre.0
# Contact: opensource@shinesolutions.com
# Generated by: https://openapi-generator.tech
#' ComAdobeGraniteSystemMonitoringI... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/misc.R
\name{movingStat}
\alias{movingStat}
\title{Calculating a moving average/max/min statistic over a vector}
\usage{
movingStat(vec, statFunc = max, spacer = 2)
}
\arguments{
\item{vec}{to average over}
\item{statFunc}{function to use}
... | /man/movingStat.Rd | no_license | sherrillmix/dnar | R | false | true | 615 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/misc.R
\name{movingStat}
\alias{movingStat}
\title{Calculating a moving average/max/min statistic over a vector}
\usage{
movingStat(vec, statFunc = max, spacer = 2)
}
\arguments{
\item{vec}{to average over}
\item{statFunc}{function to use}
... |
/scriptMqaSegundaApresentacao.r | no_license | asreal089/R-mult_var_analysis | R | false | false | 3,257 | r | ||
# Setting the script directory as working directory
setwd(dirname(rstudioapi::getSourceEditorContext()$path))
# (i) - Start by generating 500 observations xi – the explanatory variable – from the
# uniform distribution with range [0,10]. (Most statistical packages have a command
# for the Uniform[0,1] distribution; j... | /Chapter 2 - Simple Regression/C8.R | permissive | AmirHKiani98/Wooldridge-Programming | R | false | false | 2,802 | r |
# Setting the script directory as working directory
setwd(dirname(rstudioapi::getSourceEditorContext()$path))
# (i) - Start by generating 500 observations xi – the explanatory variable – from the
# uniform distribution with range [0,10]. (Most statistical packages have a command
# for the Uniform[0,1] distribution; j... |
#!/usr/bin/env Rscript
## Tidies up final part of Topmodel output for easy R processing
## Again copied from Roy Sanderson at Newcastle by JAM at UEA
## Created on 17/03/2016
## Last modified on 21/11/2016
rm(list=ls())
options(scipen=-10)
args <- commandArgs(trailingOnly=TRUE)
ntimesteps <- as.numeric(args[1])
wal... | /postprocess.R | no_license | jamaas/grass_topmodel_r | R | false | false | 2,437 | r | #!/usr/bin/env Rscript
## Tidies up final part of Topmodel output for easy R processing
## Again copied from Roy Sanderson at Newcastle by JAM at UEA
## Created on 17/03/2016
## Last modified on 21/11/2016
rm(list=ls())
options(scipen=-10)
args <- commandArgs(trailingOnly=TRUE)
ntimesteps <- as.numeric(args[1])
wal... |
#hackOregon
readFinData<-function(fname){
tabin = read.table(file=fname,
strip.white=T,
comment.char="",
check.names=F,
header=T,
sep="\t",
stringsAsFactors=F)
return(tabin)
}
| /dataImport/openFiles.R | no_license | stochasticTreat/hack_oregon | R | false | false | 249 | r | #hackOregon
readFinData<-function(fname){
tabin = read.table(file=fname,
strip.white=T,
comment.char="",
check.names=F,
header=T,
sep="\t",
stringsAsFactors=F)
return(tabin)
}
|
# Eclat
# Data Preprocessing
# install.packages('arules')
library(arules)
dataset = read.csv('Market_Basket_Optimisation.csv', header = FALSE)
dataset = read.transactions('Market_Basket_Optimisation.csv', sep = ',', rm.duplicates = TRUE)
summary(dataset)
itemFrequencyPlot(dataset, topN = 10)
#Training Eclat on the da... | /eclat.R | no_license | rko1985/python_r-machine_learning-eclat-rule-learning | R | false | false | 471 | r | # Eclat
# Data Preprocessing
# install.packages('arules')
library(arules)
dataset = read.csv('Market_Basket_Optimisation.csv', header = FALSE)
dataset = read.transactions('Market_Basket_Optimisation.csv', sep = ',', rm.duplicates = TRUE)
summary(dataset)
itemFrequencyPlot(dataset, topN = 10)
#Training Eclat on the da... |
#Twitter 1 - Configure Tweets and Download them
#@dupadhyaya #Working using my Keys
#Load libraries
install.packages('curl')
install.packages('twitteR')
install.packages('ROAuth')
install.packages('syuzhet')
library("curl")
library("twitteR")
library("ROAuth")
library("syuzhet") #library for sentiment analysis - compa... | /4e1-twitter2.R | no_license | RaiPrabhansh/analytics1 | R | false | false | 663 | r | #Twitter 1 - Configure Tweets and Download them
#@dupadhyaya #Working using my Keys
#Load libraries
install.packages('curl')
install.packages('twitteR')
install.packages('ROAuth')
install.packages('syuzhet')
library("curl")
library("twitteR")
library("ROAuth")
library("syuzhet") #library for sentiment analysis - compa... |
hpc<- read.table("household_power_consumption.txt", header = TRUE, sep = ";")
library(dplyr)
hpc<- hpc %>%
filter(hpc$Date == "1/2/2007" | hpc$Date == "2/2/2007")
hpc$Date<- as.Date(hpc$Date, "%d/%m/%Y")
library(tidyr)
hpc <- unite(hpc, col = "DateTime", c("Date", "Time"), sep = " ")
hpc$DateTime<- strptime(hpc$Date... | /Plot3.R | no_license | StefanoSanfilippo/JHopskins_EDA_Lab1 | R | false | false | 1,092 | r | hpc<- read.table("household_power_consumption.txt", header = TRUE, sep = ";")
library(dplyr)
hpc<- hpc %>%
filter(hpc$Date == "1/2/2007" | hpc$Date == "2/2/2007")
hpc$Date<- as.Date(hpc$Date, "%d/%m/%Y")
library(tidyr)
hpc <- unite(hpc, col = "DateTime", c("Date", "Time"), sep = " ")
hpc$DateTime<- strptime(hpc$Date... |
#######################################################################
# rEMM - Extensible Markov Model (EMM) for Data Stream Clustering in R
# Copyrigth (C) 2011 Michael Hahsler
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published... | /rEMM/R/smooth_transitions.R | no_license | ingted/R-Examples | R | false | false | 1,769 | r | #######################################################################
# rEMM - Extensible Markov Model (EMM) for Data Stream Clustering in R
# Copyrigth (C) 2011 Michael Hahsler
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published... |
### =========================================================================
### transcriptLocs2refLocs()
### -------------------------------------------------------------------------
.normargExonStartsOrEnds <- function(exonStarts, argname)
{
if (is.list(exonStarts))
return(exonStarts)
if (is(exonSt... | /R/transcriptLocs2refLocs.R | no_license | xjyx/GenomicFeatures | R | false | false | 3,207 | r | ### =========================================================================
### transcriptLocs2refLocs()
### -------------------------------------------------------------------------
.normargExonStartsOrEnds <- function(exonStarts, argname)
{
if (is.list(exonStarts))
return(exonStarts)
if (is(exonSt... |
#' Metabolite concentrations
#'
#' A dataset containing the metabolite concentrations of 77 urine samples
#' from cancer patients measured by 1H NMR
#'
#' @usage data(cachexiaData)
#'
#' @format A data frame with 77 rows and 65 variables
#'
#' @source \url{http://dx.doi.org/10.1007/s11306-010-0232-9}
"cachexiaData"
#... | /R/exampleData.R | no_license | jackgisby/RFmarkerDetector | R | false | false | 447 | r | #' Metabolite concentrations
#'
#' A dataset containing the metabolite concentrations of 77 urine samples
#' from cancer patients measured by 1H NMR
#'
#' @usage data(cachexiaData)
#'
#' @format A data frame with 77 rows and 65 variables
#'
#' @source \url{http://dx.doi.org/10.1007/s11306-010-0232-9}
"cachexiaData"
#... |
data_path <- file.path(getwd(), "Data/_TRAIN_UNSEEN_LFW")
test_data_path <- file.path(getwd(), "Data/_TEST_UNSEEN_LFW")
dir.create(test_data_path, showWarnings = F)
folders <- list.files(data_path, full.names = F)
test_set_proportion = 0.20
set.seed(123)
#1. For each class, select 20% of the images, and move to a se... | /__WQD7004_GroupProject/Processes/SplitTestData_LFW_PersonReID.R | no_license | junyitt/R_image_recognition | R | false | false | 937 | r | data_path <- file.path(getwd(), "Data/_TRAIN_UNSEEN_LFW")
test_data_path <- file.path(getwd(), "Data/_TEST_UNSEEN_LFW")
dir.create(test_data_path, showWarnings = F)
folders <- list.files(data_path, full.names = F)
test_set_proportion = 0.20
set.seed(123)
#1. For each class, select 20% of the images, and move to a se... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.