If you control the package, you could use dirname(@__FILE__) 

kl. 10:49:33 UTC+2 fredag 20. juni 2014 skrev Michael Hatherly følgende:
>
> Pkg.dir("PACKAGE_NAME") will give you the full path to a package. It 
> doesn't check whether that package exists though, so you'll need to do that 
> manually.
>
> On Friday, 20 June 2014 09:47:22 UTC+2, Tomas Krehlik wrote:
>>
>> Is there a way how to dynamically reference a file within given package? 
>> My problem is that I want to include some sample data and then reference 
>> them by some simple command. I was thinking that there might be something 
>> like
>>
>> packageData("nameOfPackage","filename")
>>
>> which would return the path to the file within data folder in some 
>> package. This value could then be wrapped within readcsv or something like 
>> that.
>>
>>

Reply via email to