[R-SIG-Mac] Some introductory questions

Adrian Dușa du@@@@dr|@n @end|ng |rom un|buc@ro
Tue Sep 8 12:19:49 CEST 2020


Dear Mike,

I remember so very well the time when I struggled with exactly the same
things, reading a file seeming like an almost insurmountable task.
However, given this actually is very simple I can also understand the
reactions you got. Imagine every newbie asking these questions over
and over again, in a time where there is so much information out there to
figure it out quite easy.

The documentation might be a little cryptic, I give you that. But there are
so many other resources, most of them free, that you can read to understand
how this works. I would warmly recommend some of the contributed
introductory materials from:
https://cran.r-project.org/other-docs.html

There are also plenty of websites to teach R interactively, and all of them
offer this kind of information, without exception, since this really is
part of the very basics in R.

What I learned over the years is that help on this list is invaluable. But
all of the contributors share their own time, and help must be required in
such a way that it (at least) makes it obvious you did first try to do your
homework. Most of the time, asking the right question(s) reveals the answer
and at some point you will only need to browse past similar questions to
find the answer you want.

Linked to that, one other thing I learned is my question is almost never
unique and most likely somebody else asked something at least similar in
the past. Doing your homework also means trying to dig in the archives,
which is pretty easy these days using Google.

Should you make this effort and make it evident in your question that you
did try to read on your own, I'm sure it would be easy for other people to
point you in the right direction. Because this is almost always what I
need: a pointer, and then I can figure it out on my own.

Rest assured this is a very friendly email list, and I consider myself
lucky to be part of this community. Despite knowing this for so many years,
I still make mistakes and consume too much of others' time. But at least I
am aware of that, and extremely grateful for the help I get.

I hope this helps,
Adrian

On Tue, Sep 8, 2020 at 1:08 AM Mike Feher <mfeher1971 using gmail.com> wrote:

> Hi Peter,
>
> Here is a snippet of the code I was trying to start with:
>
> filepath1 <- file("/Users/michaelfeher/Documents/R
> Documents/COVID19/20200906-1822-total-cases-jones.data")
> filepath1
> TotalCasesJones <- read.table(filepath1)
>
> This definitely did not work for me.
>
> Mike
>
> On September 7, 2020 at 3:50:19 AM, peter dalgaard (pdalgd using gmail.com)
> wrote:
>
>
>
> > On 7 Sep 2020, at 07:09 , Ken Beath <ken using kjbeath.com.au> wrote:
> >
> >> On 7 Sep 2020, at 9:31 am, Mike Feher <mfeher1971 using gmail.com> wrote:
> >
> [snip]
> >> 4. I tried to read in a set of dummy space-delimited data saved in an
> >> absolute path on my computer, but it would not work. I tried something
> in
> >> another path that did not have a subfolder with a space in it (I.e. I
> plan
> >> on storing my data in a folder called “R Documents” or something
> similar)
> >> and that didn’t work either, so I’m still wondering whether or not (a)
> >> things have to be in the library location (it seems like you could
> >> customize that) and (b) whether R recognizes spaces in file paths.
> >>
> >
> > Try using file.choose() to locate files using a dialog and it will return
> the full name. Spaces shouldn’t matter provided that everything is enclosed
> in quotes. Most people don’t use absolute references. They set the working
> directory and then just use the name of the file. See under the Misc menu.
>
> Also, how do you "read in" the data? Usually, read.table() or somesuch
> would be involved, although RStudio has an "Import data" functionality.
>
> -pd
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd.mes using cbs.dk Priv: PDalgd using gmail.com
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>


-- 
Adrian Dusa
University of Bucharest
Romanian Social Data Archive
Soseaua Panduri nr. 90-92
050663 Bucharest sector 5
Romania
https://adriandusa.eu

	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list