美文网首页
Markdown常用语法

Markdown常用语法

作者: 硕硕的U盘 | 来源:发表于2014-06-16 15:48 被阅读0次

一级标题

二级标题

三级标题

四级标题

五级标题
六级标题

列表

  • 列表1
  • 列表2
  • 列表3

有序文本

  1. 有序文本1
  2. 有序文本2
  3. 有序文本3

超链接简书

图片图片

Project for Getting and Cleaning Data

Author: Benjamin Chan (https://github.com/benjamin-chan/GettingAndCleaningData)

Parameters for the project

The purpose of this project is to demonstrate your ability to collect, work with, and clean a data set. The goal is to prepare tidy data that can be used for later analysis. You will be graded by your peers on a series of yes/no questions related to the project. You will be required to submit: 1) a tidy data set as described below, 2) a link to a Github repository with your script for performing the analysis, and 3) a code book that describes the variables, the data, and any transformations or work that you performed to clean up the data called CodeBook.md. You should also include a README.md in the repo with your scripts. This repo explains how all of the scripts work and how they are connected.
http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones

Here are the data for the project:

https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip

You should create one R script called run_analysis.R that does the following.

  1. Merges the training and the test sets to create one data set.
  2. Extracts only the measurements on the mean and standard deviation for each measurement.
  3. Uses descriptive activity names to name the activities in the data set.
  4. Appropriately labels the data set with descriptive activity names.
  5. Creates a second, independent tidy data set with the average of each variable for each activity and each subject.

Good luck!

Steps to reproduce this project

  1. Open the R script run_analysis.r using a text editor.
  2. Change the parameter of the setwd function call to the working directory/folder (i.e., the folder where these the R script file is saved).
  3. Run the R script run_analysis.r. It calls the R Markdown file, run_analysis.Rmd, which contains the bulk of the code.

Outputs produced

  • Tidy dataset file DatasetHumanActivityRecognitionUsingSmartphones.txt (tab-delimited text)
  • Codebook file codebook.md (Markdown)

Test script

a <- c(1,1,2,3,4,5,6,7,8,9)

asd

Preliminaries

Load packages.

packages <- c("data.table", "reshape2")
sapply(packages, require, character.only = TRUE, quietly = TRUE)
## data.table   reshape2 
##       TRUE       TRUE

Set path.

path <- getwd()
path
## [1] "C:/Users/chanb/Documents/Repositories/Coursera/GettingAndCleaningData/Project"

Get the data

Download the file. Put it in the Data folder. This was already done on 2014-04-11; save time and don't evaluate again.

url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
f <- "Dataset.zip"
if (!file.exists(path)) {
    dir.create(path)
}
download.file(url, file.path(path, f))

Unzip the file. This was already done on 2014-04-11; save time and don't evaluate again.

executable <- file.path("C:", "Program Files (x86)", "7-Zip", "7z.exe")
parameters <- "x"
cmd <- paste(paste0("\"", executable, "\""), parameters, paste0("\"", file.path(path, 
    f), "\""))
system(cmd)

The archive put the files in a folder named UCI HAR Dataset. Set this folder as the input path. List the files here.

相关文章

  • Markdown语法使用指南

    Markdown 语法 以下是 Markdown 的常用语法!在以后的笔记中将持续使用 Markdown 语法进行...

  • MarkDown语法

    MarkDown常用语法 MarkDown语法Document Markdown 语法的目标是:成为一种适用于网络...

  • markdown

    MarkDown常用语法

  • demo 测试

    *** 一条横线 demo 测试 测试 markdown 语法 markdown 常用语法 # 标题 * +...

  • 把Jekyll和Markdown常用语法用的66

    因为常写博客和网站搭建,经常用到Jekyll和Markdown,备忘下常用语法。 Markdown常用语法 Mar...

  • 【常用markdown语法总结】

    【常用markdown语法总结】 tags: markdown语法 原创 已备份 标签 文章列首:“标签:A B ...

  • Markdown语法

    常见的Markdown的语法 此文章主要是记录常用的Markdown语法! Header 3 This is a ...

  • markdown基本语法总结

    markdown基本语法总结 常用Markdown符号(简单罗列常用MD符号,具体可查看Markdown中文官方文...

  • Markdown语法

    #markdown语法介绍 >下面是markdown的常用语法介绍 ##段落和换行 一个 Markdown 段落是...

  • Markdown入门

    常用Markdown语法 声明:本篇博客总结的Markdown语法并不全面,只是我最近打算开始使用Markdown...

网友评论

      本文标题:Markdown常用语法

      本文链接:https://www.haomeiwen.com/subject/epcjtttx.html