Christian Schulz wrote:> hi,
> know anybody why this happen ?
> I'm using winedt , the old code saved in an .R
> call syntax error's. Curious is, when i'm type below
> the same code , it works ???
>
> ...imho a print type problem, what i'm never before observed and
> can't recognize with my eyes ?
>
> P.S. R.1.6.1 /w2k
>
> thanks for advance
> & regards,christian
>
So what are you doing? It looks like you didn't use source(), but
copy&paste for your "old" code?
>>>getfile <- function() {
Where do the *three* ">" come from?
> + name <- tclvalue(tkgetOpenFile(filetypes="{{SPSS
files} {.sav}} {{All files} *}"))
> Error: syntax error
WinEdt is a powerful editor - that includes many ways for
misconfiguration. You might want to look with an appropriate editor
(e.g. any hex editor) into what you have produced ...; this can be done
by WinEdt as well: Open the file in the standard WinEdt in mode
"binary"
- it won't show you exact results, but at least it marks non blanks and
line endings differently.
Uwe Ligges
>>> if (name == "") return;
>
> Error: syntax error
>
>>> zz <- read.spss(name, use.value.label=T, to.data.frame=T)
>
> Error: syntax error
>
>>> assign("myData", zz, envir = .GlobalEnv)
>
> Error: syntax error
>
>>>}
>
> Error: syntax error
>
>>>tt <- tktoplevel()
>>>button.widget <- tkbutton(tt,text="Select SPSSFile",
command=getfile)
>
> Error in .Tcl.args(...) : Object "getfile" not found
>
>>>tkpack(button.widget)
>
> Error in .Tcl.args(...) : Object "button.widget" not found
>
>>>
>>>getfile <- function() {
>
> + name <- tclvalue(tkgetOpenFile(filetypes="{{SPSS Files}
{.sav}} {{All files} *}"))
> + if (name=="") return;
> + zz <- read.spss(name,use.value.label=T,to.data.frame=T)
> + assign("myData",zz,envir=.GlobalEnv)
> + }
>
>>>tt <- tktoplevel()
>>>button.widget <- tkbutton(tt,text="Select SPSS
File",command=getfile)
>>>tkpack(button.widget)
>
> <Tcl>
>
>
> [[alternate HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help