I am very new to R and trying to learn by doing some simple manipulation of my own data (Raman spectra). The .txt files I have each have two columns but different numbers of rows. The first column is Raman shift and the second is intensity. I want to create a single dataframe where the column names will be "Raman shift", "Sample 1","Raman shift", "Sample 2","Raman shift", "Sample 3" ... Where the column "Sample #" contains the intensity data from the file of that name.
I've tried to use the read_bulk function but the data isn't arranged the way I was expecting it.
all_data=read_bulk(directory = ".", extension = "txt", fun = read.delim)
Is there a clean and easy way of doing this or am I thinking about this the wrong way?