similar to: setting different environments

Displaying 20 results from an estimated 1000 matches similar to: "setting different environments"

2008 Jul 25
0
Error in vector("double", length)
Please see the code below. When I try to run the variogram - vg.deft<-variog(rd,uvec=10) I keep getting this error- variog: computing omnidirectional variogram Error in vector("double", length) : vector size specified is too large Also, when I try to define distance-based neighborhood - nb.tr=dist.neighbors(tr.locs,2) I get this error - Error in vector("double", length) :
2009 Jan 28
1
Neighborhood distance calculator
Hi all, I am new to R, hence this question. I have a set of points with X and Y coordinates. I would like to build an R code to calculate the distances of points within a specified neighborhood (circular range) for each point. I would like the code to be a function, so that I can call the function, specifying parameters (data file, distance), from another piece of code. Also, I would like the
2005 Nov 11
3
problems with for: warnings and segfault
Hi, I have two problem with a for looping using R Version 2.1.1 (2005-06-20) on a Debian Linux Testing. The first problem: warnings messages Look: > xcoord <- 5 > ycoord <- 5 > indice <- 1 > for(i in c(1:5)) {indice <- indice+1;xcoord[indice] <- xcoord+i; ycoord[indice] <- ycoord } Warning messages: 1: number of items to replace is not a multiple of replacement
2008 Dec 15
1
Semi-random movement inside a circle
Dear list, I am trying to program semi-random movement within a circle, with no particles leaving the circle. I would like them to bounce back when they come to close to the wall, but I don't seem to be able to get this right. Would somebody kindly give me a hint ? This is my code so far, the particle starts at some point and moves towards the wall, but I don't get the "bouncing
2008 Dec 15
1
Movement within a circle
Dear list, ? I am trying to program semi-random movement within a circle, with no particles leaving the circle. I would like them to bounce back when they come to close to the wall, but?I don't seem to be able to get this right. ?Would somebody?be able to?give me a hint ? This is my code so far, the particle starts at some point and moves towards the wall, but I don't get the
2009 Jul 09
1
Creating and Using Objects in R
Dear All, I am not very into object-oriented programming, but I would like to learn the ropes for some R applications. Quoting from the online R language definition (paragraph 5.1) > Consider the following simple example. A point in two-dimensional > Euclidean space can be specified by its Cartesian (x-y) or polar > (r-theta) coordinates. Hence, to store information about the location
2002 Apr 10
0
FoxPro Regressions - followup from Feb
I'm trying to help with http://bugs.codeweavers.com/show_bug.cgi?id=434 and came across my thread from Feb, that I must have missed. >> ----------------------------------- >> Non-Working (wine-2002-02-20 cvs) >> trace:win:SetCapture Calling Event_Capture >> trace:win:EVENT_Capture (0x20021) Window #!! -Maybe? >> trace:win:EVENT_Capture About to Return from Event
2009 May 25
3
Interpolating variables within (RODBC library) SQL statements for MySQL
Hi everyone, I am desperately looking for a method to interpolate strings within an SQL statement as follows: I get a lot of rows out of a database (in my example POSITION_to_ZIPCODE Database with holds records for German ZIP Code <--> Gauss-Krueger Coordinate System ) and want this to be selected and computed individually row by row as follows: library(RODBC) channel <-
2006 Sep 07
2
merging tables by columns AND rows
Hi everyone! I have 100 tables of the form: XCOORD,YCOORD,OBSERVATION 27.47500,42.52641,177 27.48788,42.52641,177 27.50075,42.52641,179 27.51362,42.52641,178 27.52650,42.52641,180 27.53937,42.52641,178 27.55225,42.52641,181 27.56512,42.52641,177 27.57800,42.52641,181 27.59087,42.52641,181 27.60375,42.52641,180 27.61662,42.52641,181 ..., ..., ... with approximately 1000000 observations for each.
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
1998 Nov 28
1
No subject
Dear Friends, Yesterday I posed a question to the list concerning the possibility of doing animation examples in R. Here is an example S-Plus (4.5 for Windows ) that I wrote to illustrate my problem. If I try this in R (comment out the graphsheet and guilocator calls) I don't see my results until after the function has iterated through the 100 trials. I would like to plot each iteration.
2003 Aug 15
0
Re: [R} stars graphs
I thought about that star graph again, and realized that it would be quite a handy thing for visualizing cyclic data like time or compass direction. Here is a cleaned up (and renamed) version to do a polar plot that starts at the right and goes counterclockwise or a 24 hour clock plot that starts at the top and goes clockwise. There are probably other varieties that would be interesting. Jim
2009 Mar 24
1
segfault when running heatmap()
Hi, I was wondering if someone in the mailing list has any insight into this segfault error that I consistently find when running a script containing heatmap() in R 2.8.1 and 2.8.0 on a Linux 64-bit machine. Some points: 1. This occurs when running heatmap(). 2. Interestingly, if I source() the script or copy and paste the script in its entirety, this error occurs. However, if I run the
2010 Dec 02
4
2D Random walk
I've wrote some code to simulate a random walk in 2 dimensions on a lattice. Basically I want to add something in to make it plot it point by point so you can see what is going on. Heres my code for the random walk in 2d RW2D<-function(N) { i<-0 xdir<-0 ydir<-0 xpos<-vector() xpos[1]<-xdir ypos<-vector() ypos[1]<-ydir for (i in 1:N-1)
2008 Aug 09
1
Converting nested "for" loops to an "apply" function(s)
Hello, I would like to know more about how to use the "apply" family and have attempted to convert nested "for" loops in example code from Contributed Documentation ("The Friendly Beginners' R Course? by Toby Marthews (ZIP, 2007-03-01)") to an "apply" function(s). The relevant code is: distances=c(51,65,175,196,197,125,10,56) #distances of 8 houses
2005 Jun 14
0
Plotting quiver vector tensor arrows 2d field data
Hi All, I'd like to plot something like http://www.nawcwpns.navy.mil/~weather/mugu/mesodata/analysis.html Looking through the galleries at http://addictedtor.free.fr/graphiques/allgraph.php http://r-spatial.sourceforge.net/gallery/ http://fawn.unibw-hamburg.de/cgi-bin/Rwiki.pl?GraphGallery demo(graphics) I did not find a function to plot a 2d field on a matrix. I did find mention of a
2001 Feb 22
1
Graphical parameters in perspective plot
Hello, I've a problem for setting graphical parameters in perspective plot (function persp). I wonder if it's possible to add some text (function text) on an existing persp plot USING the axis coordinates. In fact I want to add some text on a persp plot according to x coordinates. I've tried to use text(xcoord,ycoord, label="toto") but the toto text doesn't appear at
2001 Nov 20
2
quiver plot help
Hello everybody I'm trying to write a simple version of matlab's "quiver". The idea is that I have fluid with velocity defined on a grid. I have a matrix of x-components of velocity and a matrix of y-components and I want to see the overall flow pattern. (I work with 2D fluid mechanics problems). My first-stab function is below: quiver <- function(u,v,scale=1) # first
2004 Oct 25
1
Ref: Variable scope or function behaviour or array reassign
Dear R- helpers Following a draft structure of the R script for which I am facing problem Step 1 x <- of type array with original values y <- of type array with original values Step 2 for (ctr in 1:10) { # my problem here the both x and y still show the original values from step 1 # in spite of making changes to the old values of the arrays x and y in the function function
2003 Aug 01
1
shading in image()
Is there a way to make a shading interpolation on an image plot? Something similar to matlab 'shading interp', I think it is called Gouraud shading. What I want is to make a image plot look nicer. with image() it looks very facetted, and I would like to make it look smoother. I've tried with interp.surface() in fields package but it (obviously) makes nan values at the borders and