Displaying 20 results from an estimated 10000 matches similar to: "R on X11 under Linux (newbie)"
2008 Jun 09
1
Basic Question on Keys/Values
As a java programmer, I'm having issue conceptualizing the following use
case:
Given an value, passed into a function, how do I pull out the lookup?
Ie.
A list of keys (key1, key2, key3)
A list of values (val1,val2,val3)
I want to write a function (or is there something built in?) such that
Callit <- (thekey) {
(magic happens here)
Return value
}
Any ideas?
Thanks a bunch!
2008 Apr 07
1
Width of text displayed in R
All,
I think this is pretty basic but I couldn't find the answer in any
source.
I have just built my own R for Linux (amd 64). It runs well, but R
thinks that it only has 80 characters or so of screen width. I log on
with Putty to the box and can stretch it as large as I want.
Is there a simple way to tell R to use more screen width when
displaying?
From whatami:
OS RELEASE :
2008 Jun 05
5
Java to R interface
I am developing an application that uses Eclipse framework on Windows.
I have to call R from Java. I downloaded rJava package and installed
it. I set the classpath in the Run Dialog in Eclipse to the directory
where the JRI.jar is. I set the Path environmental variable to the
directory where R.dll and jri.dll are. Yet when I run the rtest
example (in jri/examples directory), I get the
2008 Apr 15
4
Displaying Grahics to the X Window when calling R from command line
Hi,
I am running an R script from the command line by calling:
> R --vanilla < test.R
My terminal is part of the Xwin (Xterm) and there is a plot(1:10)
command in the test.R script.
This will not produce a grahic though. When I start R by calling R then
plotting from the R command in the same xterm, I do get a graphic
display.
How do I create a xwin plot by calling R from the command
2007 Oct 19
6
r achives
sorry but how do i accsess r archives
__________________________________________________
[[alternative HTML version deleted]]
2010 Jun 18
4
Drawing sample from a circle
Hi, I would like to draw 10 uniformly distributed sample points from a circle with redius one and centered at (0,0). Is there any R function to do that?
Thanks,
[[alternative HTML version deleted]]
2009 Feb 05
3
"open-ended" plot limits?
Hi Folks,
Maybe I've missed it already being available somehow,
but if the following isn't available I'd like to suggest it.
If you're happy to let plot() choose its own limits,
then of course plot(x,y) will do it.
If you know what limits you want, then
plot(x,y,xlim=c(x0,x1),ylim(y0,y1)
will do it.
But sometimes one would like to
a) make sure that (e.g.) the y-axis has a
2008 Oct 20
3
? extended rep()
Hi Folks,
I'm wondering if there's a compact way to achieve the
following. The "dream" is that, by analogy with
rep(c(0,1),times=c(3,4))
# [1] 0 0 0 1 1 1 1
one could write
rep(c(0,1),times=c(3,4,5,6))
which would produce
# [1] 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1
in effect "recycling" x through 'times'.
The objective is to produce a vector of
2010 May 12
6
A primitive OO in R -- where next?
Greetings All,
Out of curiosity, I've just done a very primitive experiment:
Obj <- list(Fun=sum, Dat=c(1,2,3,4))
Obj$Fun(Obj$Dat)
# [1] 10
That sort of thing (much more sophisticated) must be documented
mind-blowingly somewhere. Where?
Where I stand right now: The above (and its immediately obvious
generalisations, like Obj$Fun<-cos) is all I know about it so far.
Ted.
2010 Sep 08
6
'par mfrow' and not filling horizontally
Greetings, Folks.
I'd appreciate being shown the way out of this one!
I've been round the documentation in ever-drecreasing
circles, and along other paths, without stumbling on
the answer.
The background to the question can be exemplified by
the example (no graphics window open to start with):
set.seed(54321)
X0 <- rnorm(50) ; Y0 <- rnorm(50)
2009 May 17
2
Output of binary representation
I am interested in studying the binary representation of numerics
(doubles) in R, so am looking for possibilities of output of the
internal binary representations. sprintf() with format "a" or "A"
is halfway there:
sprintf("%A",pi)
# [1] "0X1.921FB54442D18P+1"
but it is in hex.
The following illustrate the sort of thing I want:
1.1001 0010 0001 1111
2009 Jun 04
3
Understanding R Hist() Results...
Think I'm missing something to understand what is going on with hist(...)
http://n2.nabble.com/What-is-going-on-with-Histogram-Plots-td3022645.html
For my example I count 7 unique years, however, on the histogram there only 6. It looks like the bin to the left of the tic mark on the x-axis represents the number of entries for that year, i.e. Frequency.
I guess it looks like the bin for
2008 Mar 12
1
[follow-up] "Longitudinal" with binary covariates and outcome
Hi again!
Following up my previous posting below (to which no response
as yet), I have located a report which situates this type
of question in a longitudinal modelling context.
http://www4.stat.ncsu.edu/~dzhang2/paper/glm.ps
Generalized Linear Models with Longitudinal Covariates
Daowen Zhang & Xihong Lin
(This work seems to originally date from around 1999).
They consider an outcome Y,
2008 Apr 27
2
Deb-4.0 Etch and sources.list for R
Hi Folks,
I'm running Debian-4.0 Etch, installed last September
from a DVD, and regularly updated as things arise.
I have R version 2.4.0 Patched (2006-11-25 r39997)
installed (initially at the time of first installation
of Debian, as provided by Debian), along with a variety
of packages.
I'd like to be able to connect to the CRAN repositories
for Debian R, for updates etc.
When I visit
2008 Oct 11
2
R vs SPSS contrasts
Hi Folks,
I'm comparing some output from R with output from SPSS.
The coefficients of the independent variables (which are
all factors, each at 2 levels) are identical.
However, R's Intercept (using default contr.treatment)
differs from SPSS's 'constant'. It seems that the contrasts
were set in SPSS using
/CONTRAST (varname)=Simple(1)
I can get R's Intercept to match
2010 Jun 15
2
Unspecified [upper] xlim/ylim?
Greetings!
I would like to be able to specify a fixed (say) lower limit
for plotting, while leaving the upper limit "floating, when
plotting. The context is that the maximum in the data to be
plotted is unpredictable, being the consequence of a simulation,
whereas I know that it cannot be less than (say) 0; and I want
to fix the lower limit at 0 in any plot, leaving the upper limit
to be
2009 Jun 08
2
Re flect Back to Back Histograms in x-axis?
I've looked long and hard for this, but maybe I am missing something...
There is a nice module that displays histograms reflected in the y axis,
i.e. http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=136
but is it possible to reflect in the x-axis, so to have two datasets, one
pointing up and one down rather than left and right? I haven't been able to
find a way to plot this
2007 Nov 30
2
Organising tick-marks in plot()
Hi Folks,
I'm advising someone who's a beginner with R,
and therefore wants the simplest answer possible.
The issue is to produce a plot using
plot(x,y,...)
where, on the X-axis, the tick-marks should be
on the lines of:
-- Range of X-axis: 0:1000
-- tick-marks labelled "0","200",...,"800","1000"
-- unlabelled tick-marks every 50 from 0 to
2007 Nov 21
4
NA values
Hi all!
I am new to R and I would like to ask you the following question:How
can I substitute the NA values with 0 in a data frame? I cannot find a
command to check if a value is NA...
Thank you very much!
Eleni
2007 Dec 09
2
Adding info from summary(lm(...)) to plot
Hi Folks,
Say I have 2 continuous variables X,Y.
I can of course plot (X,Y) with
plot(X,Y,pch="+",col="blue")
say, and add the regression line from lm(Y~X)
by extracting the coefficients 'a' of Intercept
and 'b' of X from Y.lm <- lm(Y~X).
Now, however, I want to have not only a general
explanatory title such as
main="Plot of Y against X"