- 博客(17)
- 收藏
- 关注
原创 R Programming - Getting and Cleaning Data
Getting and Cleaning DataRaw and Processed DataRaw DataProcessed DataComponents of Tidy DataThe four things you should haveThe raw dataThe tidy dataThe code bookThe instruction listDownloading FilesReading Local FilesReading Excel FilesReading XMLReading J
2022-06-25 23:42:59
305
原创 Regular expressions
```pythonimport retext = "This is a good day."## match(): checks for a match that is at the beginning of the string and returns a boolean## search(): check for a match anywhere in the string, and returns a booleanif re.search("good", text): # the fi.
2022-05-28 22:36:01
130
原创 R Programming - Hospital Compare
Unzip file> library(utils)> unzip("rprog-data-ProgAssignment3-data.zip")Finding the best hospital in a statebest <- function(state, outcome){ ## state is the 2-character abbreviated name ## outcome is the outcome name ## read outcome
2022-05-24 12:03:49
101
原创 R Programming - Simulation & Profiling
Simulation & ProfilingThe str functionSimulation - Generating Random NumbersGenerating Random NumbersSimulation - Simulating a Linear ModelGenerating Random Numbers From a Linear ModelGenerating Random Numbers From a Generalized Linear ModelSimulation
2022-05-21 18:45:50
152
原创 R Programming -Debugging Tools
Debugging ToolsDiagnosing the ProblemBasic ToolsUsing the ToolsDiagnosing the ProblemIndications that something’s not rightmessage: A generic notification/diagnostic message produced by the message function; execution of the function continueswarning:
2022-05-18 20:25:21
104
原创 R Programming - Loop Functions
Loop Functions1. Iapply & sapplylapplysapply2. applycol/row sums and means3. mapplyVectorizing a FunctionInstant Vectorization4. tapply5. splitSplitting a Data FrameSplitting on more than one levelWriting for, while loops is useful when programming b
2022-05-18 19:40:44
146
原创 R Programming Practice - Air Pollution
Part 1Write a function named ‘pollutantmean’ that calculates the mean of a pollutant (sulfate or nitrate) across a specified list of monitors. The function ‘pollutantmean’ takes three arguments: ‘directory’, ‘pollutant’, and ‘id’. Given a vector monitor
2022-05-16 17:44:57
397
原创 R Programming - Scoping Rules
binding values to symbolThe global environment or the user’s workspace is always the first element of the search list and the base package is always the lastThe order of the packages on the search list mattersUser’s can configure which packages get loa
2022-05-13 21:43:16
229
原创 R Programming - Functions
> add2 <- function(x, y) {+ x + y+ }> add2(3,5)[1] 8> above <- function(x, n =10) {+ use <- x >n+ x[use]+ }> x <- 1:20> above(x, 12)[1] 13 14 15 16 17 18 19 20> above(x) [1] 11 12 13 14
2022-05-13 18:11:54
87
原创 R Programming -Control Structures
Control structures in R allow you to control the flow of execution of the program, depending on runtime conditions. Common structures are:Control Structure1. if, else: testing a condition2. for: execute a loop a fixed number of timesNested for loops3. whi
2022-05-13 15:07:38
105
原创 Python -Numpy
1. Array Creationimport numpy as npimport math## Arrays are displayed as a list or list of lists and can be created through list as wella = np.array([1,2,3])print(a)print(a.ndim) # print the number of dimensions of a list using the ndim attribute[
2022-05-12 23:06:22
191
原创 R programming - swirl learning
R programming - swirl learning> library(swirl)> swirl()1. The basics of programming in RIf at any point you’d like more information on a particular topic related to R, you can type help.start() at the prompt, which will open a menu of resources
2022-05-10 20:32:47
491
原创 R Programming - Reading Data
#@TOCReading Tabular DataThere are a few principle functions reading data into Rread.table, read.csv, for reading tabular datareadLines, for reading lines of a text filesource, for reading in R code files(inverse of dump)dget, for reading in R code
2022-05-09 17:43:13
403
原创 Qualitative Research - interview
Qualitative researchinterviewobservationsaffinity diagramswork modelspersonasmarket researchsurvey and questionnaireslog analysisdocument analysisFocus groupWorkshopsA/b testPrototypingDesign probetypes of interviews
2022-04-23 17:55:21
814
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人