search for: wzorzec1

Displaying 2 results from an estimated 2 matches for "wzorzec1".

2009 Aug 13
1
write result in matrix using loop
Hello, I want call my function (use my database) and write every result in matrix "wynik" but I always get an error: Error in wynik[, i] <- dodawanie(wzorzec, wzorzec1) : number of items to replace is not a multiple of replacement length I'll be very happy if sb help me dodawanie<- function ( wzorzec, wzorzec1){ wynik1<-wzorzec + wzorzec1 wynik2<-wzorzec * wzorzec1 wynik <- c(wynik1,wynik2) return (wynik) } df=data.frame(a=c(1,2,3),b...
2010 Aug 16
1
xyplot - I can't find colors in my picture
Hi, Anybody can tell me why I don't have colors in my picture? library(lattice) my.pch<-c(17,16,15,18,20,9,10,12) my.fill<-c('yellow','black','green','red','blue','cyan','magenta','pink') wzorzec1<- c(1,3,2,4,6,4,2,3) wzorzec2<- c(5,3,6,6,2,3,4,1) a<-factor(wzorzec1) b<-factor(wzorzec2) n1<-c(11,22,33,22,5,22,33,24) n2<-c(4,3,5,7,8,4,3,2) xyplot(n1~n2, panel=function(x,y, ...,subscripts) { pch <- my.pch [a[subscripts]] fill<- my.fill [b[subscripts]]...