0

So,I am a very beginner in R,I wanted to ask this- inside read.csv ,we are using "",but while writting summary/mean/sd etc. we don't use "". Why is this the case?

Dreamer
  • 125
  • 1
  • 1
  • 5
  • Welcome to SO. Please, when you make a question try to give: Input sample, expected output sample, what did you try and your research. SO is not a free coding service. – David García Bodego Oct 17 '19 at 05:47
  • 1
    Hello Anuradha, I looked around a bit here on stackoverflow: This other [answer](https://stackoverflow.com/questions/20572436/are-double-and-single-quotes-always-interchangeable-in-r) might help you understand. – larsoevlisen Oct 17 '19 at 05:48

1 Answers1

0

Double quotes " demark strings of characters, text inside code. Code itself is not double-quoted.

The following is valid code

name.of.file <- "C:\\Users\\bernhard\\valued_data.csv"
read.csv(name.of.file)

So you see, there is nothing special about read.csv, it takes the file name either as a string in "s or as a variable containing that string; no " in the latter case.

Bernhard
  • 4,272
  • 1
  • 13
  • 23