Displaying 20 results from an estimated 23 matches for "7d4".
Did you mean:
74
2006 Jul 11
1
Misunderstanding with lines (or elsewhere)
Misunderstanding with lines(...) :
http://7d4.com/r/
I would like the y coordinate of the horizontal line to be 1/4,
and also the line to begin at x=0 and end at y=1.
I'm obviously missing something
... so if anybody could help.
Many thanks.
test = function()
{
bmp('test.bmp', width=100, height=100)
m = matrix(0, 2, 2)
par(new...
2006 Jun 15
3
matrix selection return types
Dear Rusers,
I would like some comments about the following results
(under R-2.2.0)
> m = matrix(1:6 , 2 , 3)
> m
[,1] [,2] [,3]
[1,] 1 3 5
[2,] 2 4 6
> z1 = m[(m[,1]==2),]
> z1
[1] 2 4 6
> is.matrix(z1)
[1] FALSE
> z2 = m[(m[,1]==0),]
> z2
[,1] [,2] [,3]
> is.matrix(z2)
[1] TRUE
Considered together, I'm a bit surprised about
2006 Jul 04
5
removing for loop
Dear Rusers,
Trying to reduce my for loops addiction,
could somebody tell me if there are ways to simplify
(and perhaps accelerate ?) the following line
for (i in 1:N) for (j in 1:N) m[i,j] = b[i]-b[j];
(where m is a NxN matrix and b a vector of length N)
Thanks for any hint.
2006 Jun 19
2
function call
Dear R-users,
When a function f1() is called, is there a way to know,
from inside the function f1(), if f1() is directly called from the
R console, or indirectly from another function f2() ?
Of course, I may add an argument to f1(..., callbyf2=FALSE) only used
by f2() giving explicitely this info, but I would like to know
if there may be a more generic way ?
Thanks for any info or pointer
2005 Aug 22
3
read a table ignoring specific rows ?
Dear R users,
First of all sorry for this question, surely quite naive.
(I searched on the R site but was unable to find by myself).
I have a table, called infile :
1 2 3
4 5 6
7 8 9
I would like to read it and ignore the rows with 1st element > 3
I do it now with a for loop, and it's ok,
but I was expecting something simpler, like :
intable = read.table(infile);
newtable =
2005 Dec 06
7
R is GNU S, not C.... [was "how to get or store ....."]
======= 2005-12-06 22:16:17 伳侜佋佢伬伌佇伵佒佇佇伌伒伬仯伜=======
>Martin Maechler a 侀crit :
>
>> please, please, these trailing ";" are *so* ugly.
>> This is GNU S, not C (or matlab) !
>>
>> but I'll be happy already if you could
>> drop these ugly empty statements at the end of your lines...
>
>May I disagree ?
>I find missing ";" at
2005 Sep 16
2
fusion of rows (as in merge()) but from only 1 matrix
Dear all,
Once again I need your help ; I fond a way to do what I want but I am sure
there is a better way.. maybe you can help me.
I have a matrix, for example mat.tot :
> mat.tot
ID Desc M1 M2
1 1 gene1 0.5 0.2
2 2 gene2 -0.4 -0.1
3 3 gene3 1.0 1.2
4 4 gene1 0.6 0.3
5 5 gene2 -0.3 0.0
and I want to merge line 1 with line 4, and line 2 with line 5 because this
is the same gene.
I can
2005 Nov 12
4
matrix subset
Dear R-helpers,
I apologize for this certainly simple question.
I have the following R lines :
> m = matrix(1:12 , 3 , 4);
> m
[,1] [,2] [,3] [,4]
[1,] 1 4 7 10
[2,] 2 5 8 11
[3,] 3 6 9 12
> m1 = subset(m , m[,2]>=5);
> m1
[1] 2 3 5 6 8 9 11 12
but in fact I would appreciate m1 to be also a matrix,
and thus would like to get :
2006 Jul 17
7
R and DDE (Dynamic Data Exchange)
R and DDE (Dynamic Data Exchange)
Dear Rusers,
I run an application (not mine) which acts as a DDE server.
I would like to use R to get data from this application,
say once per minute, and do some processing on it.
I didn't find much info on the R DDE abilities, apart the tcltk2
package in which I will try to go deeper.
I would be very thankful for any info, pointer or advice about the
2005 Oct 03
6
sampling vectors
Hello Listers,
I am trying to sample a vector to create a new one of sample length,
witha sum equal to the sum of the initial vector:
initial = 10, 30, 10 (sum=50)
sample example = 5, 35, 10 (sum=50) or 25, 15, 10 (sum=50), etc ...
My problem is to control the sum, so it stays constant.
Any suggestions would be very helpful !
Thank you in advance,
Eric
2005 Apr 25
6
Proba( Ut+2=1 / ((Ut+1==1) && (Ut==1))) ?
Dear all,
First I apologize if my question is quite simple,
but i'm very newbie with R.
I have vectors of the form v = c(1,1,-1,-1,-1,1,1,1,1,-1,1)
(longer than this one of course).
The elements are only +1 or -1.
I would like to calculate :
- the frequencies of -1 occurences after 2 consecutives -1
- the frequencies of +1 occurences after 2 consecutives +1
It looks probably something like
2006 Jun 05
2
making matrix monotonous
Dear all,
I'm currently working on correlation matrix.
The function image() is quite useful for visualization.
Before using image(), I'd like to sort the matrix rows/columns,
in order to make the matrix the more monotonous/smooth possible.
Before reinventing the wheel, is there somebody here aware if
such a function already exists ?
Thanks.
2005 Oct 27
1
how to write and read an array ?
Hi,
Apologies if the question is too simple
but I didn't find the answer by myself.
I'm able to create a 3-dimensionnal array A
and to write it with write.table()
... but, after that, I don't find how to read it
with read.table() getting the right 3 dimensions.
I tried to use as.array(), to force the dim, etc
but it didn't work.
(It's probably obvious ... ?)
Thanks for your
2006 Jan 09
2
paste tab and print
Dear all,
info = paste('a', 'b', sep='\t')
print(info , quote=F)
doesn't produce the same result with R201 and R220
(under Windows2000)
R 2.0.1 : [1] a b
R 2.2.0 : [1] a\tb
I did read the CHANGESR220 file and tried also the search
engine but couldn't find an answer.
I certainly missed the point, and apologize about that.
So if somebody could tell me how to
2006 Jul 30
1
Log color scale
Hi all,
In response to a previous post about plotting a numeric square matrix
as a colored matrix, I was referred to both image and the
color2D.matplot function in the plotrix package. Both have worked for
me thanks!!
However I need to plot my data in a log transformed color scale. Is
this possible? I will be happy to explain further, but basically I
need to do this because there are large
2006 Jul 17
3
Correlation Mapping
On the cover of Zivot and Wang's Modeling Financial Time Series with S
Plus, there is a correlation plot that seems to indicate the strength
of correlation with color-coded squares, so that more highly
correlated stocks appear darker red. If anybody out there is familiar
with the book or understands what I am talking about, I am curious as
to whether or not there is a similar function in R
2005 Sep 16
3
Running glm in batch and exporting results (AIC) to HTML
Dear all,
I'm doing univariate Poisson regressions using the "glm" and "glm.fit"
functions. I have 5 independent datasets and each dataset, has one response
variable and more than 20 factors to test.
Currently, I run one regression at a time and manually take notes of the
results in excel to have a quick overview on what is going on in my data. My
poor method is very
2005 Sep 28
7
Plot Data Points in boxplots
Hello,
I would like to plot my data in a fashion similar to a boxplot, but
plot the true data points without a box, just overlay lines of the
summary generated by the boxplot. I have less than 10 observations
within each group, so I think showing the actual data would be more
effective than the box of the boxplot. I have been unable to find a way
to do this.
Here is example data:
>
2005 Aug 24
8
Call SAS from R
Hi All,
I am new to post question on this list. I apologize if this question is too
easy or irrelevant.
I am doing a simulation study and I need to read a data file that can be
easily read by SAS.
So, what I try to do is to execute SAS in R and then read the output of SAS
to R.
I try the following code but it didn't work.
system("c:\\program files\\sas institute\\v8\\sas.exe
2005 May 18
1
fast matrix update
Hello,
I use extensively m[i0:i1,j0:j1] = ... to update matrices parts.
This writing is very convenient, but, since I'm doing this
calculus many many times, I would like to know if there is a way
(a hope ?) to do the same operation faster ?
Thanks for any advice or pointer.
Vincent