categorize files according to user's answer

I have recently learned to code with R and i sort of manage to handle the data within files but i struggle to manipulate the files themselves. Here is my problem. I've got in my working directory "Laurent/R" csv files (never more than 5) with names that change from one experiment to the other.

I'd like to ask the user of the script to select among this list the "control" file(s) (the one(s) not selected being the "test" file(s)); or is it simpler to ask for each file something like " Is " "[1] " "a control gene ? " and codify the answer ?

Then I'd like to open the first "control" file, make some calculations, and assign a name to the output data table; and repeat the process with the different "control" files​.

Then i open the "test" file(s) successively and make calculations using data from "control" output tables.

That would be great if i could !! Thanks​

You can ask the user to select a file with file.choose(). Is this what you mean?

my_df <- read.csv(file.choose())

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