CH -02 Using the scan Command for Making Data with example - R-Programing

Latest

Search Bar

Monday, September 21, 2020

CH -02 Using the scan Command for Making Data with example

 Using the scan Command for Making Data

Syntax:

Your_data_NAMe_WHich_You_Want_to give = scan()

example:

Try It Out Use scan() to Make Numerical Data

Perform the following steps to practice storing data using the scan() command.

1. Begin the data entry process with the scan() command:

> data3 = scan()

2. Now type some numerical values, separated by spaces, as follows:

1: 6 7 8 7 6 3 8 9 10 7

3. Now press the Enter key and type some more numbers on the fresh line:

11: 6 9

4. Press the Enter key once again to create a new line:

13:

5. Press the Enter key once more to finish the data entry:

13:

Read 12 items

6. Type the name of the object:

> data3

[1] 6 7 8 7 6 3 8 9 10 7 6 9

Entering Text as Data




No comments:

Post a Comment