Displaying 20 results from an estimated 6000 matches similar to: "grep(): returning the matched value"
2013 Jan 09
2
Using objects within functions in formulas
Dear all,
I'm looking to create a formula within a function to pass to glmer()
and I'm having a problem that the following example will illustrate:
library(lme4)
y1 = rnorm(10)
x1 = data.frame(x11=rnorm(10), x12=rnorm(10), x13=rnorm(10))
x1 = data.matrix(x1)
w1 = data.frame(w11=sample(1:3,10, replace=TRUE), w12=sample(1:3,10,
replace=TRUE), w13=sample(1:3,10, replace=TRUE))
test1 <-
2007 Jun 19
4
plot only x- and y-axis with origin, no box()
hi all,
I'm trying for quite some time to have an x- and y-axis, but no entire box.
>plot(..,axes=F)
>axis(1)
>axis(2)
Gives this, but their axes do not go to the origin.
Quite a number of people find this gap between the two axes disturbing.
Has anyone an idea how to let these axes go to the origin?
thank you in advance
[[alternative HTML version deleted]]
2007 Jun 30
1
graphic for the R profiler
Hello all,
I just wanted to share a small perl script that generates a dot file
from the result of the R profiler. The dot file can than be used to
create a graphical display of the profiling. You can save this file in
the bin directory of your R installation and then create a graph, for
example an SVG by piping the output of the script to dot:
$ R CMD Rprof2dot Rprof.out | dot -Tsvg >
2007 Mar 06
2
SVG and tooltips, hyperlinks
Dear all,
is there a good way to create SVG plots with R whose elements have
titles (tooltips) or act as hyperlinks?
I am using the RSvgDevice package, which works great - but it doesn't
seem to support the notion that plot objects have titles or are act as
hyperlinks, so I am helping myself by giving the objects funny unique
colors and then postprocessing the .svg file.
I wonder
2007 Jun 20
4
extract elements
Dear R users,
just another little question... are there other ways, I mean more easy to
write, to obtain the same result I got with:
data[95:length(dati[,1]), ]
where data is a data frame
to extract the last elements starting from a fixed position?
thank you very much
best regards
Manuele PEsenti
--
Manuele Pesenti
manuele a inventati.org
amicogodzilla a jabber.linux.it
2007 Oct 17
2
Need help with function that includes 2 summation
I am relatively new to R, so this may be a much simpler question than it
seems to me. I am trying to create a function that includes two
summations, and can't figure out how. I am attaching the equation as a
pdf file. This function will then be optimized over a chosen range of
values, but right now I just need help with the function. Thank you.
Zack Darnell
Duke University
--
Zack
2007 Mar 31
1
Probem with argument "append" in "Rprof"
Hello,
Appending information to the profiler's output seems to generate
problems. Here is a small example of code :
<code r>
require(boot)
Rprof( memory.profiling = TRUE)
Rprof(NULL)
for(i in 1:2){
Rprof( memory.profiling = TRUE, append = TRUE)
example(boot)
Rprof(NULL)
}
</code>
The problem is that the file Rprof.out contains more than once the
header information:
$ grep
2007 Jun 28
4
compare 2 vectors
Dear all,
I would like to take out the values from one vector that are equal to the values in another vector.
Example:
a <- c(1,2,3,4,5,6,7,8,9)
b <- c(3,10,20,5,6)
b_noRepeats = c(10,20)
So I would like to have the vector b without the same values as vector a.
Kind regards,
João Fadista
[[alternative HTML version deleted]]
2007 Mar 14
4
abs(U) > 0 where U is a vector?
Hi,
I am looking for a way to compare if every element of a vector is > 0.
i.e.
while(abs(U) > 0)
{
..
}
is there a function for this or do I have to write one?
I'd appreciate your help!
Benjamin
2008 Jun 30
6
Plotting three time series on the same graph
Dear R Users,
I would like to plot three time series on the same graph, two axis on the
left and one axis on the right.
The time series that I am graphing on the left do not share a similar
scale: one has a range of 1:100 and the other a range of 25000:70000. How
can I display the tick marks for both on the left hand side without
superimposing them, i.e. one set of tick marks in black right
2007 Oct 15
2
clipping off words inside a vector of strings
Hi,
I have a vector of strings (class character) with 6 elements (length
6). I call it 'names'.
"Graham Chapman"
"John Cleese"
"Terry Gilliam"
"Eric Idle"
"Terry Jones"
"Michael Palin"
And I want to turn it into another vector of strings called
'shortnames' with the same length.
The new vector should look like:
2006 Nov 29
3
comma delimiter & comma in text
Hi
I have data like
1, A, 24, The Red House
2, A, 25, King's Home, by the Sea
...
I'd like to read this in as three variables. I first tried
temp <-read.csv(addresses, sep = "," ) it worked but line 2 was broken after
King's Home, and by the Sea as placed in another line. and so i eneded up
with more number of rows than in the data. when i tried
temp
2006 Nov 29
4
String question
Hi to all
I would to determinate whether bits is a binary code and I would to find
out the which bit is set to 1
bits <-"00110110"
I found to detect whether there are only numbers
all.digits(bits)
but is there any function to detect whether there are only 0 and 1 in
the string
And how could I get the f.e the third "bit" from the right hand side
With regards Carmen
2005 Feb 03
2
E&M Wink problems
We're having some difficulty connecting a T1 fax board card to asterisk,
with E&M Wink. We've successfully connected it to other E&M Wink T1s,
but have been unable to get asterisk to hear it's dialing. Asterisk can
dial down to it with no problem, and it hears all the digits, but
whenever it sends digits down to asterisk, * always only "gets" the
first one.
This is
2007 Mar 12
4
R for copying and pasting selected image files?
Hello,
I would like to use R to process a list of text strings. The text
strings are filenames, encoding experimental settings. Based on the
information in there I'd like to select certain files and copy only
the selected files to another directory.
The files are images and there is no need, actually no desire, to
open them. Is there a way to use R for copying and pasting files with
any
2023 Mar 23
1
`dendrapply` Enhancements
Hello Aidan,
Sorry for dropping this for a while.
? Thu, 2 Mar 2023 21:03:59 +0000
"Lakshman, Aidan H" <AHL27 at pitt.edu> ?????:
> //after
> curnode = eval(lang3(R_Bracket2Symbol, parent->node, DEND_IND), env);
lang3() always constructs a new language object. If you do end up using
eval(), it may make sense to move lang3() out of the loop and reuse the
existing object
2014 Sep 02
2
making the passphrase prompt more clear
I am going to preface this email by saying that I know very little
about OpenSSH internals, the protocol, etc.
I do a lot of work with novice programmers, and one step that comes up
relatively early is generating SSH keys. In case you haven't done it
in a while, the output looks like this:
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key
2011 Dec 20
0
[LLVMdev] Disassembly arbitrary machine-code byte arrays
Hi Kev and James,
Thanks to both of you for responding. I had looked at the otool
release published for 10.7.2 (cctools-800), but it seems that it only
snuck in after that and by the cctools-809 release!
In any case, both that and llvm-mc should be more than adequate! A
follow-up question: is the C interface to LLVM a second-class citizen
or should I reasonably be able to expect to do everything
2007 Aug 08
3
SWF animation method
Hi all,
Just thought I'd share something I discovered last night. I was
interested in creating animations consisting of a series of plots and
after finding very little in the usual sources regarding animation in
R directly, and disliking the imagemagick method described here
(http://tolstoy.newcastle.edu.au/R/help/05/10/13297.html), I
discovered that if one exports the plots to a
2011 Dec 19
3
[LLVMdev] Disassembly arbitrary machine-code byte arrays
Hi Aiden,
The 'C' based interface you could use in is llvm/include/llvm-c/Disassembler.h, which in there is:
/**
* Disassemble a single instruction using the disassembler context specified in
* the parameter DC. The bytes of the instruction are specified in the
* parameter Bytes, and contains at least BytesSize number of bytes. The
* instruction is at the address specified by the