similar to: attributing values to dataframe positions following eval

Displaying 20 results from an estimated 400 matches similar to: "attributing values to dataframe positions following eval"

2008 Jun 29
2
How to get an argument dynamically from a list?
Hi, I'd like to get an argument (I think it's the right term) dynamically from a list, but cannot manage to do it. Here is the code I use: #output given by database BOB <- c('A/A', 'C/C', '15/27') MARY <- c('A/A', NA, '13/12') JOHN <- c('A/A', 'C/A', '154/35') CLIFF <- c('A/C', 'C/C',
2008 Jun 29
1
creating a dataframe using a list of the variable names
Hello, I'm fairly new to R, and despite spending quite some time exploring, testing, and looking for answers, I still have a couple of questions remaining... The first one is about creating a dataframe using a list of the variable names . I get this output file from a database: BOB <- c('A/A', 'C/C', '15/27') MARY <- c('A/A', NA, '13/12') JOHN
2010 Feb 28
1
Combining 2 columns into 1 column many times in a very large dataset
*Combining 2 columns into 1 column many times in a very large dataset* The clumsy solutions I am working on are not going to be very fast if I can get them to work and the true dataset is ~1500 X 45000 so they need to be efficient. I've searched the R help files and the archives for this list and have some possible workable solutions for 2) and 3) but not my question 1). However, I include
2006 Jan 07
1
maptools, write.polylistShape
Dear Roger, I am trying to use the write.polylistShape() function of maptools for the first time and realize that it handles list of polygons of class 'polylist'. However, it seems that no as.polylist() function exist in the package. The question behind that is: in your opinion, which would be the best way to convert a list of matrix of polygon nodes coordinates into an object of
2009 Feb 19
2
read.table : how to condition on error while opening file?
Hi, I'm using read.table in a loop, to read in multiple files. The problem is that when a file is missing there is an error message and the loop is broken; what I'd like to do is to test for the error and simply do "next" instead of breaking the loop. Anybody knows how to do that? Example: filelist <- c("file1.txt", "file2.txt",
2006 Dec 30
1
plot methods in sp
Dear listers, I am working since a while with the sp package and still wonder how the plot methods are managed with sp spatial objects. For instance, SpatialPolygonsDataFrame objects have obviously a plot method. However it cannot be found in the list provided by methods(plot) . Furthermore ?plot.SpatialPolygonsDataFrame, nor ?plot.SpatialPolygons, etc.. provide a help, though the lattice
2008 Aug 06
4
Font size in plots (I do NOT understand par help)
Hi, I do not get how par works, help please. Let's say I have a simple plot: plot(1:10) I want to change the font size for the x axis... how do I do that? Thank you, Stephane -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a compa ny registered in England with number 2742969,
2004 Apr 05
1
Drawing maps in R?
What tools and documentation exist for producing maps and working with polygon and polylist objects in R beyond the following: * Packages maps, mapproj, maptools, and mapdata. * Becker and Wilks (1993, 1995), listed as references in the documentation on the "map" function. Thanks, Spencer Graves
2005 Feb 09
1
FW: Drawing maps of UK
Hi Guys Thanks for this! As I am a beginner, I bet I'm running into some really basic problems. Using the example from the Map2poly function in maptools: try <- read.shape("euadmll.shp") mappolys <- Map2poly(try) # this produces 14 warnings() of the type: # 1: level 2 circularity at 62 in: .mtlbuild(.mtafters(r1), rD) # etc # 14: From next release, default hole handling
2010 Mar 15
1
map2poly - map lat/long cannot be unconstrained?
Using the maptools function "map2poly" I have created a map/polylist object - a map of the Great Lakes. My goal is to passively plot additional data on this map. Unfortunately I am not able to change (distort) the relative scale of the axes for the map, and so the sample points do not line up correctly on the map. In the code below, notice that I have set the same axis ranges on each
2007 Sep 17
1
map issues
Hi ! I have a shapefile that I can easily read into R using library(maptools). My problem stems from some warning messages that come even though everything seems to work fine. library(maptools) districts <- read.shape(filen = "a_ds", dbf.data = TRUE) length(districts$Shapes) so far so good. when I try and plot this I get a nice plot and a warning message: > plot(districts)
2009 Feb 08
0
recursive derivative a list of polynomials
Dear list, This is quite a specific question requiring the package orthopolynom. This package provides a nice implementation of the Legendre polynomials, however I need the associated Legendre polynomial which can be readily expressed in terms of the mth order derivative of the corresponding Legendre polynomial. (For the curious, I'm trying to calculate spherical harmonics [*]).
2004 Nov 22
1
plot.Map Maptools
Hi, Is there any way to plot a Map with different shading patterns, instead of color intensity, in R2.0.1 over Linux ? Thanks. D ----------------------------------------- Stay ahead of the information curve. Receive GIS news and jobs on your desktop daily. Subscribe today to the GIS CafeNews newsletter. [ http://www10.giscafe.com/nl/newsletter_subscribe.php ] It's informative and
2004 Sep 22
2
dot density maps
Dear All, In the moment i'm using the map and maptools package to read shapefiles and display the maps. I'm looking for the possibility to draw points (randomly positioned or positioned according to a grid) into the polygons instead of filling the polygons with colors. For example: a map (shapefile) with 10 countries, 15 points in the polygon of country A, 20 points in the
2003 Dec 01
1
Re: using shapefile as owin
My sincerest apologies, as this is a very elementary problem, but I have searched through archives and FAQs and on the web, and I am at the end of my own resources. I need to do analysis of a spatial point process occuring with four counties, using spatstat. I've had no trouble importing the shapefiles, but I can't seem to figure out what I need to do in order to use the boundary as an
2012 Mar 02
3
subseting a data frame
HI, this is my problem I want to subset this file df, using only unique df$exon printing the line once even if df$exon appear several times: unique(df$exon) will show me the unique exons If I try to print only the unique exon lines with df[unique(df$exon),] -this doesn't print only the unique ones :( could you help? thanks Nat exon size chr start
2009 Jul 28
2
Looking for example of usage of function unz
I would greatly appreciate some example of correct usage of function unz. I have to download and uncompress the following web compressef file: ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.homo_sapiens.zip I tried the following command that does not work: Targets.rec <- readLines(zz <- unz("ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.homo_sapiens.zip"))
2010 Apr 27
1
Cairo package failure to load backend
Hi R friends, I've been attempting to create plots with multiple alpha values using Cairo to save them on a windows (32b XP) platform as it doesn't support more than 3 alpha values. This worked well until I wanted a postscript file (unsupported) and as a attempted work around I installed RGtk2. So far so good, however now when I try to use a >CairoPDF("alpha.pdf", 6, 6,
2007 Nov 22
3
question about extreme value distribution
Hello, I have a question about using extreme value distribution in R. I have two variables, X and Y, and have pairs of points (X1,Y1),(X2,Y2), (X3,Y3) etc. When I plot X against Y, it looks like the maximum value of Y (for a particular X) is correlated with X. Indeed, when I bin the data by X-value into equally sized bins, and test whether the maximum value of Y for a bin is correlated with
2008 Oct 09
1
Reading zipped data directly from an FTP url
Hi Sorry, I am clearly missing something here. I want to read this file directly: ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.gallus_gallus. zip I tried using read.table(gzfile("ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5 .txt.gallus_gallus.zip")) But I got an error: Error in open.connection(file, "r") : cannot open the connection In addition: