how can I open a base in .r

The question may seem stupid but I'm a beginner.
How to open a database in .R. because when I open my insurance.r file, I have:

dat <-
structure(list(pcs = structure(c(8L, 4L, 4L, 8L, 6L, 8L, 4L,
6L, 3L, 8L, 8L, 8L, 6L, 4L, 7L, 5L, 7L, 4L, 7L, 5L, 5L, 8L, 5L,
7L, 4L, 4L, 5L, 8L, 7L, 3L, 4L, 4L, 7L, 5L, 7L, 8L, 7L, 7L, 4L,
7L, 8L, 7L, 5L, 7L, 3L, 8L, 4L, 7L, 8L, 4L, 8L, 4L, 5L, 8L, 8L,
6L, 2L, 4L, 4L, 5L, 7L, 8L, 8L, 8L, 4L, 7L, 5L, 5L, 4L, 7L, 7L,
5L, 5L, 4L, 8L, 8L, 6L, 5L, 7L, 8L, 3L, 5L, 7L, 8L, 6L, 8L, 5L,
8L, 7L, 5L, 5L, 8L, 5L, 4L, 4L, 5L, 5L, 3L, 4L, 4L, 5L, 8L, 7L,
4L, 7L, 5L, 8L, 8L, 8L, 8L, 7L, 4L, 4L, 8L, 6L, 8L, 8L, 4L, 4L,
4L, 5L, 6L, 7L, 7L, 8L, 8L, 8L, 5L, 6L, 8L, 6L, 4L, 3L, 7L, 7L,
4L, 6L, 6L, 4L, 6L, 6L, 6L, 6L, 5L, 7L, 5L, 8L, 3L, 4L, 5L, 7L,
5L, 4L, 2L, 7L, 4L, 8L, 8L, 6L, 6L, 5L, 8L, 7L, 6L, 5L, 4L, 5L,
6L, 7L, 6L, 6L, 5L, 8L, 8L, 8L, 8L, 4L, 4L, 4L, 8L, 5L, 8L, 4L,
5L, 8L, 8L, 8L, 7L, 7L, 7L, 7L, 4L, 5L, 7L, 7L, 8L, 8L, 5L, 5L,
3L, 8L, 6L, 6L, 7L, 7L, 4L, 4L, 7L, 4L, 8L, 7L, 4L, 4L, 7L, 6L,
etc etc...
So what's wrong ? Should I use read.table ?
I hope someone could help me !

A .r file contains R code

This is data stored as code, if you execute that code you would load the data into your memory and you would see an object called dat in your working environment.

Can you clarify what you mean with "How to open a database in .R."?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.