Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#170 Problem with emu.track() and "dft"

open-works-for-me
Tina John
None
5
2012-02-14
2012-02-14
Anonymous
No

Starting a new thread for this because it's a different problem to the one the last poster was having.

I'm trying to read spectral data into R using emu.track(). The data ("dft") are available, according to trackinfo(). Tested it using "fm" and "F0"; these work fine, but "dft" doesn't:

test.dft<-emu.track(seglistname, "dft")

gives this error:

"Error in seq.default(0, samfreq/2, length = ncol(data)) :
argument 'length.out' must be of length 1"

I have made emu.track() do this with "dft" successfully before (in R 2.4.1 & Emu/R 2.3, and with R 2.7.2 & Emu/R 4.0), but now in R 2.14.1 & Emu/R 4.2 it fails.

Tried to get patch 2966313 (emu.track.S) in case that would help, but it will not load; gives this error:

"Error in source("C:/restofpath/emu.track.S") :
C:/restofpath/emu.track.S:1:9: unexpected '<'
1: <
^"

Any solutions or help would be very much appreciated!

Current setup: Emu 2.3, R 2.14.1, Emu/R 4.2 on Win XP

Discussion

  • Tina John
    Tina John
    2012-02-14

    The Patch is the right one to use. It works for me. Download the file again. It is attached here. Make sure that the downloaded file is raw text. It should look like this:

    ##############################################################################
    ## #
    ## copyright : (C) 2000 SHLRC, Macquarie University #
    ## email : Steve.Cassidy@mq.edu.au #
    ## url : http://www.shlrc.mq.edu.au/emu #
    ## #
    ## This program is free software; you can redistribute it and/or modify #
    ## it under the terms of the GNU General Public License as published by #
    ## the Free Software Foundation; either version 2 of the License, or #
    ## (at your option) any later version. #
    ## #
    ##############################################################################

    ## we need a canonical way of working out what platform we're running
    ## on, R and S differ and even versions of R have different os settings...
    emu.platform <- function(what) {
    if( is.R() ) {
    if(version$platform == "Windows" ||
    version$os == "Win32" ||
    version$os == "mingw32") {
    return(what == "Windows")
    } else if (
    version$os == "MacOS" ||
    substr(version$os,0,6) == "darwin" ) {
    return(what == "MacOS")
    } else {
    return(what == "Unix")
    }
    } else {
    if( version$platform == "WIN386" ) {
    return(what == "Windows")
    } else {
    return(what == "Unix")
    }
    }
    }
    ...

     
  • Tina John
    Tina John
    2012-02-14

    • assigned_to: nobody --> rasnatty
    • status: open --> open-works-for-me
     
  • Tina John
    Tina John
    2012-02-14

    source in R via source("emu.track.S")

     
    Attachments
  • Hi, thanks for the quick reply!

    I'm sorry if I'm being dense, but when I click the download link for the .S file, either on here or on the patch page, in the saved file, all I get is the page source (i.e., HTML/JavaScript). It doesn't matter if I select 'open' or 'save'... Am I doing something wrong?