r programming and usage

  1. C

    Basic questions from newbie

    Hi, I am currently learning ML algorithms and implementing in R. I have a couple basic questions. 1.)Is dimensionality reduction same as feature selection? I know that in R specifying importance=T parameter in randomForest function gives you the important features based on info.gain.I was...
  2. D

    How to create .tar.gz file in Rstudio-Windows

    I am trying to create an R package by using "Rstudio" for the first time ^_*. Actually, I wrote all the functions in several "R scripts" and the documentation by using roxygen2. I loaded and built (Ctrl+Shift+B) and it works "DONE(packageName)", I used roxgen2::roxgenise() for documentation...
  3. S

    Output In R

    Hello All, As i am a newbie in R so most of you would have seen this question zillion times. I searched for the answer on this forum as well on other various forums however could not find the answer i am looking for. I am dplyr package and used a very basic code...
  4. S

    Finding the best way to prepare raster image for a function

    Hello all, I'd like to ask what is the best way to prepare big raster images in R to run a function on whole images. I have 30 tiff images with the size of ncol=12648, nrow=4144. I read them in R separately. Then, I stacked all 30 raster images into one. Now the image size is ncol=12648...
  5. S

    How to crop an image into small sections automatically in R

    Hello all, I'd like to crop an image into 15 sections in R. The image projection is Geog lat/long, extending 87 to 120 degree in East and 45 to 55 degree in North. I want to separate it by every 2 degree. So I have 17 degree in X coordinate and 5 degree in Y coordinate. 17 x 5= 85 sections...
  6. S

    How to read multiple images automatically in R?

    Hello all, I have 30 tiff images in the same folder. The name of files are btv_2000097, btv_2000105 ....until btv_2000297. I can read them one by one in R, and then stack all individual layers into a raster object with 30 layers. I have 15 year images. Totally more than 300 images...
  7. S

    Error with "lowess" function in R

    I have a problem with lowess function to smooth time series NDVI (8-day image from apr to oct in Julian day) as a function of time by polynomial regression in R. Here is the scripts I run: #Create a time vector to act as x time<-sort(sample(97:297, nlayers(ndvi2000crop1)))...
  8. A

    Is the transpose of a g inverse the g inverse of transpose of the matrix?

    While working with linear models,I came across the situation where the proof of some results might be easier if we apply that transpose of g inverse is g inverse of transpose of a matrix.In R this codes library(MASS) x1=c(1,0,1,1) x2=c(3,6,5,2) x3=c(2,4,6,1) x4=c(3,5,2,1)...
  9. M

    Generating spatially uncorrelated random fields

    I have DEM (cellsize 10x10 and cells.dim 450x300) and I need to create 100 random error grids that have the same dimensions as the DEM. The values in the error grids are generated from a normal distribution that has mean of zero anda standard deviation equal to the RMSE of original DEM ~ (0...