similar to: Help with R graphics

Displaying 20 results from an estimated 1000 matches similar to: "Help with R graphics"

2007 Mar 20
1
truehist bug?
Hi, Is this a bug in truehist()? > library(MASS) > x <- rep(1, 10) > truehist(x) Error in pretty(data, nbins) : invalid 'n' value Thanks, Gad > R.version platform i486-pc-linux-gnu arch i486 os linux-gnu system i486, linux-gnu status major 2 minor 4.1 year 2006 month 12 day 18 svn
2007 Mar 20
1
truehist bug?
Hi, Is this a bug in truehist()? > library(MASS) > x <- rep(1, 10) > truehist(x) Error in pretty(data, nbins) : invalid 'n' value Thanks, Gad > R.version platform i486-pc-linux-gnu arch i486 os linux-gnu system i486, linux-gnu status major 2 minor 4.1 year 2006 month 12 day 18 svn
2006 Oct 10
1
How to assign a rank to a range of values..
>From the following: basin.map <- readAsciiGrid("c:/temp/area.asc", colname="area") I have a SpatialGridDataFrame which has the x and y cordinate of a cell, and the drainage area of that cell. There are many cells with a low drainage area (in my case, 33000 with an area of 37.16) and one cell with the highest drainage area (again, in my case, a drainage area of of
2006 Oct 08
1
Probability of exceedance function question
I'm trying to calculate a cumulative area distribution (graph) of drainage areas. This is defined as P(A > A*). Simple in principle. I can do this in excel, with "COUNTIF", which will count the number of cells in the row "area" that have area A, then determine, for each cell in the row "area, how many cells exceede that area, then dividing that number by the total
2006 May 03
2
Nested model and variance partitioning
Dear R users, I face to a nested pattern and despite the numerous examples in the help I am still confused. I sampled bugs in different habitats within sites which were within rivers themselves within different regions. The habitat correspond to different substrata (not systematically present in all sites). For rivers and sites, I have environemental variables (e.g. altitude and slope of
2010 Aug 25
1
SEM : Warning : Could not compute QR decomposition of Hessian
Hi useRs, I'm trying for the first time to use a sem. The model finally runs, but gives a warning saying : "In sem.default(ram = ram, S = S, N = N, param.names = pars, var.names = vars, : Could not compute QR decomposition of Hessian. Optimization probably did not converge. " I found in R-help some posts on this warning, but my attemps to modify the code didn't change
2017 Oct 05
3
working with ordinal predictor variables?
I'm trying to develop a linear model for crop productivity based on variables published as part of the SSURGO database released by the USDA. My default is to just run lm() with continuous predictor variables as numeric, and discrete predictor variables as factors, but some of the discrete variables are ordinal (e.g. drainage class, which ranges from excessively drained to excessively poorly
2004 Aug 31
1
appending data to a dataframe
Dear R users, I am sorry to ask you such a pathetic newbie question, but how does one append data at the end of a data frame? I am working with GRASS/R library, but the question is about R. I have a data.frame containing the following variables basinID, distoutlet, drainage_area, slope These variables are stored for all pixels of Grass Raster objects. For each drainage basin (basinID), I'd
2017 Oct 05
0
working with ordinal predictor variables?
I would consider this is a question for a statistics forum such as stats.stackexchange.com, not R-help, which is about R programming. They do sometimes intersect, as here, but I think you need to *understand what you're doing* before you write the R code to do it. Obviously, IMO. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and
2010 Apr 16
2
how to change the position of xlab in truehist?
Hi, I'm wondering how can I change the position of xlab in truehist. For example, the following code creats a histogram with 4 bins for my discrete data. I want each bin to be labelled as 0, 1, 2, or 3 in the middle, so that it's clear each bin corresponds to each of the discrete case. I was thinking of first delete xlab and then add marks myself, but it doesn't look like it's
2006 Sep 29
2
X-axis labels in histograms drawn by the "truehist" function
Hi, I have a simple problem that I would appreciate getting some tips. I am using the "truehist" function within an "apply" call to plot multiple histograms. I can't figure out how to get truehist to use the column names of the matrix as the labels for the x-axis of the histograms. Here is a simple example: X <- matrix(runif(4000),ncol=4) colnames(X)
2009 Apr 28
3
truehist and density plots
Hi, I wanted to plot the histogram of a vector and then, plot the density function of subsets of the vector on the histogram. So I use truehist in MASS package and lines(density) as follows: length(b) = 1000 truehist(b) lines(density(b[1:100])) however the density plot of the first 100 points exceeds the max of y axis (see attached). how is it possible to make a graphics so that the density plot
2004 Nov 26
2
hist and truehist
Hello! Up to now I have been using hist() to display the distributions. Howevere, I noteiced strange numbers on y (vertical) axis, if I used probability = T or freq = F option. I thought it is a bug and launched the R-bug system and found some posts on that matter. Brian Ripley responded to one, that one should look at truehist() for that. Ok I can use truehist() if I want to see the ratios
2007 Dec 21
1
using apply to loop
Hi, I am running the following loop, but it takes hours to run as n is big. Is there any way "apply" can be used? Thanks. ### Start nclass <- dim(data)[[2]] - 1 z <- matrix(0, ncol = nclass, nrow = nclass) n <- dim(data)[[1]] x <- c(1:nclass) # loop starts for(loop in 1:n) { r <- data[loop, 1:nclass] classified <- x[r == max(r)]
2007 Dec 21
1
using apply to loop [SEC=UNCLASSIFIED]
Hi Louis, You could try this: # find the index of the maximum value in each row of _data_, # disregarding the last column classified <- apply(data[,-(nclass+1)],1,which.max) ## or, if the maximum may be repeated: classified <- apply(data[,-(nclass+1)], 1, FUN = function(x) which(x == max(x))) # the variable _truth_ is just the last column of _data_ ? truth <- data[,nclass + 1] ?table
2003 May 03
1
can't plot ylab in graph
Dear People, I am sure I am missing something obvious as usual, but in the following graph I can't plot ylab. Ignoring unimportant details, I am plotting one instance of truehist() and one instance of curve() on the same graph. Truehist() won't let me pass the ylab argument. It gives me the error Error in plot.default(xlim, c(0, ymax), type = "n", xlab = xlab, ylab =
2017 May 18
2
Bug: floating point bug in nclass.FD can cause hist() to crash
Hello everybody, This is a bug involving functions in core R package: graphics::hist.default, grDevices::nclass.FD, and base::pretty.default. It is not yet on Bugzilla. I cannot submit it myself, as I do not have an account. Could somebody else add it for me, perhaps? That would be much appreciated. Kind regards, Sietse Sietse Brouwer Summary ------- Floating point errors can cause a data
2012 Oct 07
2
[PATCH] drm/nouveau: fix error handling in core/core object creation functions
Signed-off-by: Marcin Slusarz <marcin.slusarz at gmail.com> --- This patch relies on "drm/nouveau: remove >1 sclass support from nouveau_parent_create_". There are *many* *more* code paths without proper error handling - I counted at least 106 in 41 functions. If someone would like to do a bit of janitorial work I marked those code paths and uploaded "patch" here:
2004 Sep 09
1
man page of hist points to truehist, which can't be viewed without loading a library?
rdevel from yesterday, also in 1.9.1 (Debian, -3). The man page of 'hist' (from the graphics package, obtained by "?hist") suggests 'truehist' under "see also", but 'truehist' isn't loaded by default (a sensible "of course"), so that "?truehist" fails. One can do help.search(), of course, which points what to do, but leads to my
2007 Sep 24
2
truehist?
Hello, After a long time, I needed the truehist function, but my system couldn't found it. I tried to install the package MAAS, but I couldn't found it! Something happened? Carlos -- +-----------------------------------------------------------+ Carlos Henrique Grohmann - Guano Visiting Researcher at Kingston University London - UK Geologist M.Sc - Doctorate Student at