Home >


  • R: Show upper and lower bound y-axis in ggplot

    R: Show upper and lower bound y-axis in ggplotMay 4

    I can't seem to get the lower and upper bound of y to show in ggplot. library(ggplot2) ggplot(data,aes(x=n,y=value,color=variable)) + geom_line()+ labs(color="Legend")+ scale_x_continuous("x",expand=c(0,0), breaks=c(1,2,5,10,30,60))+ s

  • Convert xy spatial points into spatial lines

    Convert xy spatial points into spatial linesApril 8

    I have produced a SpatialPoints object (named v3) in R from the function gIntersection (package rgeos). The SpatialPoints object v3 has the following structure and is represented by red points on the image below. > summary(v3) Object of class Spatial

  • Suppress warnings in specific user defined functions in RJanuary 10

    I have a user-defined R function to write an output of my algorithm. To simplify everything, it looks like following: writeMyOutput <- function (fileName="myOutput.txt"){ fileConn <- file(fileName) method <- "BFGS" nIter <-

  • How to apply value labels to the selected variables?January 9

    i have a .sav file from SPSS which contains data from a survey conducted by means of a questionnaire. I tried to open this .sav file in R but i have a problem with replicating the structure of the original data file. It means that in the original dat

  • Downloading NOAA AVHRR NDVI using RDecember 12

    I am using this code to automatically download NDVI data from 1981-2013.The code is provided here Gimmis packageThe data is available here NDVI Data. However after running it shows that data has been downloaded but nothing in the download folder. Wha

  • How to remove N rows, according to two condtionsSeptember 11

    My question follows on from How to find tail rows of a data frame that satisfy set criteria? and as such, my (updated) sample data is structured as: Individ <- data.frame(Participant = c("Bill", "Bill", "Bill", "Bill&

  • Polygon in R "stopping" at the diagonal

    Polygon in R "stopping" at the diagonalSeptember 10

    After getting help on a related question, I set out to reproduce the results "manually" and produce an identical ROC curve. This almost worked, except for two details. One, I can't change the limits of the y axis on the plot to the left; and two

  • How to remove points which are out of shapefile (or raster) extent

    How to remove points which are out of shapefile (or raster) extentJanuary 30

    My problem is quite simple. I have thousands of points (coordinates) to analyse, however some of them are so inaccurate that they "hit" the sea. I need to get rid of them. I was trying to find some R function which is capable to filter (delete)

  • Perform kriging on google map in R? [on hold]January 29

    I am trying to do kriging on my data. My data is like this: lon lat abundance 111 111 11111 . . . . . . . . . Can you introduce some notes or sites to help me? The output that I am looking for is to plot the results of kriging on google map.

  • Fisher.test returning need to have at least 2 rows and colums??January 7

    When running I am continuing to get an error. I am not sure how to make it able to run with more rows and colums or did the previous code not set it up to run correctly. Error in fisher.test(table(previous.demand, current.demand)) : 'x' must have at

  • Check if two intervals overlap in RDecember 3

    Given values in four columns (FromUp,ToUp,FromDown,ToDown) two of them always define a range (FromUp,ToUp and FromDown,ToDown). How can I test whether the two ranges overlap. It is important to state that the ranges value are not sorted so the "From&

  • Operation on new data.table affects old data.tableNovember 11

    I'm having trouble with the data.table package in R (v1.9.6). I'm not sure what I'm doing wrong. Any help is much appreciated. I create a data.table and then assign this to a new variable. So now I have two data.tables. I then perform an operation on

  • How can the Python runtime be embedded in an R package that runs on WindowsAugust 17

    We wish to create an R package that wraps the Python runtime and is 'dependency free' (e.g. one need not install Python for the R package to work). There is already a package that allows R to call Python (CRAN package rPython) but it requires that Py

  • R: Insert Variable into RMongo commandAugust 14

    I am currently using the RMongo package to provide an interface between R and MongoDB. I am querying MongoDB and parsing out objects by their individual ID. An example of how this is done is given below: library(RMongo) mongo <- mongoDbConnect("te

  • Sort Dataframe by Column in Descending OrderAugust 10

    This is for R. I have a dataframe called data. I have six columns: Date Open Close Volume Adj. Close Range I want to sort by column range in descending order. I tried using order() but when I input -Range, I'm receiving an exception: newdata <- data[

  • Convergence issues LME4 version 1.1-11August 7

    I was working with a student, running some models with GLMER and we found that, using the same code, the models would converge for me and not for him. i.e. he would get an error message like the following: Warning message: In checkConv(attr(opt, "der

  • How to get the full address when ~ exist in addressAugust 7

    I am trying to use rgdal::readOGR in my package and provide an example which will be distributed with my package. When trying to create the vignette I encounter a problem which I do not know how to address the best. this is the address to the folder

  • Spatio-temporal kriging - useful if not interpolating to new time points?May 4

    I have data measuring a variable Z say at several locations on a fixed network (each location at a fixed longitude and latitude). values of Z are measured daily at the same time. At the moment I am employing ordinary Kriging to interpolate values for

  • buffer in spsample for distance between randomly selected pointsMay 3

    I wanted to know if there is a way to add a buffer in the function spsample in the sp package. I am randomly selecting points within 28 polygons and would like to specific a minimum distance the points can be from each other. The examples I have foun

  • Generating time series for generator ON or OFFMarch 14

    Want to create time series for the nuclear power plant performance using the equation for Time to fail and time to repair for 8736 hours in the year so that I have the time series in hours when the generator is operating in when is not. The starting

Copyright (C) 2018 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 13 q. 0.671 s.