Consider using sapply instead of a for loop, if the code in the sapply
call returns a vector, and every vector is the same length, then
sapply will automatically form it into a matrix for you.
On Sun, Feb 12, 2012 at 12:30 PM, jolo999 wrote:
> It seems to work. Simple and effective!
>
> Thanks!
>
You might find the pairs2 function in the TeachingDemos package useful.
On Fri, Feb 10, 2012 at 1:13 PM, jarvisma wrote:
> I am very new to R and programming and thank you in advance for your patience
> and help with a complete novice!
>
> I am working with a large multivariate data set that has
I think one of your problems (the others have been addressed by
others) is that you want the expression x$y to represent a column of x
whose name is stored in y (not the name y itself). The problem here
is that the $ notation is a magical shortcut and like any other magic
if used incorrectly is li
In your second example the boot function will still generate its
random indicies before your internal function calls sample, so the
seed will be different when you call sample from what you originally
set it to. If you really want to know what the boot function does,
look at its code (it does some
If you want to pause for the person to look at a plot before going on
to the next plot then just do:
> par(ask=TRUE)
This will actually allow your loop to continue with calculations while
the user looks at the plot but will pause before drawing the next plot
(hitting enter in the command window o
A little more on topic is that there are tools for R to nicely format output.
The simplest is probably the R2wd package which will transfer objects
and text to word, you can send a matrix or data frame to word as a
nicely formatted table or wdVerbatim will send output to word but make
sure that th
This looks like homework, which is generally discouraged here. You
should at the least admit that it is homework and tell what resources
your teacher has OK'd you to use.
Since you did show what you have done so far and are not just asking
for a handout, here is a hint:
?poly
On Tue, Feb 7, 201
You might want to look at the grconvertX and grconvertY functions.
You can use them to convert a coordinate relative to the plotting
device (screen, paper) or plotting region to user coordinates to use
with text or mtext.
On Tue, Feb 7, 2012 at 4:06 AM, Manta wrote:
> Dear all,
>
> another questi
An alternative is the shadowtext function in the TeachingDemos package.
On Mon, Feb 6, 2012 at 1:19 AM, Jim Lemon wrote:
> On 02/06/2012 08:23 AM, Henry wrote:
>>
>> New to R - rookie question.
>> I'm a mechanical engineer and enjoying using R to make high quality
>> graphs.
>>
>> I've searched.
You may want to look at functions like: txtProgressBar, winProgressBar
(windows onnly), or tkProgressBar (tcltk package), rather than
reinventing the wheel.
On Fri, Feb 3, 2012 at 7:00 AM, angliski_jigit
wrote:
> Hi All,
>
> I am trying to build in a progress-tracker into my loops that let me hav
Nice,
Last year I found that my office needed some decoration and my wife
has some fancy sewing machines that can be programmed to do embroidery
and cross-stitch. So I designed some cross stitches (using R and the
program for the machines) that show distribution functions and
equations for the Ce
There are only a few graphics devices that honor the 'crt' setting to
rotate characters differently from the string rotation (postscript is
the only one I know of, and then not always).
For your specific case you could do something like:
> text(1,1, paste( unlist(strsplit('output','')), collapse=
12 matches
Mail list logo