Thank you for your example. I have successfully modified it with regard to most
fields. However, I think that am not going to be putting this out for my
students. The class I am currently teaching is in multivariate statistics (both
methods and applications, with R used for computing) and I use
Here are the beginning of a R program.
I hope it can help you writing the rest of the program.
Regards
Martin M. S. Pedersen
filename <- "university.data"
lines <- readLines(filename)
first <- T
for (ALine in lines) {
ALine <- sub("^ +","",ALine)
ALine <- sub(")","",ALine, fixed = T)
if
Yes, and the structure is obviously case-insensitive. More troublesome is
probably that there can be multiple ACADEMIC-EMPHASIS entries, which can be
tricky to tidify. Also one would need to figure out what is the meaning of
lines like
(DEFPROP BOSTON-COLLEGE0 T DUPLICATE)
-pd
> On 18 Jan 201
The file also has a bunch of email headers stuck in the middle of it:
.
(QUALITY-OF-LIFE SCALE:1-5 4)
(ACADEMIC-EMPHASIS HEALTH-SCIENCE)
)
---
---
>From lebow...@cs.columbia.edu Mon Feb 22 20:53:02 1988
Received: from zodiac by meridian (5.52/4.7)
Received: from Jessica.Stanford.
That's a nice example of why Lisp is both powerful and terrifying - you're
looking at a Lisp *program*, not just Lisp *data*, as Lisp makes no
distinction between the two. You just read 'em in.
The two definitions at the bottom are function definitions. The top one
defines the def-instance funct
Thanks! I guess one way to do it in R would be to read the lines and then do
character parsing (string-matching and other operations) to save as a data
frame and forget about the lines at the end perhaps? I am not sure how general
such a scheme would be: that is also something I would like to sh
Thanks! I am trying to use it in R. (Actually, I try to give my students
experiences with different kinds of files and I was wondering if there were
tools available for such kinds of files. I don't know Lisp so I do not actually
know what the lines towards the bottom of the file mean.(
Many tha
It seems the file contains records, with each record having 18 fields.
I would use awk (standard unix tool), creating an awk script to process the
file
into a new file with one line for each record, each line with 18 fields,
say comma-separated.
The csv file can then be easily read into R via the f
> On Jan 17, 2018, at 8:22 PM, Ranjan Maitra wrote:
>
> Dear friends,
>
> Is there a way to read data files written in lisp into R?
>
> Here is the file:
> https://archive.ics.uci.edu/ml/machine-learning-databases/university/university.data
>
> I would like to read it into R. Any suggestion
9 matches
Mail list logo