Re: [R] Importing data using Foreign

2020-08-27 Thread Elham Daadmehr
lem that x[NA] would differ from x[as.integer(NA)] because NA is of > mode "logical", lowest in the coercion hierarchy. > > -pd > > > On 26 Aug 2020, at 17:06 , Elham Daadmehr wrote: > > > > Thanks guys. but I'm a bit confused. the input is the first column >

Re: [R] Importing data using Foreign

2020-08-27 Thread Elham Daadmehr
ow us the commands that (a) confirm there are no NA's in the first > column of z > and (b) output a row of z that has an NA in the first column. > Here's how one might do this: > (a) sum(is.na(z[,1])) > (b) z[ match(TRUE, z[,8] %in% c("11","12","14")), ] &g

Re: [R] Importing data using Foreign

2020-08-27 Thread Elham Daadmehr
> >> Offhand, I suspect that the NAs are in the 8th column. >> >> > On 26 Aug 2020, at 10:57 , Elham Daadmehr wrote: >> > >> > Hi all, >> > >> > I have a simple problem. I get stuck in using the imported spss data >> (.sav) >>

[R] Importing data using Foreign

2020-08-26 Thread Elham Daadmehr
Hi all, I have a simple problem. I get stuck in using the imported spss data (.sav) using "read.spss". I imported data (z) without any problem. After importing, the first column doesn't contain any "NA". but when I choose a subset of it (like: z[z[,8]=="11"|z[,8]=="12"|z[,8]=="14",]), lots of NA

Re: [R] About "SpatioTemporal" Package

2016-07-13 Thread Elham Daadmehr via R-help
-60101:60128 to: ID<-paste("ID",60101:60128,sep="") and see what happens. Jim On Wed, Jul 13, 2016 at 8:29 PM, Elham Daadmehr via R-help <r-help@r-project.org> wrote: >  Dear all, > >  I want to build the data with the structure of STdata (using the >  functio

[R] About "SpatioTemporal" Package

2016-07-13 Thread Elham Daadmehr via R-help
  Dear all,  I want to build the data with the structure of STdata (using the function "createSTdata()"), I did as the following: datst=cbind(xy) yy=cbind(y,xx) ID=60101:60128 date=as.numeric(1:13) y1=as.data.frame(t(cbind(yy))) datst1=as.data.frame(cbind(ID,datst))

[R] From deldir

2014-05-17 Thread Elham Daadmehr
Dear all, Please guide me in following situation. I use these function from deldir package.   x - runif(20)   y - runif(20)   z - deldir(x,y,rw=c(0,1,0,1))   w - tile.list(z)   plot(w)   ccc - heat.colors(2)   plot(w,fillcol=ccc,close=TRUE) Is each cell red with