similar to: linear regression on groups of consecutive rows of a matrix

Displaying 20 results from an estimated 1000 matches similar to: "linear regression on groups of consecutive rows of a matrix"

2009 Nov 21
7
consecutive numbering of elements in a matrix
Within a very large matrix composed of a mix of values and NAs, e.g, matrix A: [,1] [,2] [,3] [1,] 1 NA NA [2,] 3 NA NA [3,] 3 10 17 [4,] 4 12 18 [5,] 6 16 19 [6,] 6 22 20 [7,] 5 11 NA I need to be able to consecutively number, in new columns, the non-NA values within each column (i.e. A[1,1] A[3,2] and A[3,3] would all be set to one, and
2006 Nov 30
2
*** caught segfault *** error
Dear R users, I use R 2.4.0 on an iMac running Mac OS X 10.4.8, with a 2.16GHz Intel Core 2 Duo and 2GB 667 MHz DDR2 SDRAM. > sessionInfo() R version 2.4.0 (2006-10-03) i386-apple-darwin8.8.1 locale: es_ES.UTF-8/es_ES.UTF-8/es_ES.UTF-8/C/es_ES.UTF-8/es_ES.UTF-8 attached base packages: [1] "methods" "stats" "graphics" "grDevices"
2008 Jan 27
2
maptools no such file
Hello, I'm having problems reading a shapefile with read.shape (maptools). I'm absolutely sure my file is there, but I get "no such file". The wd is ok, since read.table for example does find the file. > getwd() [1] "D:/somedirectory/R scripts" > read.table("cities.shp") Error in read.table("cities.shp") : empty beginning of file In addition:
2012 Feb 22
1
How can I save plot()/points() using SHP files into KML format?
Hi, I am new to R and am a very basic user. I'm importing SHP files, adding plots of random locations within my polygon (these files have GPS data), and then want to save these plots (intact with added points) as KML files to look at in GoogleEarth (or possibly as SHP files which I can then convert into KML). This is as far as I've gotten (code below) and am lost as to next steps, Any
2008 Mar 11
2
Error opening SHP file (maptools)
I am having difficulty loading a points shapefile (1600 records) I generated from ArcGIS as a PointsSpatialDataFrame using the maptools readShapePoints function. library(maptools) surveypts <- readShapePoints(system.file("C:/temp/survey.shp", package="maptools")[1] Error in getinfo.shape(filen) : Error opening SHP file I've tried numerous re-exports and renames of the
2012 Dec 23
1
Calling a .bat to set environment variables and subsequent .exe execution from within R
Dear list, I have found a thread dealing with similar problems with a Mac, but somehow I cannot get it to work and the problem is slightly different: I am using the shell() command to execute a program from within R. The problem is that I need to execute SDKShell.bat file first that sets the environment variables for the program ogr2ogr.exe: shell(cmd =
2017 Jun 20
2
Problem with shortestPath in igraph and qgraph
hello, I have a graph and i use qgraph package to calculate centrality parameters. Now I want to know the maximum value of shortest path for each vertex with discarding the Inf value in short pathes. For this I use the ShortestPathLengths of centrality function in qgraph. but when I want to get the maximum the result is wrong. here is my code: cen<-centrality(Q)
2012 Dec 29
1
Problem to load a shape file
Dear all, I've been puzzled why I not able to load a shapefile from a connection. Does anyone here can give a reasonable answer? When I try the following script I got this error: Error in getinfo.shape(fn) : Error opening SHP file #Reproduction temp <- tempfile() download.file("http://metodologiapolitica.com/download/Brasil.zip",temp) shp.br <- readShapePoly(unzip(temp,
2008 Jan 14
2
Need help with xspline error message in R 2.6.1 on Windows XP
I am attempting to generate a series of plots with cubic B-Splines and the code I am using is generating the following error message that I have been unable to resolve. Error in grid.Call.graphics("L_xspline", x$x, x$y, x$shape, x$open, x$arrow, : add_point - reached MAXNUMPTS (25200) This is the code that generates this error. plot.results <- function(dfn) { dt <-
2017 Jun 21
0
Problem with shortestPath in igraph and qgraph
Hard to follow data analysis without data. Try making your example reproducible [1][2][3] and post in plain text (a setting in your emailer). Read the Posting Guide mentioned in the footer to avoid other posting pitfalls. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example [2] http://adv-r.had.co.nz/Reproducibility.html [3]
2023 Feb 23
1
WERR_INTERNAL_ERROR on samba-tool domain join
> You can ignore anything after 'Join failed', the join error has already > happened and it looks like a replication problem. Does the first > Nameserver in /etc/resolv.conf point to the first DC ? > How is /etc/hosts setup ? > > Rowland /etc/resolv.conf ----------------------------------------- # Generated by NetworkManager search privatedomain.com nameserver
2012 Oct 10
2
mapa municipios Andalucía con R
Hola a todos. Estoy utilizando R , más concretamente los paquetes maptools y sp, para realizar mapas de España por comunidades y provincias y de Andalucía por provincias y municipios. El caso es que para el mapa de municipios en Andalucía, una vez leído el fichero shp con readShapePoly , si luego por ejemplo , quiero poner todos los polígonos de un color utilizando library(maps)
2004 May 03
1
Speed up graphics output?
Hi all, I've written some code to generate 4 maps per screen and write the output to a jpeg. The output is fairly quick at the start (about 5 jpegs per minute) and then slows down greatly (1-2 jpegs per minute). Is there some way to speed it up? One of my thoughts is to keep the base map static on the screen and just update the points that are being plotted on the map (with the exception
2008 Mar 29
3
Generating maps in R
Greetings! I am trying plot some data on a map in R. Here's the scenario. I have a variable called probworkinghealthy which contains a predicted probability of employment for every individual in my sample (about 100,000 observations). I have another variable, called a001ter, which contains the subject of residency in the Russian Federation (akin to a US state) for every individual in the
2007 May 21
1
Graphically show population density for a specific geographic area using R
Hi, we all know that R is powerful in dealing with graphics. I am now trying to use R to show some geographic attributes for a specific geographic area on a graph. For example, if I would like to generate a graph showing the population densities (in terms of the intensity of colors) for Illinois State by zip codes. I did some research; and it seems that package "maptools" is
2004 Feb 25
2
writing polygons/segments to shapefiles (.shp) or other ArCGIS compatible file
I am not sure a previous e-mail reached the list (no mail aknowledgement from R-boundle etc.). The question was how to write polygon or segment coordinates into a shapefile set or any other ArcGIS supported format. The library shapefiles seems to do something but the documentation is a bit beyond of my mind.... and I cannot get the meaning of the functions write**** and its application to the case
2008 Dec 04
2
Plotting a kriging on a map
Hi list, Well, this time I’ve a doubt with mapping generation. I was already able to read and plot shapefiles, plot point on this map. All this without any problems, but now I want to do something that I think, only Golden Software Surfer is capable of. I would like to plot a kriging result on the existing map (map script below). Well I looked for on the net, but I was not able to be sure of
2016 Apr 06
1
Plotting data on a map
Hello, I would like to generate a small map (say 10cm x 10cm) of France showing cumulative numbers by Distribution Center stored in a database: DISTRIBUTION_CENTER COUNT Paris 122 Paris 3 Paris 21 Lyon 12 Lyon 4444 Lyon
2011 May 01
1
vector file
Dear All   I want to import the vector file (   .shp) to R. I could import the file by rgdal package before, by following:   geology<-readOGR('C:/geology//saga/geo.geom','finalgeology')   but now there is an error:   Error in ogrInfo(dsn = dsn, layer = layer, input_field_name_encoding = input_field_name_encoding) :           GDAL Error 4: .shx file is unreadable, or corrupt.
2009 Oct 28
2
Re ading and Creating Shape Files
Hello R Community, I have imported a dataset which contain X Y coordinates and would like to recreate a shape file after some data analysis. What i have done is to import some taxlot data and join them based on some criteria. I want to check to see how well the joining went by reviewing the results in GIS. A couple things. I cant seem to import a shape file correctly using the maptools