[R] convert to grid file
Petr PIKAL
petr.pikal at precheza.cz
Thu Sep 1 14:59:47 CEST 2011
Hi
>
> Hi
>
> I computed probability in each cell.
> I have:
>
> [99883,] -0.0062412957690
> [99884,] -0.0062412957690
> [99885,] -0.0062412957690
> [99886,] -0.0062412957690
> [99887,] -0.0062412957690
> [99888,] -0.0062412957690
> [99889,] 0.9909126638948
> [99890,] 0.9909126638948
> [99891,] 0.9909126638948
> [99892,] 0.9909126638948
> [99893,] 0.9909126638948
> [99894,] 0.9909126638948
> [99895,] 0.9909126638948
> [99896,] 0.9909126638948
> [99897,] 0.9909126638948
> [99898,] 0.9909126638948
> [99899,] 0.9909126638948
> [99900,] 0.9909126638948
> [99901,] 0.9909126638948
> [99902,] 0.9909126638948
> [99903,] 0.9909126638948
>
> [99999,] -0.0062412957690
> [ reached getOption("max.print") -- omitted 839931 rows ]]
>
> How want to convert this matrix to a grid file with 970*960 pixel.
Assuming your object is one column matrix called mat1
You can simply change its dimension
dim(mat) <- c(970, 960)
regards
Petr
>
> Thanks alot
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
More information about the R-help
mailing list