I'm trying to read in a 51 row by 151 column .csv file The first column is Student ID # The remaining columns are the questions of an exam The first row is the key to the exam The remaining rows are the answers submitted by the student Here is the the first portion of the data in Excel. Is there a way to importing the data with the columns being character vectors without needing to state each individual column as a character? When I try to read in the date with the code below, only Student and Q150 are character vectors. The cells of Q1 through Q149 are blank (to be more accurate, they're periods). [Edit: They are blank because they are still numeric] data Exam_Results;
infile "filepath.csv" dlm="," dsd;
input Student $ Q1-Q150 $;
run; What I'm trying to avoid is something obnoxious like data Exam_Results;
infile "filepath.csv" dlm="," dsd;
input Student $ Q1 $ Q2 $ Q3 $ Q4 $ Q5 $ Q6 $ Q7 $ Q8 $ Q9 $ Q0 $ Q10 $ ... Q149 $ Q150 $;
run; Is there some easier, more concise to get all of the columns imported as characters? Thanks in advanced everyone.
... View more