I have a question regarding file.
The reason I am asking is because of using some function for example in R to import the data from outside to R.
I have a file character_student.txt
with data like below.
Name, Age, Gender, Test1
john, 11, M, 90
betty, 25, F, 33
I am confused. Is the above file considered as csv file (comma separated file)? Or is it a text file? When using R to import say this file to R, is it appropriate to use say read.csv(file="character_student.txt)
?
Then the other question that I have is, if I have a file like this:
Name Age Gender Test1
john 11 M 90
betty 25 F 33
so there is only a single space in between each file, and then say I saved it as a .csv file, then I think the filename will become something like character_text.csv
. Then I am just wondering is this file now a space-delimited file or a comma-delimited file?
I guess my question is how do I know if I file is a comma-separated file? or a space-delimited file? or a tab-delimited?
Is it purely based on the name of the file? for example if the name ends with csv, then it is comma separated file, if it ends with something else then is "something else" delimited file? so does it matter what the inside of the file actually looks like? like do we have to open the file to check if there is a comma separating the field to be sure that the file is a comma-separated file? or if we have a csv file but inside of it, the field could be separated by something else?
Or if it is called csv, then every field inside is separated by a comma (like I don't have to open it to make sure that it is actually separated by comma)?