Skip to content

Instantly share code, notes, and snippets.

@randyzwitch
Created July 30, 2013 10:31
Show Gist options
  • Save randyzwitch/6111881 to your computer and use it in GitHub Desktop.
Save randyzwitch/6111881 to your computer and use it in GitHub Desktop.
Julia readdlm basic example
julia> airline_array = readdlm("/Users/randyzwitch/airline/1987.csv", ',');
julia> size(airline_array)
(1311827,29)
julia> typeof(airline_array)
Array{Any,2}
@Dawny33
Copy link

Dawny33 commented Nov 2, 2015

This code is returning the following error:

julia> airline_array = readdlm("/Users/jalemrajrohit/Desktop/Work/Book/LinkedIn contacts.csv", ",")
ERROR: MethodError: `readdlm` has no method matching readdlm(::ASCIIString, ::ASCIIString)
Closest candidates are:
  readdlm(::Any)
  readdlm(::Any, ::Type{T})
  readdlm(::Any, ::Char)
  ...

It happens while creating the SQLite DB's too. Any idea how do I deal with them?

@jayrbolton
Copy link

Pass in a character type (single quote), not a string type (double quotes) for the second arg

julia> typeof(',')
Char
julia> typeof(",")
ASCIIString (constructor with 2 methods)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment