write r file to csv — “object not found”
up vote
0
down vote
favorite
Hello I need to make my R file into a CSV file. I have searched stackoverflow for different methods to accomplish this, but nothing is working. Each time, it says:
Error in is.data.frame(x) : object 'refine_clean' not found
My file is definitely named refine_clean.R. I have linked a screenshot here:
R Studio CSV Error Message
r export-to-csv
add a comment |
up vote
0
down vote
favorite
Hello I need to make my R file into a CSV file. I have searched stackoverflow for different methods to accomplish this, but nothing is working. Each time, it says:
Error in is.data.frame(x) : object 'refine_clean' not found
My file is definitely named refine_clean.R. I have linked a screenshot here:
R Studio CSV Error Message
r export-to-csv
The dataframe you want to write does not exist! Most likely, something upstream ofwrite.table()
andwrite.csv()
failed. Scan the entire script's output carefully and look for error messages.
– 12b345b6b78
Nov 10 at 17:59
Thank you. There was a problem reading the original csv file but it eventually worked. That was the only error. imgur.com/a/rg1ZP9z
– EB Gold
Nov 10 at 18:07
refine_clean.R
is the name of your R scrip file, not the name of the file you want to export/write. It looks like you actually want to write (I mean save)d5
, right?
– ANG
Nov 10 at 18:15
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Hello I need to make my R file into a CSV file. I have searched stackoverflow for different methods to accomplish this, but nothing is working. Each time, it says:
Error in is.data.frame(x) : object 'refine_clean' not found
My file is definitely named refine_clean.R. I have linked a screenshot here:
R Studio CSV Error Message
r export-to-csv
Hello I need to make my R file into a CSV file. I have searched stackoverflow for different methods to accomplish this, but nothing is working. Each time, it says:
Error in is.data.frame(x) : object 'refine_clean' not found
My file is definitely named refine_clean.R. I have linked a screenshot here:
R Studio CSV Error Message
r export-to-csv
r export-to-csv
asked Nov 10 at 17:57
EB Gold
74
74
The dataframe you want to write does not exist! Most likely, something upstream ofwrite.table()
andwrite.csv()
failed. Scan the entire script's output carefully and look for error messages.
– 12b345b6b78
Nov 10 at 17:59
Thank you. There was a problem reading the original csv file but it eventually worked. That was the only error. imgur.com/a/rg1ZP9z
– EB Gold
Nov 10 at 18:07
refine_clean.R
is the name of your R scrip file, not the name of the file you want to export/write. It looks like you actually want to write (I mean save)d5
, right?
– ANG
Nov 10 at 18:15
add a comment |
The dataframe you want to write does not exist! Most likely, something upstream ofwrite.table()
andwrite.csv()
failed. Scan the entire script's output carefully and look for error messages.
– 12b345b6b78
Nov 10 at 17:59
Thank you. There was a problem reading the original csv file but it eventually worked. That was the only error. imgur.com/a/rg1ZP9z
– EB Gold
Nov 10 at 18:07
refine_clean.R
is the name of your R scrip file, not the name of the file you want to export/write. It looks like you actually want to write (I mean save)d5
, right?
– ANG
Nov 10 at 18:15
The dataframe you want to write does not exist! Most likely, something upstream of
write.table()
and write.csv()
failed. Scan the entire script's output carefully and look for error messages.– 12b345b6b78
Nov 10 at 17:59
The dataframe you want to write does not exist! Most likely, something upstream of
write.table()
and write.csv()
failed. Scan the entire script's output carefully and look for error messages.– 12b345b6b78
Nov 10 at 17:59
Thank you. There was a problem reading the original csv file but it eventually worked. That was the only error. imgur.com/a/rg1ZP9z
– EB Gold
Nov 10 at 18:07
Thank you. There was a problem reading the original csv file but it eventually worked. That was the only error. imgur.com/a/rg1ZP9z
– EB Gold
Nov 10 at 18:07
refine_clean.R
is the name of your R scrip file, not the name of the file you want to export/write. It looks like you actually want to write (I mean save) d5
, right?– ANG
Nov 10 at 18:15
refine_clean.R
is the name of your R scrip file, not the name of the file you want to export/write. It looks like you actually want to write (I mean save) d5
, right?– ANG
Nov 10 at 18:15
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
Your file is named refine_clean but you have no data.frame or object named refine_clean, which is what write_table
and write.csv
are looking for.
based on the screen shot, it is not clear what you want to produce. If it is the last object you created (d5
), you may want something like this
write.csv(d5, "refine_clean.csv")
ah i see what you mean. Yes, it is the last object, d5. I used your code -- thanks! -- it no longer causes an error but I also don't see a csv file created anywhere... is there another step? imgur.com/s2aKZZZ
– EB Gold
Nov 10 at 18:18
I also tried with this refine_clean <- write.table(d5) write.csv(refine_clean, file = "refine_clean.csv")
– EB Gold
Nov 10 at 18:20
1
The file is saved in your working directory by default. If you want to save it in a particular folder usewrite.csv(d5, "C:/Users/blablaPathToFolder/refine_clean.csv")
– ANG
Nov 10 at 18:21
What @ANG said. Additionally, you can just scan your local machine for the file, such as typing "refine_clean.csv" in your File Explorer on a windows machine.
– Peter_Evan
Nov 10 at 18:25
add a comment |
up vote
0
down vote
you cant convert all your file as an csv, you need to select the object, like d5
write.csv(d5,file = "name_of_the_file")
Please, could you explain how your answer is different from Peter_Evan's one?
– ANG
Nov 10 at 18:22
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Your file is named refine_clean but you have no data.frame or object named refine_clean, which is what write_table
and write.csv
are looking for.
based on the screen shot, it is not clear what you want to produce. If it is the last object you created (d5
), you may want something like this
write.csv(d5, "refine_clean.csv")
ah i see what you mean. Yes, it is the last object, d5. I used your code -- thanks! -- it no longer causes an error but I also don't see a csv file created anywhere... is there another step? imgur.com/s2aKZZZ
– EB Gold
Nov 10 at 18:18
I also tried with this refine_clean <- write.table(d5) write.csv(refine_clean, file = "refine_clean.csv")
– EB Gold
Nov 10 at 18:20
1
The file is saved in your working directory by default. If you want to save it in a particular folder usewrite.csv(d5, "C:/Users/blablaPathToFolder/refine_clean.csv")
– ANG
Nov 10 at 18:21
What @ANG said. Additionally, you can just scan your local machine for the file, such as typing "refine_clean.csv" in your File Explorer on a windows machine.
– Peter_Evan
Nov 10 at 18:25
add a comment |
up vote
1
down vote
accepted
Your file is named refine_clean but you have no data.frame or object named refine_clean, which is what write_table
and write.csv
are looking for.
based on the screen shot, it is not clear what you want to produce. If it is the last object you created (d5
), you may want something like this
write.csv(d5, "refine_clean.csv")
ah i see what you mean. Yes, it is the last object, d5. I used your code -- thanks! -- it no longer causes an error but I also don't see a csv file created anywhere... is there another step? imgur.com/s2aKZZZ
– EB Gold
Nov 10 at 18:18
I also tried with this refine_clean <- write.table(d5) write.csv(refine_clean, file = "refine_clean.csv")
– EB Gold
Nov 10 at 18:20
1
The file is saved in your working directory by default. If you want to save it in a particular folder usewrite.csv(d5, "C:/Users/blablaPathToFolder/refine_clean.csv")
– ANG
Nov 10 at 18:21
What @ANG said. Additionally, you can just scan your local machine for the file, such as typing "refine_clean.csv" in your File Explorer on a windows machine.
– Peter_Evan
Nov 10 at 18:25
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Your file is named refine_clean but you have no data.frame or object named refine_clean, which is what write_table
and write.csv
are looking for.
based on the screen shot, it is not clear what you want to produce. If it is the last object you created (d5
), you may want something like this
write.csv(d5, "refine_clean.csv")
Your file is named refine_clean but you have no data.frame or object named refine_clean, which is what write_table
and write.csv
are looking for.
based on the screen shot, it is not clear what you want to produce. If it is the last object you created (d5
), you may want something like this
write.csv(d5, "refine_clean.csv")
answered Nov 10 at 18:13
Peter_Evan
2138
2138
ah i see what you mean. Yes, it is the last object, d5. I used your code -- thanks! -- it no longer causes an error but I also don't see a csv file created anywhere... is there another step? imgur.com/s2aKZZZ
– EB Gold
Nov 10 at 18:18
I also tried with this refine_clean <- write.table(d5) write.csv(refine_clean, file = "refine_clean.csv")
– EB Gold
Nov 10 at 18:20
1
The file is saved in your working directory by default. If you want to save it in a particular folder usewrite.csv(d5, "C:/Users/blablaPathToFolder/refine_clean.csv")
– ANG
Nov 10 at 18:21
What @ANG said. Additionally, you can just scan your local machine for the file, such as typing "refine_clean.csv" in your File Explorer on a windows machine.
– Peter_Evan
Nov 10 at 18:25
add a comment |
ah i see what you mean. Yes, it is the last object, d5. I used your code -- thanks! -- it no longer causes an error but I also don't see a csv file created anywhere... is there another step? imgur.com/s2aKZZZ
– EB Gold
Nov 10 at 18:18
I also tried with this refine_clean <- write.table(d5) write.csv(refine_clean, file = "refine_clean.csv")
– EB Gold
Nov 10 at 18:20
1
The file is saved in your working directory by default. If you want to save it in a particular folder usewrite.csv(d5, "C:/Users/blablaPathToFolder/refine_clean.csv")
– ANG
Nov 10 at 18:21
What @ANG said. Additionally, you can just scan your local machine for the file, such as typing "refine_clean.csv" in your File Explorer on a windows machine.
– Peter_Evan
Nov 10 at 18:25
ah i see what you mean. Yes, it is the last object, d5. I used your code -- thanks! -- it no longer causes an error but I also don't see a csv file created anywhere... is there another step? imgur.com/s2aKZZZ
– EB Gold
Nov 10 at 18:18
ah i see what you mean. Yes, it is the last object, d5. I used your code -- thanks! -- it no longer causes an error but I also don't see a csv file created anywhere... is there another step? imgur.com/s2aKZZZ
– EB Gold
Nov 10 at 18:18
I also tried with this refine_clean <- write.table(d5) write.csv(refine_clean, file = "refine_clean.csv")
– EB Gold
Nov 10 at 18:20
I also tried with this refine_clean <- write.table(d5) write.csv(refine_clean, file = "refine_clean.csv")
– EB Gold
Nov 10 at 18:20
1
1
The file is saved in your working directory by default. If you want to save it in a particular folder use
write.csv(d5, "C:/Users/blablaPathToFolder/refine_clean.csv")
– ANG
Nov 10 at 18:21
The file is saved in your working directory by default. If you want to save it in a particular folder use
write.csv(d5, "C:/Users/blablaPathToFolder/refine_clean.csv")
– ANG
Nov 10 at 18:21
What @ANG said. Additionally, you can just scan your local machine for the file, such as typing "refine_clean.csv" in your File Explorer on a windows machine.
– Peter_Evan
Nov 10 at 18:25
What @ANG said. Additionally, you can just scan your local machine for the file, such as typing "refine_clean.csv" in your File Explorer on a windows machine.
– Peter_Evan
Nov 10 at 18:25
add a comment |
up vote
0
down vote
you cant convert all your file as an csv, you need to select the object, like d5
write.csv(d5,file = "name_of_the_file")
Please, could you explain how your answer is different from Peter_Evan's one?
– ANG
Nov 10 at 18:22
add a comment |
up vote
0
down vote
you cant convert all your file as an csv, you need to select the object, like d5
write.csv(d5,file = "name_of_the_file")
Please, could you explain how your answer is different from Peter_Evan's one?
– ANG
Nov 10 at 18:22
add a comment |
up vote
0
down vote
up vote
0
down vote
you cant convert all your file as an csv, you need to select the object, like d5
write.csv(d5,file = "name_of_the_file")
you cant convert all your file as an csv, you need to select the object, like d5
write.csv(d5,file = "name_of_the_file")
answered Nov 10 at 18:17
Luis Miguel Baqueiro
1
1
Please, could you explain how your answer is different from Peter_Evan's one?
– ANG
Nov 10 at 18:22
add a comment |
Please, could you explain how your answer is different from Peter_Evan's one?
– ANG
Nov 10 at 18:22
Please, could you explain how your answer is different from Peter_Evan's one?
– ANG
Nov 10 at 18:22
Please, could you explain how your answer is different from Peter_Evan's one?
– ANG
Nov 10 at 18:22
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241853%2fwrite-r-file-to-csv-object-not-found%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
The dataframe you want to write does not exist! Most likely, something upstream of
write.table()
andwrite.csv()
failed. Scan the entire script's output carefully and look for error messages.– 12b345b6b78
Nov 10 at 17:59
Thank you. There was a problem reading the original csv file but it eventually worked. That was the only error. imgur.com/a/rg1ZP9z
– EB Gold
Nov 10 at 18:07
refine_clean.R
is the name of your R scrip file, not the name of the file you want to export/write. It looks like you actually want to write (I mean save)d5
, right?– ANG
Nov 10 at 18:15