Displaying 20 results from an estimated 2000 matches similar to: "saving all data in r object"
2012 Feb 14
4
save output of loop
I have some data files e.g 100 . and after for loop I would like to save all
data in one single data frame
file_s <- list.files(path = ".", pattern = "v2.0.2.txt", all.files = FALSE,
full.names = FALSE, recursive = FALSE,
ignore.case = FALSE)
for (i in 1:100){
data = read.table(file_s[i],header=TRUE)
lat = data[,7] # latitude
lon
2012 Mar 07
4
add data from .RData file
I got two .RData file e.g data.2005.RData & data.2006.RData
I would like to combine these two different data set and make single RData
file.
in both file there are some NULL files are also available and I would like
to clear this NULL files also.
$ : NULL
$ : NULL
$ : num [1:43285, 1:8] -21.1 -21.1 -24.9 -24.9 -24.9 ...
..- attr(*, "dimnames")=List of 2
.. ..$ : NULL
..
2009 Mar 06
1
help to use ppp in spatial analysis
Hi,
i am using spatstat package for spatial data analysis and now i have a problem to create a point pattern. The points are in file "points.txt" (first column for Latitude and second column for Longitude ) and I imported them and separated each columns in two arrays x and y. If I plots x and y ( e.g plot(x,y) ) the result appears in square area without problems and the scale is
2006 Dec 14
7
loop is going to take 26 hours - needs to be quicker!
Dear R-help,
I have a loop, which is set to take about 26 hours to run at the rate it's going
- this is ridiculous and I really need your help to find a more efficient way of
loading up my array gpcc.array:
#My data is stored in a table format with all the data in one long column
#running though every longitute, for every latitude, for every year. The
#original data is sotred as
2012 Mar 16
2
plotting border over map
I am using following codes to plot map
library(sp)
library(rgdal)
library(maps)
library(gplots)
library(clim.pact)
library(fields)
source("/R/PlotGridded2DMap.R")
source("/R/image.plot.fix.R")
source("/R/image.plot.plt.fix.r")
seasonal_plot<-function(input,lonll=-180,latll=-90,lonres=5.,latres=3.75,write_file=TRUE,The_title=NULL){
if(is.null(The_title)){
2009 Oct 03
3
How to deal with this :" object ' obs' not found.
Hi guys,
I need your help.
I'm trying to sort the data by the variable "obs".
This is how I tried to sort the data below.
The problem is, I have a variable name "obs"; this is.. a counter variable.
something like _n_ in SAS.
I do not know why it is not working.
I even tried a similar example in UCLA webpage:
http://www.ats.ucla.edu/stat/R/faq/sort.htm :it also does not
2009 Nov 12
1
barplot at specific x values
Dear useRs,
I search for a possibillity to plot stacked bars at specific x positions.
I tried and tried, but the only way i got something adequate was by using lowlevel plots segments(). That is quiet ok, but will not please eyes without a lot of par() lines.
dh<-data.frame(longitude=abs(rnorm(5)),deers=abs(rnorm(5)),humans=abs(rnorm(5)))
plot(dh$longitude,apply(dh[,2:3], 1,
2013 Jan 21
2
Regex for ^ (the caret symbol)?
Hello R-helpers,
I am trying to search for string that includes the caret symbol, using the
following code:
grepl("latitude^2",temp)
And R doesn't like that. It gives me:
> temp<-c("latitude^2","latitude and latitude^2","longitude^2","longitude
and longitude^2")
> temp
[1] "latitude^2" "latitude and
2012 Jun 05
2
Converiting longitude/latitude to utm
Dear all,
I have been trying to convert coordinates from longitude/latitude to utm
but I got an error. As soon as the longitude coordinate is greater than 90,
I get the folloowing error message: "error in pj_transform: latitude or
longitude exceeded limits"
Here is what I did:
SP<-SpatialPoints(cbind(126.59,-14.30),proj4string=CRS("+proj=longlat"))
2002 Oct 02
6
help to make a map on R
Hi all,
I need a little help for construct an state's map on R.
The first problem is to get the data.
I have a datafile of longitude and latitude in the follow format:
trajectory latitude longtude
T -22.045618 -51.287056
T -22.067078 -51.265888
T -22.067039 -51.207249
T -22.059690 -48.089695
T -22.075529 -48.074608
T -22.072460 -48.044472
T -22.062767 -48.298473
T -22.077349
2012 Feb 15
2
Plotting monthly maps from yearly data
I have some data set which is available from 2005-2010 . I would like plot
monthly maps out of it.
So how I should write loop that can plot this yearly data to for every month
and write title for individual months too.
--
View this message in context: http://r.789695.n4.nabble.com/Plotting-monthly-maps-from-yearly-data-tp4391704p4391704.html
Sent from the R help mailing list archive at
2008 Jul 15
3
Melt (reshape) question
Dear all,
I
have a grid of 720 columns by 360 rows of global population density
values, and hope to convert this to column format using the 'melt' command in the 'reshape' package. I'm not receiving
any errors as such, but when the code has finished running, my output
looks like this:
> head(PopDens.long)
Latitude Longitude PopDensity
1 -84.75 V1 0
2
2002 Mar 10
1
lattice library: xyplot and polygons
Dear R-Helpers,
Is there a way to draw shaded (filled) polygons in panel graphs produced
by xyplot ? I made different trials (see below) with polygon() and
grid.polygon() but polygons are not drawn (probably for the same reason
that prevents the use of lines, points, etc. in xyplot panels).
Thanks in advance,
Renaud
> Water
id label longitude latitude
515 21 Zone inondable
2012 Sep 19
2
Help reproducing a contour plot
Hi All,
I am trying to reproduce this using R instead.
[image: Full-size image (38 K)]
I tried using the following code
*SChla <- read.csv("SM_Chla_data.csv")*
*Atlantis <- SChla[16:66,]*
*head(Atlantis)*
*
*
Seamount Station Depth Pico Nano Micro Total_Ch dbar Latitude
Longitud
16 Atlantis 1217 Surface 0.0639 0.1560 0.0398 0.2597 2.082 -32.71450
57.29733
2009 Aug 25
2
latitude and longitude distribution
Good day to you all,
I have lightning data containing date, time, latitude and longitude. I hope
that distribution of latitude and longitude will give number of lightning
occurrence in a region. I have used factor function to sum up the number of
events on latitude and longitude axis and saved as x and y. But when I tried
to plot the two, I had and error message ( Error in image.default(x, y, z) :
2009 Aug 17
3
Reshape package: Casting data to form a grid
Dear R Users,
I'm trying to use the 'cast' function in the 'reshape' package to convert column-format data to gridded-format data. A sample of my dataset is as follows:
head(finalframe)
Latitude Longitude Temperature OrigLat p-value Blaney
1 -90 -38.75 NA -87.75 17.10167 NA
2 -90 135.75 NA -87.75 17.10167 NA
3 -90 80.25
2012 Sep 14
2
plotting points on a map, assigning vectors to values from dataset
Dear everyone, as a newbie I fear I have made an easy mistake and am just too
blind to see it. Can anyone help me seeing the (possibly) obvious?
I have a command that creates a map of South America. In a separate
txt-file I stored data about latitude and longitude of languages, and in a
third column values that differ from language to language. The command
should read that file and assign the
2009 May 01
1
Problems with 'valid columns' when using merge
Dear all,
I am trying to use 'merge' within a loop, however, I receive an error relating to the 'by' argument of the command, as follows:
> merge_year <- 1986
>
> for (i in 1:10) { # Number of file pairs
+ assign(paste("merged_arunfek_", merge_year, sep=""), merge(x=paste("arunoff_",start_arunoff, sep=""),
2013 Oct 31
2
Make Multiple plots in R
Dear All,
I would wish to make multiple plots and give title/ headings same time, is there a simpler/ tidier way compared to below(, especially the headings as they are missing)? See output attached.
#####################################Making multiple Plots start########################
plot(mybrick9, y = 2, col = terrain.colors( length(seq(0,1, by = .2))-1),breaks= seq(0, 1, by = 0.2), axes =
2010 Oct 06
2
Help to trafnsform data!
Dear R users,
I have huge dataset like the bellow (prepared in notepad in txt format:
31;39;00N+65;40;00E T
36;31;42N+69;04;21E T
34;10;00N+69;41;00E T
34;34;00N+69;06;00E T
31;40;00N+65;44;00E T
35;00;00N+69;07;00E T
34;00;00N+69;53;00E T
These are geographical coordinates, degree minute, seconds.
latitude longitude
31;39;00N+65;40;00E T
I would like to plot them on the map. I would