On 10 Dec 2015, at 08:27 , phgrosj...@sciviews.org wrote:

> library(tcltk)
> methods(class = "tclArray")
> 
> ## [1] [[       [[<-     $        $<-      length   length<- names    names<- 
> ## see '?methods' for accessing help and source code
> 
> It should be something like `[<-`. But this one is not defined. Perhaps can 
> you contribute one here?

However, first ensure that you understand the section about Tcl arrays on the 
help page, and its implications. In particular, logical indexing and 
multidimensional indexing would never work.

-pd


> Best,
> 
> Philippe Grosjean
>> On 10 Dec 2015, at 01:00, Cleber N.Borges <kle...@yahoo.com.br> wrote:
>> 
>> hi all,
>> there is a vectorinzing version of  "[[<-" for "tclArray" class ?
>> TIA
>> cleber
>> #####
>>> library(tcltk);  getS3method("[[<-",'tclArray')
>> function (x, ..., value)
>> {
>>   name <- as.character(x)
>>   i <- paste(..., sep = ",")
>>   if (is.null(value))
>>       .External(.C_RTcl_RemoveArrayElem, name, i)
>>   else {
>>       value <- as.tclObj(value)
>>       .External(.C_RTcl_SetArrayElem, name, i, value)
>>   }
>>   x
>> }
>> <bytecode: 0x000000000e7ab608>
>> <environment: namespace:tcltk>
>>> 
>> 
>> 
>> ---
>> Este email foi escaneado pelo Avast antivĂ­rus.
>> https://www.avast.com/antivirus
>> 
>> ______________________________________________
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> 
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd....@cbs.dk  Priv: pda...@gmail.com

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to