Git Product home page Git Product logo

data-science's Introduction

Introduction

Hi, this is named datasciencecoursera although I do all type of work here, playing around and to be exact it contains all of mine study starting in Data field. There are all types of learning here and you may find sth critical to your study. SO LET'S GET STARTED.

This is a markdown file

What is R? R was originally named after S language which was used as an internal statistical analysis

Interactive env to not see themselves as programming. Can do basic calculation, learning gradually, then transition.

1993: First announcement

Features of R

  • Syntax is very similar to S
  • Semantics are superfically similar to S
  • Divided into modular packages
  • Graphics capabilities very sophisticated and better than most stat packages
  • Useful for interactive work, but contains a powerful programming tool ##Drawback
  • Little built in support for dynamic or 3-D graphics
  • Not ideal for all possible situations especially with big data
  • Objects that is manipulated need to be stored in physical memory
  • It's a one-based indexing language

##Design Divided into 2 conceptual parts

  1. The base R system that you download from CRAN
  2. Everything else

Get help

  1. Through email
  2. Discussion board
  3. On the mailing list
  • Searching on archive before asking on forum
  • Reading the mannual
  • Before venturing try ask your circle first

Asking question

  • Let people know what you have done before asking

  • Example: Error Message

    1. Search google first
    2. Steps to reproduce the problem
    3. State what you want your output to be
    4. What version of R, packages
    5. Operating system
    6. Additional Info
  • Subject Headers: Adding on the needed information

  • What to do?

    • Describe the goal not the step
    • Be explicit, clearly and in detail
    • Follow up with the solution (if found)
    • Provide minimum amount of data
  • What is not to do?

    • Claim to found a bug
    • Don't ask about your homework
    • Email multiple mailing lists at once
    • Ask others to debug your broken code without explicit info
  • What went wrong?

    • Do not be vague in your question
    • No evidence for the former work
    • For noob, ask on R-help not R-dev. [email protected]

Connection to the Outside World

  • Connection interface, can be made to files or to webpage
  1. file opens a connection to a file. Text file
  2. gzfile opens a connection to a file compressed with gzip -> gz extension
  3. bzfile opens a connection to a file compressed with bzip2 -> bzip2 extension
  4. url opens connection to a webpage

r for reading w for writing a for appending rb, wb, ab for those above in binary mode

con <- file("foo.txt", "r")
data <- read.csv(con)
close(con)

The same with 
data <- read.csv("foo.txt")
  • So in the former example it is not that necessary to use the connection. Although in case like below, it can be helpful
con <- gzfile("words.gz")
x <- readLines(con, 10) #Read the first 10 lines
x

Coding Standard

  • Indenting your code
  • Limit the width of your code (80 columns)
  • Write your code under text type file
  • Limit the length of particular function
  • Function should only do what they say they are

Debug

  • Ask yourself

    • Input? How you have call the function?
    • What is your expectation?
    • What did you get?
    • What is the difference?
    • Were your expectations correct in the first place?
    • Can you reproduce the problem?
  • Tools:

  1. traceback
  • Prints out the call stack after an error occurs
  • Does nothing if there is not any error
  1. debug
  • flags a function for debug mode
  1. browser
  • Can be called anywhere
  • suspends the execution when being called and put the function in debug mode
  1. trace
  • allow insert debugging code into a function without modify the source code
  1. recover
  • allow to modify the error (Error handle)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.