similar to: problems with plot.data.frame

Displaying 20 results from an estimated 50000 matches similar to: "problems with plot.data.frame"

2010 Nov 24
3
Custom ticks on x axis when dates are involved
Hi, I have a set of irregular time series and i want to produce a simple plot, with dates on x axis and attribute value of y axis. This is simple enough but my x axis is divided automatically by ticks every 5 years. I would like to have a tick every year at January 1st. I am not sure how i can do that - i end up with something very close to what i want, but it is clunky and not very correct. I
2006 Aug 31
0
periodic spline in glm
I have been trying to find a command similiar to bs or ns to add a periodic/or cyclical splie term to a regression model in glm.nb I have been using ns to fit a spline to day of the year (1:365): glm.nb(CNT ~ WKDY + ns(DY,df=6) + HOLIDAY_FLAG + Trend) but I think a periodic spline might be more appropriate. Any suggestions would be appreciated. best, Spencer Jones, M.Stat. NLM Fellow Dept.
2009 Oct 08
2
intersection of 2 density curves
Hi, I would like to find out the coordinates of the intersection points of 2 density curves. I did a search but i didn't get any significant results. I really hope some of you have some ideas. here it is an example: set.seed(123) x1 <- rnorm(100, 1, 1) x2 <- rnorm(100, 0, 1) d1 <- density(x1) d2 <- density(x2) plot(d1, col = 2) lines(d2, col = 4) Now i would like to know
2008 Apr 18
2
Correspondence and detrended correspondence analysis
Hi, I hope someone knows the answer to this or has a real good reference about it (I am using Legendre & Legendre, Numerical Ecology, 1998).... My data is a data.frame with locations as rows and vegetation assemblages / species as columns. I've done a PCA, a correspondance analysis (CA) using ca in ca package and a detrended correspondance analysis (DCA) using decorana from vegan package.
2007 Aug 02
6
- round() strange behaviour
Hi, I am getting some strange results using round - it seems that it depends if the number before the decimal point is odd or even .... For example: > round(1.5)[1] 2> round(2.5)[1] 2 While i would expect that round(2.5) be 3 and not 2. Do you have any explanation for that? I really appreciate your input, Monica
2007 Dec 13
6
spliting strings ...
Hi everyone, I have a vector of strings, each string made up by different number of words. I want to get a new vector which has only the first word of each string in the first vector. I came up with this: str <- c('aaa bbb', 'cc', 'd eee aa', 'mmm o n') str1 <- rep(1, length(str)) for (i in 1:length(str)) { str1[i] <- strsplit(str, "
2008 May 05
2
axis and tick widths decoupled (especially in rugs!)
Hi! (a complete newby, but will not give up easily!) I was wondering if there is any way to decouple the axis and tick mark widths? As I understand they are both controlled by the lwd setting, and cannot be controlled independently? For example I might want to create major and minor ticks, which I now know how to do by superimposing two axes with different at settings, but what if I also wanted
2008 Feb 04
5
How to search for packages
Hi everybody, I know this might be very off topic and it took me quite a while to up my courage to post this?. But I remember a thread some time ago about how we can find the packages we need to do specific tasks in R if we don?t know before hand which ones actually do it. Now all the packages are listed alphabetically on the web site. Since I am not very advanced in writing my own functions I
2008 May 22
15
Pros and Cons of R
Hi, I am doing a very informal presentation for my office about R capabilities to deal with and analyze spatial data, display data and maps, and connections with GIS. I've used in my presentation info from the CRAN, the spatial Task view, and the more striking graphics examples from http://addictedtor.free.fr/graphiques/thumbs.php and NCEAS
2008 Jan 18
1
modifing barplot
Hi, I would like to modify how barplot .... plots. For reasons only my supervisor comprehends i need to do the crisscross lines in the bar thicker. If i use lwd=2 the y-axis is thicker, (i use the option beside = TRUE) but nothing else is affected by this parameter - it seems. I looked at the barplot.r code but i am afraid i don't quite understand it so ..... i am at loss. I am using
2011 Nov 22
5
x, y for point of intersection
Hi everyone, ? I am trying to get a point of intersection between a polyline and a straight line ?.. and get the x and y coordinates of this point. For exemplification consider this: ? ? set.seed(123) ? k1 <-rnorm(100, mean=1.77, sd=3.33) ?k1 <- sort(k1) q1 <- rnorm(100, mean=2.37, sd=0.74) q1 <- sort(q1, decreasing = TRUE) plot(k1, q1, xlim <- c((min(k1)-5),
2008 Jul 23
2
Warning message in if else statement
Hi, I am using an if else statement inside a function ?. If I use that function I have no problems ?. If I use the function with the if else statement inside a second function I get the following waring: Warning message: In if (pval == 0) p_value <- "< 2.2e-16" else p_value <- pval : the condition has length> 1 and only the first element will be used Using the second
2009 May 26
3
split strings
Hi everybody, I have a vector of characters and i would like to extract certain parts. My vector is named metr_list: [1] "F:/Naval_Live_Oaks/2005/data//BE.tif" [2] "F:/Naval_Live_Oaks/2005/data//CH.tif" [3] "F:/Naval_Live_Oaks/2005/data//CRR.tif" [4] "F:/Naval_Live_Oaks/2005/data//HOME.tif" And i would like to extract BE, CH, CRR, and HOME in a
2009 May 26
3
split strings
Hi everybody, I have a vector of characters and i would like to extract certain parts. My vector is named metr_list: [1] "F:/Naval_Live_Oaks/2005/data//BE.tif" [2] "F:/Naval_Live_Oaks/2005/data//CH.tif" [3] "F:/Naval_Live_Oaks/2005/data//CRR.tif" [4] "F:/Naval_Live_Oaks/2005/data//HOME.tif" And i would like to extract BE, CH, CRR, and HOME in a
2011 Jun 21
2
qplot/ggplot2 Questions
I took some data from an online poll about which R GUI people used most and I am messing around with it to learn how to use qplot. Specifically I am making a horizontal bar graph and I have two questions. 1. The categories are ordered in rather strange way at least to me. It is not alphabetical or ascending/descending order of votes cast so i had to manually state the order I wanted which is
2008 Mar 13
4
a more elegant way to get percentages?
Hi, I am trying to get percentages in a more elegant way. I have a data.frame with locations and values (counts) of species at that location. Each location is repeated for each species i have values for and i would like to get percentages of each species at that location. I am not sure if i am clear in my explanations so i will paste my code below: ##################### > x locat val 1
2007 Oct 01
1
Graphics and LaTeX documents with the same font - multiple y-axes
Well, I agree that plots with multiple y-axes can be very confusing but .... i am not sure that always they are also misleading .... One time i was asked to make a 2 y-axes plot, one y axes was for elevation (heights in meters) and one for rugosity (values between 1 and 2 - unitless). The idea was to visualize that for a more complex profile the rugosity is higher than for a flatter terrain. A
2009 Feb 12
3
Aggregrate function
Hi, I have to recognize that i don't fully understand the aggregate function, but i think it should help me with what i want to do. xveg is a data.frame with location, species, and total for the species. Each location is repeated, once for every species present at that location. For each location i want to find out which species has the maximum total ... so i've tried different ways to
2007 Sep 06
2
larger decimal numbers get rounded ....
Hi, I am sure there is a reason but ...... why larger decimal numbers get rounded to the nearest integer? Example: a <- 3308000.5 a [1] 3308001 I would like my numbers to be decimals .... since they do represent coordinates and i don't want them rounded .... how can i keep them as they are? Thanks, Monica _________________________________________________________________
2010 Nov 08
2
Error: could not find function "extract" in package raster
Hi, I would like to use the function "extract" from package raster and i get the following error: m01e <- extract(marsh01, p) Error: could not find function "extract" marsh01 is a raster object and p is an intersectExtent object that is not null. The package is installed and loaded, i use a Windows machine 64 bit and R x64 2.11.0. Do i really need to update my R to use