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(PKreport)
### Name: PKdata
### Title: Data input
### Aliases: PKdata
### Keywords: methods
### ** Examples
# setup configuration
general.list <- list(save.format="bmp", width = 480, height = 480, package=2)
hist.list <- list(type=c("count"), layout=c(1,1), ind.layout=c(5,5))
scatter.list <- list(span=0.25, ... | /data/genthat_extracted_code/PKreport/examples/PKdata.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 713 | r | library(PKreport)
### Name: PKdata
### Title: Data input
### Aliases: PKdata
### Keywords: methods
### ** Examples
# setup configuration
general.list <- list(save.format="bmp", width = 480, height = 480, package=2)
hist.list <- list(type=c("count"), layout=c(1,1), ind.layout=c(5,5))
scatter.list <- list(span=0.25, ... |
# Author: C Lynam, Cefas
# Contact: chris.lynam@cefas.co.uk
# Version: 1
# Date: May 2020
#Lynam_IND_script_FINALPLOTS.R
PLOTROWN <- sum(TyL_GeoM,MaxL,Loo,Lm,MEANTLs,LFI) + ifelse(sum(TyL_GeoM,MaxL,Lm)==3,1,0)
if((Lm & TyL_GeoM) | (MaxL & TyL_GeoM & !Lm) ) PLOTROWN<-PLOTROWN+1
PLOTCOLN <- length(SPECIES)
windows(widt... | /Lynam_IND_script_FINALPLOTS.R | no_license | JoeRibeiro/R_old | R | false | false | 13,705 | r | # Author: C Lynam, Cefas
# Contact: chris.lynam@cefas.co.uk
# Version: 1
# Date: May 2020
#Lynam_IND_script_FINALPLOTS.R
PLOTROWN <- sum(TyL_GeoM,MaxL,Loo,Lm,MEANTLs,LFI) + ifelse(sum(TyL_GeoM,MaxL,Lm)==3,1,0)
if((Lm & TyL_GeoM) | (MaxL & TyL_GeoM & !Lm) ) PLOTROWN<-PLOTROWN+1
PLOTCOLN <- length(SPECIES)
windows(widt... |
#-------------------------------------------------------------------#
# Summary Statistics for Full Dataset #
# 2014-2018 #
#-------------------------------------------------------------------#
#Clear environment and set working dire... | /AnalysisScripts/SummaryStats.R | no_license | morganmackert/mmackert | R | false | false | 10,864 | r | #-------------------------------------------------------------------#
# Summary Statistics for Full Dataset #
# 2014-2018 #
#-------------------------------------------------------------------#
#Clear environment and set working dire... |
#rm(list=ls(all=T))
library(inline)
txt<-'
#include<Eigen/Dense>
using namespace Rcpp;
using namespace Eigen;
MatrixXd m1=as<MatrixXd> (xs);
ColPivHouseholderQR<MatrixXd> dec(m1);
MatrixXd q1=dec.householderQ();
MatrixXd p1=dec.colsPermutation();
//MatrixXd r1=dec.matrixR().triangularView<Upper>()*p1.inverse();
Matri... | /qr.R | no_license | Allisterh/High_Dimensional_Cointegration | R | false | false | 559 | r | #rm(list=ls(all=T))
library(inline)
txt<-'
#include<Eigen/Dense>
using namespace Rcpp;
using namespace Eigen;
MatrixXd m1=as<MatrixXd> (xs);
ColPivHouseholderQR<MatrixXd> dec(m1);
MatrixXd q1=dec.householderQ();
MatrixXd p1=dec.colsPermutation();
//MatrixXd r1=dec.matrixR().triangularView<Upper>()*p1.inverse();
Matri... |
## System packages == installed packages with a non-NA priority
## Returns TRUE/FALSE, indicating whether the symlinking was successful
symlinkSystemPackages <- function(project = NULL) {
project <- getProjectDir(project)
# Get the path to the base R library installation
sysLibPath <- normalizePath(R.home("libra... | /R/library-support.R | no_license | astraadria4ari/packrat | R | false | false | 5,604 | r | ## System packages == installed packages with a non-NA priority
## Returns TRUE/FALSE, indicating whether the symlinking was successful
symlinkSystemPackages <- function(project = NULL) {
project <- getProjectDir(project)
# Get the path to the base R library installation
sysLibPath <- normalizePath(R.home("libra... |
write("<html>","index.html")
write("<body>","index.html",append=T)
write("<h1>Wheat exchanges visualization</h1>","index.html",append=T)
write("<h2>click on a year</h2>","index.html",append=T)
for(period in 1:(length(years.considered)-1)){
linkName<-paste("year_",years.considered[period],".html",sep="")
linkHtmlCode<... | /scripts/map/r_create_html_index_annual.R | no_license | gfgprojects/cms_wheat | R | false | false | 1,192 | r | write("<html>","index.html")
write("<body>","index.html",append=T)
write("<h1>Wheat exchanges visualization</h1>","index.html",append=T)
write("<h2>click on a year</h2>","index.html",append=T)
for(period in 1:(length(years.considered)-1)){
linkName<-paste("year_",years.considered[period],".html",sep="")
linkHtmlCode<... |
plotSol <- function (x, yLoglikFunc, resMLE,
xlabel, ylabel, subtitle, title,
zeroLine=TRUE) {
# Variables Configurations
y <- apply(as.matrix(x), 1, function(v) yLoglikFunc(v))
xIters <- resMLE$iterations
yIters <- apply(as.matrix(xIters), 1, fun... | /hw2-optimization/plotter.R | no_license | jcbozonier/Gatech-ISYE-6416 | R | false | false | 2,813 | r | plotSol <- function (x, yLoglikFunc, resMLE,
xlabel, ylabel, subtitle, title,
zeroLine=TRUE) {
# Variables Configurations
y <- apply(as.matrix(x), 1, function(v) yLoglikFunc(v))
xIters <- resMLE$iterations
yIters <- apply(as.matrix(xIters), 1, fun... |
# 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__event__.r | permissive | RandomCriticalAnalysis/MEPS-summary-tables | R | false | false | 2,222 | 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... |
shinyServer(function(input, output,session) {
## set up input menu in sidebar
output$sb <- renderUI({
if (input$sbMenu=="stations") {
inputPanel(id="ip",
selectInput("country","Select Country",countryChoice, selected="Canada"),
radioButtons("tempScale","",c("Celsiu... | /server.R | no_license | JT85/climate | R | false | false | 858 | r |
shinyServer(function(input, output,session) {
## set up input menu in sidebar
output$sb <- renderUI({
if (input$sbMenu=="stations") {
inputPanel(id="ip",
selectInput("country","Select Country",countryChoice, selected="Canada"),
radioButtons("tempScale","",c("Celsiu... |
# nodes <- 1
# cores <- 20
# timeLimit <- "01:00:00"
# partition <- 'shas'
# qos <- 'long'
# output <- 'job-%j.out'
string <- c(
'#!/bin/bash',
'',
#paste0('#SBATCH --nodes=', nodes),
#paste0('#SBATCH --ntasks=', cores),
paste0('#SBATCH --time=', timeLimit),
paste0('#SBATCH --partition=', partition),
#paste0('#SBATC... | /code/sbatch.R | no_license | fickse/ssim | R | false | false | 1,043 | r |
# nodes <- 1
# cores <- 20
# timeLimit <- "01:00:00"
# partition <- 'shas'
# qos <- 'long'
# output <- 'job-%j.out'
string <- c(
'#!/bin/bash',
'',
#paste0('#SBATCH --nodes=', nodes),
#paste0('#SBATCH --ntasks=', cores),
paste0('#SBATCH --time=', timeLimit),
paste0('#SBATCH --partition=', partition),
#paste0('#SBATC... |
### data are xts objects -----
library(xts)
library(quantmod)
### Aggregate all SB loans into one series ------
CI <- readRDS("./totSB_CI_loans.rds")
NNRE <- readRDS("./totSB_NN_RE_loans.rds")
## from here: https://stackoverflow.com/questions/42628385/sum-list-of-matrices-with-nas
modifiedSum <- function(x, y) {
... | /1_querying_data_and_analysis/analyses/panel_data_analysis/get_panel_data/pulling_all_firms/data_small_business_loans/create_totSBloans_vars.R | no_license | Matt-Brigida/FFIEC_Call_Reports | R | false | false | 740 | r | ### data are xts objects -----
library(xts)
library(quantmod)
### Aggregate all SB loans into one series ------
CI <- readRDS("./totSB_CI_loans.rds")
NNRE <- readRDS("./totSB_NN_RE_loans.rds")
## from here: https://stackoverflow.com/questions/42628385/sum-list-of-matrices-with-nas
modifiedSum <- function(x, y) {
... |
# calendar example
# Inspired by: https://www.tatvic.com/blog/calender-heatmap-with-google-analytics-data/
# install libraries
# install.packages("googleAuthR")
# install.packages("googleAnalyticsR")
# install.packages("quantmod")
# install.packages("ggplot2")
# install.packages("reshape2")
# install.packages("plyr")
... | /9_calendar.R | no_license | mjimcua/R-Google-Analytics | R | false | false | 2,722 | r | # calendar example
# Inspired by: https://www.tatvic.com/blog/calender-heatmap-with-google-analytics-data/
# install libraries
# install.packages("googleAuthR")
# install.packages("googleAnalyticsR")
# install.packages("quantmod")
# install.packages("ggplot2")
# install.packages("reshape2")
# install.packages("plyr")
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.R
\name{get_survey_id_by_name}
\alias{get_survey_id_by_name}
\title{get_survey_id_by_name}
\usage{
get_survey_id_by_name(name, match.exact = TRUE, surveys_df = NULL)
}
\arguments{
\item{name}{Survey name}
\item{match.exact}{Search for e... | /man/get_survey_id_by_name.Rd | permissive | jlpalomino/qtoolkit | R | false | true | 519 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.R
\name{get_survey_id_by_name}
\alias{get_survey_id_by_name}
\title{get_survey_id_by_name}
\usage{
get_survey_id_by_name(name, match.exact = TRUE, surveys_df = NULL)
}
\arguments{
\item{name}{Survey name}
\item{match.exact}{Search for e... |
pred <- function(trans, weight, qtrsec) {
if(trans==0) {trans <- "Automatic"}
else if(trans==1) {trans <- "Manual"}
mydf <- data.frame(am=trans,wt=weight,qsec=qtrsec)
basic <- lm(formula = mpg ~ am, data = mtcars)
best <- lm(formula = mpg ~ wt + qsec + am, data = mtcars)
int <- lm(fo... | /Regression_Models/Transmission_Efficiency/pred.R | no_license | fentontaylor/CourseraDataScience | R | false | false | 532 | r | pred <- function(trans, weight, qtrsec) {
if(trans==0) {trans <- "Automatic"}
else if(trans==1) {trans <- "Manual"}
mydf <- data.frame(am=trans,wt=weight,qsec=qtrsec)
basic <- lm(formula = mpg ~ am, data = mtcars)
best <- lm(formula = mpg ~ wt + qsec + am, data = mtcars)
int <- lm(fo... |
library(ggplot2)
library(dplyr)
library(fasttime)
library(readr)
infile <- "../../data/serverLoad.txt"
calculateMovingAverage <- function(x, n)
stats::filter(x, rep(1/n, n), sides = 2)
ui <- shinyUI(
fluidPage(
titlePanel("Server Load"),
tags$hr(),
dateRangeInput(
inputId = "... | /02-NewTopics/05-reactivepoll/apps/02a-withWidgets/app.R | no_license | nwstephens/shiny-day-2016 | R | false | false | 2,052 | r | library(ggplot2)
library(dplyr)
library(fasttime)
library(readr)
infile <- "../../data/serverLoad.txt"
calculateMovingAverage <- function(x, n)
stats::filter(x, rep(1/n, n), sides = 2)
ui <- shinyUI(
fluidPage(
titlePanel("Server Load"),
tags$hr(),
dateRangeInput(
inputId = "... |
#' Calculate Cell cycle phase prediction
#'
#' This function takes an object of class iCellR and assignes cell cycle stage for the cells.
#' @param object A data frame containing gene counts for cells.
#' @param s.genes Genes that are used as a marker for S phase.
#' @param g2m.genes Genes that are used as a marker for... | /iCellR/R/F0045.R | no_license | akhikolla/InformationHouse | R | false | false | 8,033 | r | #' Calculate Cell cycle phase prediction
#'
#' This function takes an object of class iCellR and assignes cell cycle stage for the cells.
#' @param object A data frame containing gene counts for cells.
#' @param s.genes Genes that are used as a marker for S phase.
#' @param g2m.genes Genes that are used as a marker for... |
# Copyright (c) 2016, Universitat Rovira i Virgili (Spain), Aarhus University
# (Denmark) and University of Aveiro (Portugal)
#
# Written by Carlos P. Roca
# as Research funded by the European Union
# for the research paper by Roca, Gomes, Amorim & Scott-Fordsmand: "Variation-
# preserving normalization unveils blind... | /watson_u2.r | permissive | carlosproca/gene-expr-norm-paper | R | false | false | 1,922 | r | # Copyright (c) 2016, Universitat Rovira i Virgili (Spain), Aarhus University
# (Denmark) and University of Aveiro (Portugal)
#
# Written by Carlos P. Roca
# as Research funded by the European Union
# for the research paper by Roca, Gomes, Amorim & Scott-Fordsmand: "Variation-
# preserving normalization unveils blind... |
#
# Anaquin - Sequin statistical analysis. Version 1.1.1.
#
# This R script was generated at %1%.
#
# %2%
#
library(Anaquin)
data <- read.csv('%3%/%4%', row.names=1, sep='\t')
title <- '%5%'
xlab <- '%6%'
ylab <- '%7%'
# Expected log-fold (x-axis)
expected <- %8%
# Measured log-fold (y-axis)
measured <- %9%
... | /src/r/plotFold.R | permissive | wangzhennan14/Anaquin | R | false | false | 550 | r | #
# Anaquin - Sequin statistical analysis. Version 1.1.1.
#
# This R script was generated at %1%.
#
# %2%
#
library(Anaquin)
data <- read.csv('%3%/%4%', row.names=1, sep='\t')
title <- '%5%'
xlab <- '%6%'
ylab <- '%7%'
# Expected log-fold (x-axis)
expected <- %8%
# Measured log-fold (y-axis)
measured <- %9%
... |
####librerias utilizadas#####
library(ggplot2)
library(tidyverse)
library(readxl)
library(ggthemes)
theme_set(theme_minimal())
#####zona de trabajo#######
setwd("~/graficas macro")
#####datos#######
df <- read_xlsx("datos_ratio.xlsx")
view(df)
#####grafica#######
#----- version tidyverse
df_wider = df %>... | /Dinámica de deuda pública en economía cerrada/Grafica_ratio_deuda_PBI.R | no_license | lucassebaord29/Trabajo-Pr-ctico-1-MACROECONOM-A-GRUPO-2- | R | false | false | 863 | r | ####librerias utilizadas#####
library(ggplot2)
library(tidyverse)
library(readxl)
library(ggthemes)
theme_set(theme_minimal())
#####zona de trabajo#######
setwd("~/graficas macro")
#####datos#######
df <- read_xlsx("datos_ratio.xlsx")
view(df)
#####grafica#######
#----- version tidyverse
df_wider = df %>... |
library(flexdashboard) # Dashboard package
library(highcharter) # Interactive data visualizations
library(plotly) # Interactive data visualizations
library(ggplot2)
library(viridis) # Color gradients
library(tidyverse) # Metapackge
library(countrycode) # Converts country names/codes
library(rjson) # JSON reader
library... | /scripts/library.R | no_license | rugnepal/nepal_tourism_dashboard | R | false | false | 700 | r | library(flexdashboard) # Dashboard package
library(highcharter) # Interactive data visualizations
library(plotly) # Interactive data visualizations
library(ggplot2)
library(viridis) # Color gradients
library(tidyverse) # Metapackge
library(countrycode) # Converts country names/codes
library(rjson) # JSON reader
library... |
# ---
# title: "Intro to R"
# author: Gibran Hemani
# output:
# html_document:
# theme: united
# highlight: tango
# ---
# ## Basic calculations
# What is the probability of winning the lottery? Assume 49 balls, and 6 balls chosen without replacement. This is how many unique combinations there ar... | /worksheets_mac/intro_to_r.R | no_license | explodecomputer/EEPE_2016 | R | false | false | 11,106 | r | # ---
# title: "Intro to R"
# author: Gibran Hemani
# output:
# html_document:
# theme: united
# highlight: tango
# ---
# ## Basic calculations
# What is the probability of winning the lottery? Assume 49 balls, and 6 balls chosen without replacement. This is how many unique combinations there ar... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/UtilityFunctions.R
\name{zenith_angle}
\alias{zenith_angle}
\title{Zenith Angle}
\usage{
zenith_angle(doy, lat, lon, hour, offset = NA)
}
\arguments{
\item{doy}{\code{numeric} day of year (1-366). This can be obtained from standard date via \... | /man/zenith_angle.Rd | permissive | trenchproject/TrenchR | R | false | true | 1,361 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/UtilityFunctions.R
\name{zenith_angle}
\alias{zenith_angle}
\title{Zenith Angle}
\usage{
zenith_angle(doy, lat, lon, hour, offset = NA)
}
\arguments{
\item{doy}{\code{numeric} day of year (1-366). This can be obtained from standard date via \... |
### Name: stackpoly
### Title: Display the columns of a matrix or data frame as stacked
### polygons.
### Aliases: stackpoly
### Keywords: misc
### ** Examples
testx<-matrix(abs(rnorm(100)),nrow=10)
stackpoly(matrix(cumsum(testx),nrow=10),main="Test Stackpoly I",
xaxlab=c("One","Two","Three","Four","Five",
"S... | /icfp09/lib/plotrix/R-ex/stackpoly.R | no_license | Jacob33123/narorumo | R | false | false | 650 | r | ### Name: stackpoly
### Title: Display the columns of a matrix or data frame as stacked
### polygons.
### Aliases: stackpoly
### Keywords: misc
### ** Examples
testx<-matrix(abs(rnorm(100)),nrow=10)
stackpoly(matrix(cumsum(testx),nrow=10),main="Test Stackpoly I",
xaxlab=c("One","Two","Three","Four","Five",
"S... |
context("ROC Curve/AUC")
library(dplyr)
# HPC_CV takes too long
hpc_cv2 <- filter(hpc_cv, Resample %in% c("Fold06", "Fold07", "Fold08", "Fold09", "Fold10"))
# ------------------------------------------------------------------------------
roc_curv <- pROC::roc(two_class_example$truth,
two_class... | /tests/testthat/test-prob-roc.R | no_license | alexhallam/yardstick | R | false | false | 2,964 | r | context("ROC Curve/AUC")
library(dplyr)
# HPC_CV takes too long
hpc_cv2 <- filter(hpc_cv, Resample %in% c("Fold06", "Fold07", "Fold08", "Fold09", "Fold10"))
# ------------------------------------------------------------------------------
roc_curv <- pROC::roc(two_class_example$truth,
two_class... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{brcaMethylData1}
\alias{brcaMethylData1}
\title{A matrix with DNA methylation levels
from some CpGs on chromosome 1}
\format{
A matrix object
}
\usage{
data(brcaMethylData1)
}
\description{
This object contains me... | /man/brcaMethylData1.Rd | permissive | databio/COCOA | R | false | true | 986 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{brcaMethylData1}
\alias{brcaMethylData1}
\title{A matrix with DNA methylation levels
from some CpGs on chromosome 1}
\format{
A matrix object
}
\usage{
data(brcaMethylData1)
}
\description{
This object contains me... |
library(Frames2)
### Name: MLDW
### Title: Multinomial logistic estimator under dual frame approach with
### auxiliary information from the whole population
### Aliases: MLDW
### ** Examples
data(DatMA)
data(DatMB)
data(DatPopM)
IndSample <- c(DatMA$Id_Pop, DatMB$Id_Pop)
#Let calculate proportions of categories... | /data/genthat_extracted_code/Frames2/examples/MLDW.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 736 | r | library(Frames2)
### Name: MLDW
### Title: Multinomial logistic estimator under dual frame approach with
### auxiliary information from the whole population
### Aliases: MLDW
### ** Examples
data(DatMA)
data(DatMB)
data(DatPopM)
IndSample <- c(DatMA$Id_Pop, DatMB$Id_Pop)
#Let calculate proportions of categories... |
\name{ldtagr}
\alias{ldtagr}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
expand a list of variants by including those in a VCF with LD exceeding
some threshold
}
\description{
expand a list of variants by including those in a VCF with LD exceeding
some threshold
}
\usage{
ldtagr(snprng, tf, s... | /man/ldtagr.Rd | no_license | stankiewicz565/gwascat | R | false | false | 2,056 | rd | \name{ldtagr}
\alias{ldtagr}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
expand a list of variants by including those in a VCF with LD exceeding
some threshold
}
\description{
expand a list of variants by including those in a VCF with LD exceeding
some threshold
}
\usage{
ldtagr(snprng, tf, s... |
importModuleUI <- function(id) {
ns <- NS(id)
exampleDatasets <- c() ## Need to add final small example data here
if ("TENxPBMCData" %in% rownames(installed.packages())){
exampleDatasets <- c(exampleDatasets,
"PBMC 3K (10X)" = "pbmc3k",
"PBMC 4K (10X)" = "pbm... | /inst/shiny/ui_01_import.R | permissive | vidyaap/singleCellTK | R | false | false | 14,108 | r | importModuleUI <- function(id) {
ns <- NS(id)
exampleDatasets <- c() ## Need to add final small example data here
if ("TENxPBMCData" %in% rownames(installed.packages())){
exampleDatasets <- c(exampleDatasets,
"PBMC 3K (10X)" = "pbmc3k",
"PBMC 4K (10X)" = "pbm... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/korsoer-age-gender.R
\docType{data}
\name{korsoer_age_gender}
\alias{korsoer_age_gender}
\title{Cholera in Korsør by age and gender}
\format{A data frame with 7 rows and 3 variables:
\describe{
\item{\bold{age_grop}}{Character vector of the... | /man/korsoer_age_gender.Rd | no_license | matthew-phelps/CholeraDataDK | R | false | true | 1,154 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/korsoer-age-gender.R
\docType{data}
\name{korsoer_age_gender}
\alias{korsoer_age_gender}
\title{Cholera in Korsør by age and gender}
\format{A data frame with 7 rows and 3 variables:
\describe{
\item{\bold{age_grop}}{Character vector of the... |
source("ona_package.R") ## this is a copy paste of the onaR package source file
library(tidyverse)
library(splitstackshape)
library(shinydashboard)
library(DT)
library(shinyWidgets)
library(future)
## targets using the bens listing file
target <- readxl::read_excel("R5 bens lookup file_updated.xlsx")%>%
group_by(Me... | /global.R | no_license | faithmusili/SN_data_check | R | false | false | 2,313 | r | source("ona_package.R") ## this is a copy paste of the onaR package source file
library(tidyverse)
library(splitstackshape)
library(shinydashboard)
library(DT)
library(shinyWidgets)
library(future)
## targets using the bens listing file
target <- readxl::read_excel("R5 bens lookup file_updated.xlsx")%>%
group_by(Me... |
####################################################################
#' Plot Target's Distribution vs Another Variable
#'
#' Study the distribution of a target variable vs another variable. This
#' function is quite similar to the funModeling's corrplot function.
#'
#' @param data Dataframe
#' @param target Character... | /R/plot_distr.R | no_license | fxcebx/lares | R | false | false | 5,315 | r | ####################################################################
#' Plot Target's Distribution vs Another Variable
#'
#' Study the distribution of a target variable vs another variable. This
#' function is quite similar to the funModeling's corrplot function.
#'
#' @param data Dataframe
#' @param target Character... |
/Courseworks/Stat133_Statistical_Data_Computation/Lab/lab06/code/lab06-script-Dui-Lee.R | no_license | duilee/workspace | R | false | false | 5,864 | r | ||
# SJDM 20/06/2014
# A function to map the stock assessment boundaries for BET/YFT and SKJ
# The corners of all the subregions (as specified in mufdager) are listed below
# and the function call determines which ones are displayed
plot.map.region.boundaries = function(reg.keep, reg.highlight, linesize = c(2,6), cols = ... | /R4MFCL.src/R4MFCL/R/plot.map.region.boundaries.r | no_license | hoyles/r4mfcl_git | R | false | false | 4,621 | r | # SJDM 20/06/2014
# A function to map the stock assessment boundaries for BET/YFT and SKJ
# The corners of all the subregions (as specified in mufdager) are listed below
# and the function call determines which ones are displayed
plot.map.region.boundaries = function(reg.keep, reg.highlight, linesize = c(2,6), cols = ... |
brittle <- read.csv('http://datasets.connectmv.com/file/brittleness-index.csv')
summary(brittle)
bitmap(file='../images/brittleness-single.jpg', type="png256", res=300, height = 5, width = 9, pointsize=12)
plot(brittle$TK104, type="l", col="red")
dev.off()
bitmap(file='../images/brittleness-default.jpg', type="png2... | /r-tutorial/code/multiple-series-plot.R | no_license | kgdunn/matlab-R-tutorial | R | false | false | 1,704 | r | brittle <- read.csv('http://datasets.connectmv.com/file/brittleness-index.csv')
summary(brittle)
bitmap(file='../images/brittleness-single.jpg', type="png256", res=300, height = 5, width = 9, pointsize=12)
plot(brittle$TK104, type="l", col="red")
dev.off()
bitmap(file='../images/brittleness-default.jpg', type="png2... |
library(SI)
### Name: SI.SPM
### Title: Stochastic Point Method
### Aliases: SI.SPM
### Keywords: SPM
### ** Examples
## To integrate exp(x) from -1 to 1
set.seed(0)
h <- function(x){
exp(x)
}
N <- 100000
SPMresult <- SI.SPM(h,-1,1,exp(1),N)
I1 <- SPMresult[[1]]
VarI1 <- SPMresult[[2]]
| /data/genthat_extracted_code/SI/examples/SI.SPM.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 298 | r | library(SI)
### Name: SI.SPM
### Title: Stochastic Point Method
### Aliases: SI.SPM
### Keywords: SPM
### ** Examples
## To integrate exp(x) from -1 to 1
set.seed(0)
h <- function(x){
exp(x)
}
N <- 100000
SPMresult <- SI.SPM(h,-1,1,exp(1),N)
I1 <- SPMresult[[1]]
VarI1 <- SPMresult[[2]]
|
#' List of "control" mouse gene IDs
#'
#' A list of ensembl mouse gene IDs to serve as
#' an example control gene set.
#'
#' @format A character list with 7872 entries:
#' \describe{
#' \item{geneID}{ensembl gene ID}
#' }
#' @source Taliaferro Lab FMR1 localization
#' analysis. These genes are expessed in CAD
#... | /R/ctrl_genes.R | no_license | TaliaferroLab/FeatureReachR | R | false | false | 478 | r | #' List of "control" mouse gene IDs
#'
#' A list of ensembl mouse gene IDs to serve as
#' an example control gene set.
#'
#' @format A character list with 7872 entries:
#' \describe{
#' \item{geneID}{ensembl gene ID}
#' }
#' @source Taliaferro Lab FMR1 localization
#' analysis. These genes are expessed in CAD
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ncvxclustr.R
\docType{package}
\name{ncvxclustr}
\alias{ncvxclustr}
\alias{ncvxclustr-package}
\title{ncvxclustr: non-convex clustering}
\description{
algorithm to solve the clustering problem by non-convex penalization
}
\section{Functions}{... | /man/ncvxclustr.Rd | permissive | wenshuoliu/ncvxclustr | R | false | true | 325 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ncvxclustr.R
\docType{package}
\name{ncvxclustr}
\alias{ncvxclustr}
\alias{ncvxclustr-package}
\title{ncvxclustr: non-convex clustering}
\description{
algorithm to solve the clustering problem by non-convex penalization
}
\section{Functions}{... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Utils.R
\name{.splitIndex}
\alias{.splitIndex}
\title{Split a vector into groups}
\usage{
.splitIndex(index, nGroups, randomize = FALSE)
}
\arguments{
\item{index}{the vector of index values to be split into groups}
\item{nGroups}{number of ... | /man/dot-splitIndex.Rd | no_license | pmbrophy/mspReader | R | false | true | 591 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Utils.R
\name{.splitIndex}
\alias{.splitIndex}
\title{Split a vector into groups}
\usage{
.splitIndex(index, nGroups, randomize = FALSE)
}
\arguments{
\item{index}{the vector of index values to be split into groups}
\item{nGroups}{number of ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find.R
\name{\%find\%}
\alias{\%find\%}
\title{Magically grepl without NAs}
\usage{
x \%find\% y
}
\arguments{
\item{y}{}
}
\description{
Magically grepl without NAs
}
| /man/grapes-find-grapes.Rd | no_license | blueprint-ade/bputils | R | false | true | 246 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find.R
\name{\%find\%}
\alias{\%find\%}
\title{Magically grepl without NAs}
\usage{
x \%find\% y
}
\arguments{
\item{y}{}
}
\description{
Magically grepl without NAs
}
|
Ztlist.lme <- function(model) {
Z <- Matrix(extract.lmeDesign(model)$Z)
Zt <- t(Z)
getInds <- function(i) {
n <- model$dims$ngrps[i] * model$dims$qvec[i] ## number of elements in this block
# n <- diff(object@Gp)[i] ## number of elements in this block
nt <- model$dims$qvec[i]... | /misc/test_files/Ztlist.R | no_license | mwest80/lmeresampler | R | false | false | 1,868 | r | Ztlist.lme <- function(model) {
Z <- Matrix(extract.lmeDesign(model)$Z)
Zt <- t(Z)
getInds <- function(i) {
n <- model$dims$ngrps[i] * model$dims$qvec[i] ## number of elements in this block
# n <- diff(object@Gp)[i] ## number of elements in this block
nt <- model$dims$qvec[i]... |
loadData <- function() {
# download zip file containing data if it hasn't already been downloaded
zipUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
zipFile <- "exdata_data_household_power_consumption.zip"
if (!file.exists(zipFile)) {
download.file(zipUrl... | /Analise Exploratoria de Dados/Semana 1/ExData_Plotting1/loadData.R | no_license | vcoluci/Coursera | R | false | false | 1,242 | r | loadData <- function() {
# download zip file containing data if it hasn't already been downloaded
zipUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
zipFile <- "exdata_data_household_power_consumption.zip"
if (!file.exists(zipFile)) {
download.file(zipUrl... |
## Put comments here that give an overall description of what your
## functions do
## The following 2 functions calculate the inverse of a matrix, if needed,
## and then stores the inserve matrix.
## Write a short comment describing this function
## The below function creates a special "matrix" object
## that can ca... | /cachematrix.R | no_license | daviddewitt36/ProgrammingAssignment2 | R | false | false | 1,365 | r | ## Put comments here that give an overall description of what your
## functions do
## The following 2 functions calculate the inverse of a matrix, if needed,
## and then stores the inserve matrix.
## Write a short comment describing this function
## The below function creates a special "matrix" object
## that can ca... |
library(caret)
1.
library(ElemStatLearn)
data(vowel.train)
data(vowel.test)
#Set the variable y to be a factor variable in both the training and test set.
#Then set the seed to 33833. Fit (1) a random forest predictor relating the factor
#variable y to the remaining variables and (2) a boosted predictor using the ... | /Q3.R | no_license | bzhtapp/LiftingWeights | R | false | false | 4,333 | r | library(caret)
1.
library(ElemStatLearn)
data(vowel.train)
data(vowel.test)
#Set the variable y to be a factor variable in both the training and test set.
#Then set the seed to 33833. Fit (1) a random forest predictor relating the factor
#variable y to the remaining variables and (2) a boosted predictor using the ... |
library(MASS)
library(ggplot2)
library(gridExtra)
library(cowplot)
gamma=.9
gp.th=.1
gp.r=100
gp.sigma=1e-5
testpar = c(sigma2=.02,q=0.1,A=1.5,c0=0.1,b=1)
gen <- function(par,n){
spikes = runif(n) < par['q']
G = outer(1:n,1:n,function(x,y) gamma^(x-y))
G[upper.tri(G)]=0
gp.C = outer(1:n,1:n,functio... | /R/sampler_gp.R | no_license | giovannidiana/pnevmatikakis2013 | R | false | false | 5,576 | r | library(MASS)
library(ggplot2)
library(gridExtra)
library(cowplot)
gamma=.9
gp.th=.1
gp.r=100
gp.sigma=1e-5
testpar = c(sigma2=.02,q=0.1,A=1.5,c0=0.1,b=1)
gen <- function(par,n){
spikes = runif(n) < par['q']
G = outer(1:n,1:n,function(x,y) gamma^(x-y))
G[upper.tri(G)]=0
gp.C = outer(1:n,1:n,functio... |
#--- Load input files
Social_Signals <- read.csv(file="/home/mono/Documents/Assortment/Top 25/Data/Inputs/Social_Signals.csv")
load(file="/home/mono/Documents/Assortment/Top 25/Data/ProcessedData/1_All_Review_Processed.RData")
#--- Prepare data
for(i in c(1:ncol(Social_Signals))){
Social_Signals[,i] <- as.numeric(... | /SA/2. Anu_R_Scripts/Backup/4_Calculate_Social_Signals.R | no_license | haoybl/Data-Analysis | R | false | false | 1,211 | r |
#--- Load input files
Social_Signals <- read.csv(file="/home/mono/Documents/Assortment/Top 25/Data/Inputs/Social_Signals.csv")
load(file="/home/mono/Documents/Assortment/Top 25/Data/ProcessedData/1_All_Review_Processed.RData")
#--- Prepare data
for(i in c(1:ncol(Social_Signals))){
Social_Signals[,i] <- as.numeric(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/STAR.R
\name{STAR.align.folder}
\alias{STAR.align.folder}
\title{Align all libraries in folder with STAR}
\usage{
STAR.align.folder(
input.dir,
output.dir,
index.dir,
star.path = STAR.install(),
fastp = install.fastp(),
paired.end... | /man/STAR.align.folder.Rd | permissive | Roleren/ORFik | R | false | true | 11,017 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/STAR.R
\name{STAR.align.folder}
\alias{STAR.align.folder}
\title{Align all libraries in folder with STAR}
\usage{
STAR.align.folder(
input.dir,
output.dir,
index.dir,
star.path = STAR.install(),
fastp = install.fastp(),
paired.end... |
dataset <- read.table("D:/Machine Learning/Assignment_4/dataset.txt",sep=",",stringsAsFactors = FALSE,header=FALSE)
names(dataset) <- c("DGN","PRE4", "PRE5", "PRE6", "PRE7", "PRE8", "PRE9", "PRE10", "PRE11","PRE14", "PRE17", "PRE19", "PRE25", "PRE30", "PRE32", "AGE", "Risk1Y")
cols <- sapply(dataset, is.logical)
dat... | /Assignments/Classifiers/BaggingAssignment4.R | no_license | rakeshBalasubramani/Machine-Learning | R | false | false | 1,788 | r | dataset <- read.table("D:/Machine Learning/Assignment_4/dataset.txt",sep=",",stringsAsFactors = FALSE,header=FALSE)
names(dataset) <- c("DGN","PRE4", "PRE5", "PRE6", "PRE7", "PRE8", "PRE9", "PRE10", "PRE11","PRE14", "PRE17", "PRE19", "PRE25", "PRE30", "PRE32", "AGE", "Risk1Y")
cols <- sapply(dataset, is.logical)
dat... |
#' findBranches
#' Finds the branch numbers that descend from a given node of a tree.
#' @param tree An object of class phylo
#' @param node The node the descendent branches of which are of interest
#' @param tail Include the branch leading to the node of interest, or not?
#' @name findBranches
#' @export
findBranches... | /R/findBranches.R | no_license | hferg/hfgr | R | false | false | 870 | r | #' findBranches
#' Finds the branch numbers that descend from a given node of a tree.
#' @param tree An object of class phylo
#' @param node The node the descendent branches of which are of interest
#' @param tail Include the branch leading to the node of interest, or not?
#' @name findBranches
#' @export
findBranches... |
#'Fully work up a complete data set of integrating sphere data
#'
#'A fully-featured function that accepts a series of folders to automatically work up.
#'Pass in the FOLDER location of your baseline (no plant) reflectance, plant reflectance
#'and plant transmittance.
#' @name int_baseline_all
#' @param Averaging a var... | /R/int_baseline_all.R | permissive | poales/integratingSphere | R | false | false | 3,051 | r | #'Fully work up a complete data set of integrating sphere data
#'
#'A fully-featured function that accepts a series of folders to automatically work up.
#'Pass in the FOLDER location of your baseline (no plant) reflectance, plant reflectance
#'and plant transmittance.
#' @name int_baseline_all
#' @param Averaging a var... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/cdf_check.R
\name{check_processed_cdf}
\alias{check_processed_cdf}
\title{check_processed_cdf}
\usage{
check_processed_cdf(processed_cdf)
}
\arguments{
\item{processed_cdf}{output of mapvizieR.default}
}
\value{
a named list. \code{$... | /man/check_processed_cdf.Rd | no_license | rabare/mapvizieR | R | false | false | 618 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/cdf_check.R
\name{check_processed_cdf}
\alias{check_processed_cdf}
\title{check_processed_cdf}
\usage{
check_processed_cdf(processed_cdf)
}
\arguments{
\item{processed_cdf}{output of mapvizieR.default}
}
\value{
a named list. \code{$... |
\name{HPOTerms-class}
\docType{class}
\alias{class:HPOTerms}
\alias{HPOTerms-class}
\alias{HPOTerms}
\alias{initialize,HPOTerms-method}
\alias{HPOID}
\alias{HPOID,HPOTerms-method}
\alias{HPOID,HPOTermsAnnDbBimap-method}
\alias{HPOID,character-method}
\alias{Term}
\alias{Term,HPOTerms-method}
\alias{... | /man/HPOTerms-class.Rd | no_license | cran/HPO.db | R | false | false | 2,894 | rd | \name{HPOTerms-class}
\docType{class}
\alias{class:HPOTerms}
\alias{HPOTerms-class}
\alias{HPOTerms}
\alias{initialize,HPOTerms-method}
\alias{HPOID}
\alias{HPOID,HPOTerms-method}
\alias{HPOID,HPOTermsAnnDbBimap-method}
\alias{HPOID,character-method}
\alias{Term}
\alias{Term,HPOTerms-method}
\alias{... |
\name{naivedata}
\docType{data}
\alias{naivedata}
\title{Data generated by Monte Carlo}
\description{
Data generated by Monte Carlo, the first column is the response variable, the second column is the design matrix, and the rest are the instrumental variables
}
\usage{data(naivedata)}
\keyword{datasets}
| /man/naivedata.Rd | no_license | wangsanshui/naivereg | R | false | false | 318 | rd | \name{naivedata}
\docType{data}
\alias{naivedata}
\title{Data generated by Monte Carlo}
\description{
Data generated by Monte Carlo, the first column is the response variable, the second column is the design matrix, and the rest are the instrumental variables
}
\usage{data(naivedata)}
\keyword{datasets}
|
############################################
###### DFL decomposition function #########
############################################
## Version 2.0, 26. Juni 2019
## Note:
## Group 1 is the reference group. Its wage structure
# is used for the counterfactuals.
# In order to sequentially decompose the composition ... | /functions/r-DFL-deco-2-0.R | no_license | davidgallusser/Extended_DL_deco | R | false | false | 39,438 | r | ############################################
###### DFL decomposition function #########
############################################
## Version 2.0, 26. Juni 2019
## Note:
## Group 1 is the reference group. Its wage structure
# is used for the counterfactuals.
# In order to sequentially decompose the composition ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/base_samplesplits.R
\name{qgcomp.partials}
\alias{qgcomp.partials}
\title{Partial effect sizes, confidence intervals, hypothesis tests}
\usage{
qgcomp.partials(
fun = c("qgcomp.noboot", "qgcomp.cox.noboot", "qgcomp.zi.noboot"),
traindata ... | /man/qgcomp.partials.Rd | no_license | idblr/qgcomp | R | false | true | 6,812 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/base_samplesplits.R
\name{qgcomp.partials}
\alias{qgcomp.partials}
\title{Partial effect sizes, confidence intervals, hypothesis tests}
\usage{
qgcomp.partials(
fun = c("qgcomp.noboot", "qgcomp.cox.noboot", "qgcomp.zi.noboot"),
traindata ... |
\name{gintac}
\alias{gintac}
\title{ Initial values of theta, A and c_i,...,c_n }
\description{
See Marazzi A. (1993), p.292}
\usage{
gintac(x, y, ni, oi = 0, icase = .dFvGet()$ics, maxtt = .dFvGet()$mxt,
maxta = .dFvGet()$mxf, tolt = .dFvGet()$tlo, tola = .dFvGet()$tlo,
b = 1.1 * sqrt(np), c =... | /man/gintac.Rd | no_license | cran/robeth | R | false | false | 891 | rd | \name{gintac}
\alias{gintac}
\title{ Initial values of theta, A and c_i,...,c_n }
\description{
See Marazzi A. (1993), p.292}
\usage{
gintac(x, y, ni, oi = 0, icase = .dFvGet()$ics, maxtt = .dFvGet()$mxt,
maxta = .dFvGet()$mxf, tolt = .dFvGet()$tlo, tola = .dFvGet()$tlo,
b = 1.1 * sqrt(np), c =... |
## Title: Grass endophyte population model with a bayesian framework
## Purpose: Fits all vital rate models, written in STAN
## and does visualisation of posterior predictive checks
## Authors: Joshua and Tom
#############################################################
library(tidyverse)
library(rstan)
library(StanHe... | /endodemog_all_vr.R | no_license | joshuacfowler/Endodemog_2019 | R | false | false | 15,740 | r | ## Title: Grass endophyte population model with a bayesian framework
## Purpose: Fits all vital rate models, written in STAN
## and does visualisation of posterior predictive checks
## Authors: Joshua and Tom
#############################################################
library(tidyverse)
library(rstan)
library(StanHe... |
library(stringr)
data_month<-vector("list",length(fileName))
for(k in 1:length(fileName)){
for(j in 1:10){
s<-0
for(i in 1:3469){
if(as.numeric(substr(dataList[[k]][2][[1]][2][[1]][i],1,4))==(2006+j)){
if(substr(dataList[[k]][2][[1]][2][[1]][i],6,7)=="12") {
s<-s+as.numeric(dataList[[... | /R/按月整理12月.R | permissive | booml247/ARRB | R | false | false | 522 | r | library(stringr)
data_month<-vector("list",length(fileName))
for(k in 1:length(fileName)){
for(j in 1:10){
s<-0
for(i in 1:3469){
if(as.numeric(substr(dataList[[k]][2][[1]][2][[1]][i],1,4))==(2006+j)){
if(substr(dataList[[k]][2][[1]][2][[1]][i],6,7)=="12") {
s<-s+as.numeric(dataList[[... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.r
\docType{data}
\name{sbp}
\alias{sbp}
\title{Systolic blood pressure (SBP) data}
\format{A data frame with 10 rows and 2 variables}
\usage{
data(sbp)
}
\description{
Riley et al. (2011) analyzed a hypothetical meta-analysis.... | /man/sbp.Rd | no_license | cran/pimeta | R | false | true | 875 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.r
\docType{data}
\name{sbp}
\alias{sbp}
\title{Systolic blood pressure (SBP) data}
\format{A data frame with 10 rows and 2 variables}
\usage{
data(sbp)
}
\description{
Riley et al. (2011) analyzed a hypothetical meta-analysis.... |
library(titanic) # loads titanic_train data frame
library(caret)
library(tidyverse)
library(rpart)
# 3 significant digits
options(digits = 3)
# clean the data - `titanic_train` is loaded with the titanic package
titanic_clean <- titanic_train %>%
mutate(Survived = factor(Survived),
Embarked = factor(Emb... | /machine_learning/titanic.R | no_license | azbenoit/EDX | R | false | false | 4,777 | r | library(titanic) # loads titanic_train data frame
library(caret)
library(tidyverse)
library(rpart)
# 3 significant digits
options(digits = 3)
# clean the data - `titanic_train` is loaded with the titanic package
titanic_clean <- titanic_train %>%
mutate(Survived = factor(Survived),
Embarked = factor(Emb... |
library(tidyverse)
## Merge
immigration <- read_csv("ImmigrationData.csv")
region <- read_csv("RegionData.csv")
merged <- immigration %>% left_join(region, by = c("CountryCode" = "countrycode"))
# the number of rows should be the same before and after the merge
nrow(merged) == nrow(immigration) # TRUE
# the follo... | /week4_ex/week4_ex.r | no_license | alexkcode/pa-434 | R | false | false | 2,607 | r |
library(tidyverse)
## Merge
immigration <- read_csv("ImmigrationData.csv")
region <- read_csv("RegionData.csv")
merged <- immigration %>% left_join(region, by = c("CountryCode" = "countrycode"))
# the number of rows should be the same before and after the merge
nrow(merged) == nrow(immigration) # TRUE
# the follo... |
#' Perform a rank-based single sample gene set analysis.
#'
#' This function performs a rank-based single sample gene set analysis for
#' a set of samples (\code{data}) and a list of gene sets (\code{geneset_list}).
#'
#' @param data Either a set of samples in \code{data.frame} format
#' or a sample in a na... | /R/ssgsrt.gene_set_rank_test.R | no_license | dolchan/ssgsrt | R | false | false | 1,677 | r | #' Perform a rank-based single sample gene set analysis.
#'
#' This function performs a rank-based single sample gene set analysis for
#' a set of samples (\code{data}) and a list of gene sets (\code{geneset_list}).
#'
#' @param data Either a set of samples in \code{data.frame} format
#' or a sample in a na... |
run_analysis <- function(){
fileNameY_test = "UCI HAR Dataset\\test\\y_test.txt"
fileNameX_test = "UCI HAR Dataset\\test\\X_test.txt"
fileNameSubjecttest = "UCI HAR Dataset\\test\\subject_test.txt"
fileNameX_train = "UCI HAR Dataset\\train\\X_train.txt"
fileNameY_train = "UCI HAR Dataset\\train\\y_train.txt"
... | /run_analysis.R | no_license | antoniogiuzio/course-project | R | false | false | 3,846 | r | run_analysis <- function(){
fileNameY_test = "UCI HAR Dataset\\test\\y_test.txt"
fileNameX_test = "UCI HAR Dataset\\test\\X_test.txt"
fileNameSubjecttest = "UCI HAR Dataset\\test\\subject_test.txt"
fileNameX_train = "UCI HAR Dataset\\train\\X_train.txt"
fileNameY_train = "UCI HAR Dataset\\train\\y_train.txt"
... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 1438
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 1438
c
c Input Parameter (command line, file):
c input filename QBFLIB/Biere/tipdiam/nusmv.dme1-16.B-d3.qdimacs
c output filena... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Biere/tipdiam/nusmv.dme1-16.B-d3/nusmv.dme1-16.B-d3.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 622 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 1438
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 1438
c
c Input Parameter (command line, file):
c input filename QBFLIB/Biere/tipdiam/nusmv.dme1-16.B-d3.qdimacs
c output filena... |
gen.data<-function(n,beta,sigma,p)
{
y<-rbinom(n,size=1,prob=0.5)
y<-sort(y)
n1<-sum(y==0)
n2<-n-n1
y[y==0]<-(-n/n1)
y[y==1]<-n/n2
y1<-y[1:n1]
y2<-y[(n1+1):n]
mu1<-rep(0,p)
mu2<-sigma%*%beta
x1<-mvrnorm(n1,mu1,sigma1)
x2<-mvrnorm(n2,mu2,sigma)
x.sub<-rbind(x1,x2)
return(list(y=y,y1=y1,y2=y2... | /gen.data.r | no_license | shuanggema/NetII-SLDA | R | false | false | 348 | r | gen.data<-function(n,beta,sigma,p)
{
y<-rbinom(n,size=1,prob=0.5)
y<-sort(y)
n1<-sum(y==0)
n2<-n-n1
y[y==0]<-(-n/n1)
y[y==1]<-n/n2
y1<-y[1:n1]
y2<-y[(n1+1):n]
mu1<-rep(0,p)
mu2<-sigma%*%beta
x1<-mvrnorm(n1,mu1,sigma1)
x2<-mvrnorm(n2,mu2,sigma)
x.sub<-rbind(x1,x2)
return(list(y=y,y1=y1,y2=y2... |
library(shiny)
ui <- fluidPage(
titlePanel("DaTa Table"),
sidebarLayout(
sidebarPanel(
),
mainPanel(
DT::dataTableOutput("iris")
)
)
)
server <- shinyServer(function(input,output){
output$iris <- DT::renderDataTable(
iris,
# this line of code for 'copy','pdf','csv','... | /Datatable.R | no_license | kuldeepjha/R | R | false | false | 484 | r | library(shiny)
ui <- fluidPage(
titlePanel("DaTa Table"),
sidebarLayout(
sidebarPanel(
),
mainPanel(
DT::dataTableOutput("iris")
)
)
)
server <- shinyServer(function(input,output){
output$iris <- DT::renderDataTable(
iris,
# this line of code for 'copy','pdf','csv','... |
#load the necessary packages
source('/home/cris/mrcrstnherediagmez@gmail.com/Countwords/authenticate.R')
Meru_tweets=searchTwitter("MeruCabs",n=2000,lan="en")
Ola_tweets=searchTwitter("OlaCabs",n=2000,lan="en")
TaxiForSure_tweets=searchTwitter("TaxiForSure",n=2000,lan="en")
Uber_tweets=searchTwitter("Uber_Delhi",n=200... | /cabsSentimentAnalysis.R | no_license | CristinaHG/Social-media-mining | R | false | false | 4,716 | r | #load the necessary packages
source('/home/cris/mrcrstnherediagmez@gmail.com/Countwords/authenticate.R')
Meru_tweets=searchTwitter("MeruCabs",n=2000,lan="en")
Ola_tweets=searchTwitter("OlaCabs",n=2000,lan="en")
TaxiForSure_tweets=searchTwitter("TaxiForSure",n=2000,lan="en")
Uber_tweets=searchTwitter("Uber_Delhi",n=200... |
library("DT")
library("shinyBS")
library("leaflet")
library("shinyjs")
library("highcharter")
appCSS <- "
.leaflet-top { z-index: 999;}
#loading-content {
position: absolute;
background: #FFFFFF;
opacity: 0.9;
z-index: 100;
left: 0;
right: 0;
height: 100%;
text-align: center;
color: #000000;
}
"
# load.fontawesome()
#... | /oilwine/ui.R | no_license | jan2nov/oxrep | R | false | false | 1,900 | r | library("DT")
library("shinyBS")
library("leaflet")
library("shinyjs")
library("highcharter")
appCSS <- "
.leaflet-top { z-index: 999;}
#loading-content {
position: absolute;
background: #FFFFFF;
opacity: 0.9;
z-index: 100;
left: 0;
right: 0;
height: 100%;
text-align: center;
color: #000000;
}
"
# load.fontawesome()
#... |
\name{plot.NMixPredCondDensJoint2}
\alias{plot.NMixPredCondDensJoint2}
\title{
Plot computed predictive pairwise bivariate conditional densities
}
\description{
This is a basic plotting tool to visualize computed
predictive pairwise bivariate conditional densities using the
\code{\link[graphics]{image}} or \co... | /man/plot.NMixPredCondDensJoint2.Rd | no_license | cran/mixAK | R | false | false | 2,073 | rd | \name{plot.NMixPredCondDensJoint2}
\alias{plot.NMixPredCondDensJoint2}
\title{
Plot computed predictive pairwise bivariate conditional densities
}
\description{
This is a basic plotting tool to visualize computed
predictive pairwise bivariate conditional densities using the
\code{\link[graphics]{image}} or \co... |
# Functions related to running Cox proportional hazards lasso/elastic net regression
# By Daniel Golden (dgolden1 at stanford dot edu) June 2013
# $Id: cox_lasso_fcn.R 347 2013-07-17 00:05:49Z dgolden $
## Setup
library(glmnet)
library(survival)
library(cvTools)
## FUNCTION: Fake some input data
make_fake_data = fu... | /image_features/cox_lasso_r/cox_lasso_fcn.R | permissive | dgolden1/qil-parp | R | false | false | 6,734 | r | # Functions related to running Cox proportional hazards lasso/elastic net regression
# By Daniel Golden (dgolden1 at stanford dot edu) June 2013
# $Id: cox_lasso_fcn.R 347 2013-07-17 00:05:49Z dgolden $
## Setup
library(glmnet)
library(survival)
library(cvTools)
## FUNCTION: Fake some input data
make_fake_data = fu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plugins.R
\name{dyRibbon}
\alias{dyRibbon}
\title{dyRibbon plugin adds a horizontal band of colors that runs through the chart. It
can be useful to visualize categorical variables
(http://en.wikipedia.org/wiki/Categorical_variable) that chang... | /man/dyRibbon.Rd | no_license | tr8dr/dygraphs | R | false | true | 1,596 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plugins.R
\name{dyRibbon}
\alias{dyRibbon}
\title{dyRibbon plugin adds a horizontal band of colors that runs through the chart. It
can be useful to visualize categorical variables
(http://en.wikipedia.org/wiki/Categorical_variable) that chang... |
jz_data<-function (x) {
siteiv<-x
lv <- melt(siteiv, id.vars = c(colnames(siteiv)))
names(lv)[1:3] <- c("site", "sp", "iv")
lo <- na.omit(lv)
lo <- arrange(lo, site, -iv)
d <- tapply(lo$sp, lo$site, function(x) rep(1:length(x)))
lo$xh = as.vector(unlist(d[1:max(lo$site)]))
lo
} | /R/jz_data.R | no_license | ZhuLeZi/leplant | R | false | false | 296 | r | jz_data<-function (x) {
siteiv<-x
lv <- melt(siteiv, id.vars = c(colnames(siteiv)))
names(lv)[1:3] <- c("site", "sp", "iv")
lo <- na.omit(lv)
lo <- arrange(lo, site, -iv)
d <- tapply(lo$sp, lo$site, function(x) rep(1:length(x)))
lo$xh = as.vector(unlist(d[1:max(lo$site)]))
lo
} |
#' Get record details from Chemical Translation Service (CTS)
#'
#' Get record details from CTS, see \url{http://cts.fiehnlab.ucdavis.edu}
#' @import RCurl jsonlite
#' @param inchikey character; InChIkey.
#' @param verbose logical; should a verbose output be printed on the console?
#' @param ... currently not used.
#' ... | /R/cts.R | permissive | cdr6934/webchem | R | false | false | 3,746 | r | #' Get record details from Chemical Translation Service (CTS)
#'
#' Get record details from CTS, see \url{http://cts.fiehnlab.ucdavis.edu}
#' @import RCurl jsonlite
#' @param inchikey character; InChIkey.
#' @param verbose logical; should a verbose output be printed on the console?
#' @param ... currently not used.
#' ... |
testlist <- list(kern = 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), val = c(9.34347294018751e-275, 5.91668024075023e-257, -2.68778430925514e+261, 4.94... | /lowpassFilter/inst/testfiles/convolve/AFL_convolve/convolve_valgrind_files/1616007282-test.R | no_license | akhikolla/updatedatatype-list1 | R | false | false | 797 | r | testlist <- list(kern = 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), val = c(9.34347294018751e-275, 5.91668024075023e-257, -2.68778430925514e+261, 4.94... |
library(readxl)
library(dplyr)
# setwd("C:/Users/pavi/Desktop/UNO/IntroDataScience/Project/Data/testdat")
# data frame with columns that arent there in 2008-2014 dataset
add_cols = data.frame('JOB_INFO_WORK_POSTAL_CODE'=NA, 'EMPLOYER_NUM_EMPLOYEES'=NA, 'EMPLOYER_YR_ESTAB'=NA, 'EMPLOYER_PHONE'=NA, 'AGENT_FIRM_NAME'=NA... | /perm_fileread_clean.R | permissive | bdetweiler/stat-8416-final-project | R | false | false | 14,110 | r | library(readxl)
library(dplyr)
# setwd("C:/Users/pavi/Desktop/UNO/IntroDataScience/Project/Data/testdat")
# data frame with columns that arent there in 2008-2014 dataset
add_cols = data.frame('JOB_INFO_WORK_POSTAL_CODE'=NA, 'EMPLOYER_NUM_EMPLOYEES'=NA, 'EMPLOYER_YR_ESTAB'=NA, 'EMPLOYER_PHONE'=NA, 'AGENT_FIRM_NAME'=NA... |
#***********************************************************************************************
# TITLE: AFL match score progression (2001-2019)
#
# DESCRIPTION: Transformation of raw score progression data into useable formats for AFL matches (2008-)
#
# AUTHOR: InsightLane
#
# CREATED: Original 2016
# MODIFIED: L... | /score_progression_worm.R | no_license | insightlane/score-progression | R | false | false | 26,278 | r | #***********************************************************************************************
# TITLE: AFL match score progression (2001-2019)
#
# DESCRIPTION: Transformation of raw score progression data into useable formats for AFL matches (2008-)
#
# AUTHOR: InsightLane
#
# CREATED: Original 2016
# MODIFIED: L... |
# convert
# Setup dataframe columns for new variables
exon.lengths=NULL
exon.starts=NULL
meta.exons$exons.start=rep(NA)
meta.exons$No.exons=rep(NA)
meta.exons$exon.lengths=rep(NA)
gene.id=NULL
for(i in 1:nrow(meta.exons)){
# If it's the first entry, record the gene.id
if(i ==1){gene.id=meta.exons$V10[i]}
if(meta... | /gtf2bed.R | no_license | GlastonburyC/gtf_to_BED12 | R | false | false | 2,082 | r |
# convert
# Setup dataframe columns for new variables
exon.lengths=NULL
exon.starts=NULL
meta.exons$exons.start=rep(NA)
meta.exons$No.exons=rep(NA)
meta.exons$exon.lengths=rep(NA)
gene.id=NULL
for(i in 1:nrow(meta.exons)){
# If it's the first entry, record the gene.id
if(i ==1){gene.id=meta.exons$V10[i]}
if(meta... |
#PACE
MergeCompleteData <- MergeCompleteData %>% mutate(Pace = as.integer(0.45*Acceleration + 0.55*Speed))
#Shooting
MergeCompleteData <- MergeCompleteData %>% mutate(Shooting = as.integer(0.05*Attacking_Position + 0.45*Finishing +0.20*Shot_Power +0.20*Long_Shots + 0.05*Volleys + 0.05*Penalties))
MergeCompleteData <... | /loaddata/manipData.R | no_license | quace/BusinessIntelligence | R | false | false | 1,080 | r | #PACE
MergeCompleteData <- MergeCompleteData %>% mutate(Pace = as.integer(0.45*Acceleration + 0.55*Speed))
#Shooting
MergeCompleteData <- MergeCompleteData %>% mutate(Shooting = as.integer(0.05*Attacking_Position + 0.45*Finishing +0.20*Shot_Power +0.20*Long_Shots + 0.05*Volleys + 0.05*Penalties))
MergeCompleteData <... |
library(leaflet)
library(RColorBrewer)
library(DT)
ui <- bootstrapPage(
tags$style(type = "text/css", "html, body {width:100%;height:100%}"),
leafletOutput("map", width = "100%", height = "100%"),
absolutePanel(top = 10, right = 10,
sliderInput("range", "Magnitudes", min(malaysia$AMOUNT_TOTAL), ma... | /shiny.R | no_license | franciscorichter/Borneo | R | false | false | 2,782 | r | library(leaflet)
library(RColorBrewer)
library(DT)
ui <- bootstrapPage(
tags$style(type = "text/css", "html, body {width:100%;height:100%}"),
leafletOutput("map", width = "100%", height = "100%"),
absolutePanel(top = 10, right = 10,
sliderInput("range", "Magnitudes", min(malaysia$AMOUNT_TOTAL), ma... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/marble_plot.R
\name{marble_plot}
\alias{marble_plot}
\title{marble_plot}
\usage{
marble_plot(df, alpha_level = 0.4)
}
\arguments{
\item{df}{A dataframe resulting from calling the marble_game funciton}
\item{alpha_level}{A number between 0 an... | /man/marble_plot.Rd | no_license | alspur/marblr | R | false | true | 490 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/marble_plot.R
\name{marble_plot}
\alias{marble_plot}
\title{marble_plot}
\usage{
marble_plot(df, alpha_level = 0.4)
}
\arguments{
\item{df}{A dataframe resulting from calling the marble_game funciton}
\item{alpha_level}{A number between 0 an... |
# Used in BASiCS_VarianceDecomp
HiddenVarDecomp <- function(Chain)
{
if (!is(Chain, "BASiCS_Chain"))
stop("'Chain' is not a BASiCS_Chain class object.")
N <- nrow(Chain@parameters$delta)
q.bio <- ncol(Chain@parameters$delta)
UniqueBatch <- colnames(Chain@parameters$theta)
nBatch <- length(UniqueBat... | /R/HiddenVarDecomp.R | no_license | Shians/BASiCS | R | false | false | 2,259 | r | # Used in BASiCS_VarianceDecomp
HiddenVarDecomp <- function(Chain)
{
if (!is(Chain, "BASiCS_Chain"))
stop("'Chain' is not a BASiCS_Chain class object.")
N <- nrow(Chain@parameters$delta)
q.bio <- ncol(Chain@parameters$delta)
UniqueBatch <- colnames(Chain@parameters$theta)
nBatch <- length(UniqueBat... |
#create vector objects.
state <- c("Rajasthan","Bihar","Hariyana","Gujrat")
city <- c("raila","Bhilwara","raipur","mandal")
zipcode <- c(33602,98104,06161,80294)
addresses <- cbind(city,State,zipcode)
cat("# # # # The data frame ")
print(addresses)
new.address <- data.frame(
city = c("Lowry", "C... | /Data_frames_2.r | no_license | chandraprakashh/R_python | R | false | false | 532 | r | #create vector objects.
state <- c("Rajasthan","Bihar","Hariyana","Gujrat")
city <- c("raila","Bhilwara","raipur","mandal")
zipcode <- c(33602,98104,06161,80294)
addresses <- cbind(city,State,zipcode)
cat("# # # # The data frame ")
print(addresses)
new.address <- data.frame(
city = c("Lowry", "C... |
#' Plot brain parcellations
#'
#' \code{ggseg} plots and returns a ggplot object of plotted
#' aparc areas.
#' @author Athanasia Mowinckel and Didac Pineiro
#'
#' @param .data A .data.frame to use for plot aesthetics. Should include a
#' column called "area" corresponding to aparc areas.
#'
#' @param atlas Either a str... | /R/ggseg.R | permissive | richardbeare/ggseg | R | false | false | 3,979 | r | #' Plot brain parcellations
#'
#' \code{ggseg} plots and returns a ggplot object of plotted
#' aparc areas.
#' @author Athanasia Mowinckel and Didac Pineiro
#'
#' @param .data A .data.frame to use for plot aesthetics. Should include a
#' column called "area" corresponding to aparc areas.
#'
#' @param atlas Either a str... |
library(annotatr)
namespace <- function() "contractr"
argument_type_handler <- create_handler("argument-type",
match_datatype,
insert_argument_type_contract,
"once",
... | /R/contractr.R | no_license | aviralg/contractr | R | false | false | 933 | r | library(annotatr)
namespace <- function() "contractr"
argument_type_handler <- create_handler("argument-type",
match_datatype,
insert_argument_type_contract,
"once",
... |
source(file = "Maps/RPSEGPLANCidades.R")
source(file = "Maps/MicrorregiãoCidades.R")
ArrangeCidadesMicroRPSEGPLAN <- ggarrange(MicrorregiaoCidades, RPSEGPLANcidades, align = "h") | /Arranges/Cidades da Microrregião e RPSEGPLAN.R | no_license | supervedovatto/AnexoA | R | false | false | 180 | r | source(file = "Maps/RPSEGPLANCidades.R")
source(file = "Maps/MicrorregiãoCidades.R")
ArrangeCidadesMicroRPSEGPLAN <- ggarrange(MicrorregiaoCidades, RPSEGPLANcidades, align = "h") |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cv.glmSparseNet.R
\docType{methods}
\name{cv.glmSparseNet.mclapply,SummarizedExperiment-method}
\alias{cv.glmSparseNet.mclapply,SummarizedExperiment-method}
\title{Calculate GLM model with network-based regularization}
\usage{
\S4method{cv.gl... | /man/cv.glmSparseNet.mclapply-SummarizedExperiment-method.Rd | no_license | averissimo/glmSparseNetPaper | R | false | true | 510 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cv.glmSparseNet.R
\docType{methods}
\name{cv.glmSparseNet.mclapply,SummarizedExperiment-method}
\alias{cv.glmSparseNet.mclapply,SummarizedExperiment-method}
\title{Calculate GLM model with network-based regularization}
\usage{
\S4method{cv.gl... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dpca.filters.R
\name{dpca.filters}
\alias{dpca.filters}
\title{Compute DPCA filter coefficients}
\usage{
dpca.filters(F, Ndpc = dim(F$operators)[1], q = 30)
}
\arguments{
\item{F}{\eqn{(d\times d)} spectral density matrix, provided as an obje... | /man/dpca.filters.Rd | no_license | kidzik/freqdom | R | false | true | 2,602 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dpca.filters.R
\name{dpca.filters}
\alias{dpca.filters}
\title{Compute DPCA filter coefficients}
\usage{
dpca.filters(F, Ndpc = dim(F$operators)[1], q = 30)
}
\arguments{
\item{F}{\eqn{(d\times d)} spectral density matrix, provided as an obje... |
#
# Whole origin data set download from below link:
# https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip
#
#
#Libraries used
library(tidyr)
library(dplyr)
library(stringr)
#Functions and constants
#For adding activity name into y_train and y_test data frames
gen_col_by_cell<-functi... | /run_analysis.R | no_license | chrisyxsh/Human-Activity-Recognition | R | false | false | 9,700 | r | #
# Whole origin data set download from below link:
# https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip
#
#
#Libraries used
library(tidyr)
library(dplyr)
library(stringr)
#Functions and constants
#For adding activity name into y_train and y_test data frames
gen_col_by_cell<-functi... |
## some utility functions used internally within the ALA4R library: not
## exported
##-----------------------------------------------------------------------------
empty <- function(x) is.null(x) || nrow(x) < 1 || ncol(x) < 1
is.notempty.string <- function(x) {
is.string(x) && !is.na(x) && nchar(x) > 0
}
##----... | /R/utilities_internal.R | no_license | AtlasOfLivingAustralia/ALA4R | R | false | false | 14,135 | r | ## some utility functions used internally within the ALA4R library: not
## exported
##-----------------------------------------------------------------------------
empty <- function(x) is.null(x) || nrow(x) < 1 || ncol(x) < 1
is.notempty.string <- function(x) {
is.string(x) && !is.na(x) && nchar(x) > 0
}
##----... |
# create a new variable for simplified favorability (combining "very" and "somewhat" responses)
vote$fav_trump_2016_simple[vote$fav_trump_2016 %in% c(1, 2)] <- "fav"
vote$fav_trump_2016_simple[vote$fav_trump_2016 %in% c(3, 4)] <- "unfav"
vote$fav_trump_2016_simple[vote$fav_trump_2016 == 8] <- "dk"
vote$fav_trump_2017_... | /favorability.R | no_license | wmerrow/trump-voters | R | false | false | 2,430 | r |
# create a new variable for simplified favorability (combining "very" and "somewhat" responses)
vote$fav_trump_2016_simple[vote$fav_trump_2016 %in% c(1, 2)] <- "fav"
vote$fav_trump_2016_simple[vote$fav_trump_2016 %in% c(3, 4)] <- "unfav"
vote$fav_trump_2016_simple[vote$fav_trump_2016 == 8] <- "dk"
vote$fav_trump_2017_... |
cur_dir = "C:/dev/R/Coursera/Proj2" #working directory where .rds files are located
setwd(cur_dir)
## This first line will likely take a few seconds. Be patient!
NEI <- readRDS("summarySCC_PM25.rds")
NEI.Baltimore <- subset(NEI,fips == "24510") # Baltimore City, Maryland (fips == "24510")
SCC <- readRDS("Source_Classi... | /plot3.R | no_license | rofeld/ExData_Prjoj2 | R | false | false | 783 | r | cur_dir = "C:/dev/R/Coursera/Proj2" #working directory where .rds files are located
setwd(cur_dir)
## This first line will likely take a few seconds. Be patient!
NEI <- readRDS("summarySCC_PM25.rds")
NEI.Baltimore <- subset(NEI,fips == "24510") # Baltimore City, Maryland (fips == "24510")
SCC <- readRDS("Source_Classi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getTrack.R
\name{getTrack}
\alias{getTrack}
\title{Get a Track}
\usage{
getTrack(track_id, token)
}
\arguments{
\item{track_id}{The Spotify ID for the track.}
\item{token}{An OAuth token created with \code{spotifyOAuth}.}
}
\description{
Get... | /man/getTrack.Rd | no_license | cran/Rspotify | R | false | true | 407 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getTrack.R
\name{getTrack}
\alias{getTrack}
\title{Get a Track}
\usage{
getTrack(track_id, token)
}
\arguments{
\item{track_id}{The Spotify ID for the track.}
\item{token}{An OAuth token created with \code{spotifyOAuth}.}
}
\description{
Get... |
## Put comments here that give an overall description of what your
## functions do
## The function makeCacheMatrix takes a matrix and returns
## a special matrix and also it stores the inverse of the matrix
## in cache
makeCacheMatrix <- function(x = matrix()) {
mat_in <- NULL
set <- function(y){
... | /cachematrix.R | no_license | RezaKatebi/ProgrammingAssignment2 | R | false | false | 1,260 | r | ## Put comments here that give an overall description of what your
## functions do
## The function makeCacheMatrix takes a matrix and returns
## a special matrix and also it stores the inverse of the matrix
## in cache
makeCacheMatrix <- function(x = matrix()) {
mat_in <- NULL
set <- function(y){
... |
flipBox <-
function (..., back_content, id, front_title = NULL, back_title = NULL,
front_btn_text = "More", back_btn_text = "Back to main",
header_img = NULL, main_img = NULL, width = 6)
{
id_front <- id
id_back <- id_front + 10000
if (is.null(id))
stop("card id cannot be null... | /inst/app/flipBox.R | no_license | cran/compareGroups | R | false | false | 9,447 | r | flipBox <-
function (..., back_content, id, front_title = NULL, back_title = NULL,
front_btn_text = "More", back_btn_text = "Back to main",
header_img = NULL, main_img = NULL, width = 6)
{
id_front <- id
id_back <- id_front + 10000
if (is.null(id))
stop("card id cannot be null... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SR.R
\name{SR}
\alias{SR}
\title{Calculate SR from mvr}
\usage{
SR(mvr)
}
\arguments{
\item{mvr}{pls model from pls package}
\item{ncomp}{ncomp}
}
\description{
Mostly edited and made to work by Y. Uwadaira of \code{plsropt} package.
Validat... | /man/SR.Rd | no_license | chengvt/cheng | R | false | true | 376 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SR.R
\name{SR}
\alias{SR}
\title{Calculate SR from mvr}
\usage{
SR(mvr)
}
\arguments{
\item{mvr}{pls model from pls package}
\item{ncomp}{ncomp}
}
\description{
Mostly edited and made to work by Y. Uwadaira of \code{plsropt} package.
Validat... |
Func = function(x) {exp(x) - x*pi}
fSecante <- function(x0,x1) {
x = seq(x0,x1,0.1)
plot(x,Func(x),type="l",col="red")
abline(h=0)
x2 = x1-(((x1-x0)*(Func(x1)))/(Func(x1)-Func(x0)))
error = abs(x2-x1)/x2
i = 0
aux = Func(x2)
po... | /Tareas/Tarea#2/secante.R | no_license | DavidHerreraC18/Analisis-Numerico | R | false | false | 886 | r | Func = function(x) {exp(x) - x*pi}
fSecante <- function(x0,x1) {
x = seq(x0,x1,0.1)
plot(x,Func(x),type="l",col="red")
abline(h=0)
x2 = x1-(((x1-x0)*(Func(x1)))/(Func(x1)-Func(x0)))
error = abs(x2-x1)/x2
i = 0
aux = Func(x2)
po... |
datafile <- "E:/CourseraDataScience/Working Directory/household_power_consumption.txt"
data <- read.table(datafile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
Subs <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
str(Subs)
globalActivePower <- as.numeric(Subs$Global_active_power)
Date_Time <- strptime(pas... | /plot3.R | no_license | pareenj/ExData_Plotting1 | R | false | false | 1,178 | r | datafile <- "E:/CourseraDataScience/Working Directory/household_power_consumption.txt"
data <- read.table(datafile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
Subs <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
str(Subs)
globalActivePower <- as.numeric(Subs$Global_active_power)
Date_Time <- strptime(pas... |
"cirock" <-
function(nvar,em=.dFvGet()$em,cr=.dFvGet()$cr,iopt=1) {
if (missing(nvar)) messagena("nvar")
vk <- single(1)
f.res <- .Fortran("cirockz",
em=to.single(em),
cr=to.single(cr),
nvar=to.integer(nvar),
iopt=to.integer(iopt),
vk=to.single(vk))
list(vk=f.res$vk)
}
| /R/cirock.R | no_license | cran/robeth | R | false | false | 282 | r | "cirock" <-
function(nvar,em=.dFvGet()$em,cr=.dFvGet()$cr,iopt=1) {
if (missing(nvar)) messagena("nvar")
vk <- single(1)
f.res <- .Fortran("cirockz",
em=to.single(em),
cr=to.single(cr),
nvar=to.integer(nvar),
iopt=to.integer(iopt),
vk=to.single(vk))
list(vk=f.res$vk)
}
|
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{make.design.matrix}
\alias{make.design.matrix}
\title{Construct standard LLM design matrix.}
\usage{
make.design.matrix(k = 3, order.max = k - 1, rasch = FALSE)
}
\arguments{
\item{k}{The number of lists}
\item{order.max}{The maximum number of lists to include... | /man/make.design.matrix.Rd | permissive | zkurtz/lllcrc | R | false | false | 570 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{make.design.matrix}
\alias{make.design.matrix}
\title{Construct standard LLM design matrix.}
\usage{
make.design.matrix(k = 3, order.max = k - 1, rasch = FALSE)
}
\arguments{
\item{k}{The number of lists}
\item{order.max}{The maximum number of lists to include... |
#model <- dfParams[row, "tune"]$model$value
#winnow <- dfParams[row, "tune"]$winnow$value
#trials.min <- dfParams[row, "tune"]$trials$min
#trials.max <- dfParams[row, "tune"]$trials$max
#trials.step <- dfParams[row, "tune"]$trials$step
model <- dfParams$tune[[index]]$model$value[1]
trials.min <- as.numeric(dfParams$... | /scripts/grid/C5.0.R | permissive | LabRatGroup/LabRat-R-Server | R | false | false | 658 | r | #model <- dfParams[row, "tune"]$model$value
#winnow <- dfParams[row, "tune"]$winnow$value
#trials.min <- dfParams[row, "tune"]$trials$min
#trials.max <- dfParams[row, "tune"]$trials$max
#trials.step <- dfParams[row, "tune"]$trials$step
model <- dfParams$tune[[index]]$model$value[1]
trials.min <- as.numeric(dfParams$... |
\name{refpkg}
\alias{refpkg}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Summary data and plots for reference packages
}
\description{
Summary data and plots for reference packages
}
\usage{
refpkg(refpkg_path,type="summary",rank_tree="species",
rank_pie=c("phylum","class","order","family","g... | /man/refpkg.Rd | no_license | cran/BoSSA | R | false | false | 2,613 | rd | \name{refpkg}
\alias{refpkg}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Summary data and plots for reference packages
}
\description{
Summary data and plots for reference packages
}
\usage{
refpkg(refpkg_path,type="summary",rank_tree="species",
rank_pie=c("phylum","class","order","family","g... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.