Skip to content

Commit 966b771

Browse files
author
Katrin Leinweber
committed
fixed a few more typos
1 parent 049327c commit 966b771

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Classes_and_Methods/Classes_and_Methods.Rmd

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ S4 classes/methods
4141

4242
## Object Oriented Programming in R
4343

44-
- A class is a description of an thing. A class can be defined using `setClass()` in the *methods* package.
44+
- A class is a description of a thing. A class can be defined using `setClass()` in the *methods* package.
4545
- An _object_ is an instance of a class. Objects can be created using `new()`.
4646
- A _method_ is a function that only operates on a certain class of objects.
4747
- A generic function is an R function which dispatches methods. A generic function typically encapsulates a "generic" concept (e.g. `plot`, `mean`, `predict`, ...)
@@ -88,7 +88,7 @@ class(fit)
8888

8989
- S4 and S3 style generic functions look different but conceptually, they are the same (they play the same role).
9090
- When you program you can write new methods for an existing generic OR create your own generics and associated methods.
91-
- Of course, if a data type does not exist in R that matches your needs, you can always define a new class along with generics/methods that go with it
91+
- Of course, if a data type does not exist in R that matches your needs, you can always define a new class along with generics/methods that go with it.
9292

9393
## An S3 generic function (in the 'base' package)
9494

@@ -268,7 +268,8 @@ I say things are "new" meaning that R does not know about them (not that they ar
268268
A new class can be defined using the `setClass` function
269269
- At a minimum you need to specify the name of the class
270270
- You can also specify data elements that are called _slots_
271-
- You can then define methods for the class with the `setMethod` function Information about a class definition can be obtained with the `showClass` function
271+
- You can then define methods for the class with the `setMethod` function
272+
- Information about a class definition can be obtained with the `showClass` function
272273

273274
## S4 Class/Method: Polygon Class
274275

@@ -281,7 +282,7 @@ setClass("polygon",
281282
y = "numeric"))
282283
```
283284

284-
- The slots for this class are `x`and `y`
285+
- The slots for this class are `x` and `y`
285286

286287
- The slots for an S4 object can be accessed with the `@` operator.
287288

@@ -340,7 +341,7 @@ plot(p)
340341

341342
- <b>Classes</b> define new data types
342343

343-
- <b>Methods</b> extend <b>generic functions</b> to specificy the behavior
344+
- <b>Methods</b> extend <b>generic functions</b> to specify the behavior
344345
of generic functions on new classes
345346

346347
- As new data types and concepts are created, classes/methods provide

Shiny_Part_1/Shiny_Part_1.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ shinyServer(function(input, output) {
8383
## To run it
8484
- In R, change to the directories with these files and type `runApp()`
8585
- or put the path to the directory as an argument
86-
- It should open an browser window with the app running
86+
- It should open a browser window with the app running
8787

8888
## Your First Shiny App
8989

0 commit comments

Comments
 (0)