Displaying 20 results from an estimated 10000 matches similar to: "how to do sthg like "mat[!=(ind),]""
2005 Sep 09
3
how to do something like " subset(mat, ("col1">4 & "col2">4)) "
Dear all,
I have a problem with the "subset()" function. I spent all day yesterday
with a collegue to solve it and we did not find a satisfying solution (even
in the archived mails), so I ask for your help.
Let's say (for a simple example) a matrix mat:
R> mat
cola colb colc
[1,] 1 4 7
[2,] 2 5 8
[3,] 3 6 9
My goal is to select the lines of the matrix on the basis of the
2005 Oct 28
1
multiple graphs in the same ps file ? -- with ref.
Sorry I put there the ref. :
I am using R Version 2.0.1 on a Debian.
Florence.
---------- Forwarded message ----------
From: Florence Combes <fcombes@gmail.com>
Date: Oct 28, 2005 2:48 PM
Subject: multiple graphs in the same ps file ?
To: r-help@stat.math.ethz.ch
Dear all,
I would like to be able to store multiple graphs in one ps or pdf file, but
I cannot achieve this only if I don't
2005 Nov 09
2
read.table error with R 2.2.0
Dear all,
I just upgraded version of R to R 2.2.0, and I have a problem with a script
that did not happen with my previous version.
Here is the error :
-----------------------------------------
> param<-read.table(file="param.dat",sep ="\t",header=TRUE,fill=TRUE,
na.strings="NA")
Erreur dans read.table.default(file = "param.dat", sep =
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 Oct 12
2
subsetting with by() or other function??
I think I must be missing something obvious, but I'm having trouble
getting a data transformation to work on groupings of data within a data
frame (csss3) as defined by 2 factors (population, locid). The data are
sorted by year within locid within population and I want to lag another
variable (dbc), i.e, shift them down by 1 row replacing the first row with
NA, within groups defined by
2004 Oct 19
2
pb with aws package
Dear all,
[I work with a Windows XP Prof. installation, and the 2.0.0 R version]
I need to use the aws package, but I have the following error message:
> require(aws)
Loading required package: aws
Error in firstlib(which.lib.loc, package) :
couldn't find function "lazyLoad"
[1] FALSE
I download the .zip file (for Windows) today on the CRAN site, so I think I
have
2012 Feb 09
1
scan() doesn't like '1.#IND'
Hi,
Since C++ code compiled with g++ 4.6.3 on Windows (the version included
in latest Rtools) now can produce things like '1.#IND' when writing
doubles to a file (using the << operator), I wonder whether scan()
shouldn't support those things. Right now (with recent R devel and
latest Rtools) we get errors like:
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines,
2012 Nov 18
1
identical matrices
Dear R users,
I want to check matrices when i change the order of the rows or/and the order of the columns or/and the combination of them
i will give an example what i want
1 -1 1 1 1 1 1 1
-1 -1 -1 -1 -1 -1 -1 -1
1 1 1 1 1 -1 1 1
these 2 matrices are identical because i change the first row and make it third
1 -1 1 1 -1 1 1 1
-1 -1 -1
2005 Nov 17
2
dev.copy legend problem
Dear all,
We are facing this problem for long, and so ask for your help.
We are plotting 2 graphs in a postscript device (left part -layout
function-), and the common legend for these graphs on the right part.
The legend in the postscript device looks ok: this is color lines with
numbers on the right (6 columns) , see the code below:
> nblock<-c(1:48)
> leg<-paste(c(1:npin),"
2010 May 14
1
Replacing double loop by apply
Dear R-users,
after trying and searching a long time i have the following question.
is it possible to replace to following double loop by some apply calls?
#######################################################################
m1 <- data.frame(v1=factor(letters[1:5]),
v2=factor(letters[2:6]),
v3=factor(letters[3:7]))
m2 <-
2011 Sep 27
1
array extraction
hello everyone.
Look at the following R idiom:
a <- array(1:30,c(3,5,2))
M <- (matrix(1:15,c(3,5)) %% 4) < 2
a[M,] <- 0
Now, I think that "a[M,]" has an unambiguous meaning (to a human).
However, the last line doesn't work as desired, but I expected it
to...and it recently took me an indecent amount of time to debug an
analogous case. Just to be explicit, I would
2005 Oct 28
1
multiple graphs in the same ps file ?
Dear all,
I would like to be able to store multiple graphs in one ps or pdf file, but
I cannot achieve this only if I don't shut the "postscript" device between
the graphs.
here is what I managed to do :
> postscript(file="test_graph.eps", onefile=TRUE)
> plot(1:10)
> plot(1:20)
>
> dev.off()
2005 May 19
1
R from Perl -- RSPerl and lines function.
Dear R-helpers,
I am running well Perl and R on my Debian Linux, and I tried RSPerl.
Installation is ok and all simple functions run well. But I have a
problem to call the "lines" function.
I would like to draw an histogram with the density curve on. Is is OK
in R with the command:
>x<-rnorm(1000)
>hist(x,prob=T)
>lines(density(x))
for example.
Now, I have a Perl script
2012 Aug 27
3
Changing entries of column of type "factor"/Adding a new level to a factor
What is a smart way to change an entry inside a column of a dataframe or
matrix which is of type "factor"?
Here is my script incl. input data:
> #set working directory:
> setwd("K:/R")
>
> #read in data:
> input<-read.table("Exampleinput.txt", sep="\t", header=TRUE)
>
> #check data:
> input
Ind M1 M2 M3
1 1
2023 Jul 06
1
printCoefmat() and zap.ind
Hi All,
I would like to ask two questions about printCoefmat().
First, I found a behavior of printCoefmat() that looks strange to me,
but I am not sure whether this is an intended behavior:
``` r
set.seed(5689417)
n <- 10000
x1 <- rnorm(n)
x2 <- rnorm(n)
y <- .5 * x1 + .6 * x2 + rnorm(n, -0.0002366, .2)
dat <- data.frame(x1, x2, y)
out <- lm(y ~ x1 + x2, dat)
out_summary <-
2015 Nov 18
2
Cannot chown file to active directory user/group on member server
On Wed, Nov 18, 2015 at 6:00 AM, Rowland Penny <rowlandpenny241155 at gmail.com
> wrote:
> On 18/11/15 10:27, Jeff Dickens wrote:
>
>>
>>
>> On Nov 18, 2015 4:35 AM, "Rowland Penny" <rowlandpenny241155 at gmail.com
>> <mailto:rowlandpenny241155 at gmail.com>> wrote:
>> >
>> > On 17/11/15 23:09, Jeff Dickens wrote:
2005 Oct 06
2
factor : how does it work ?
Dear all,
I try for long to understand exactly what is the factor type and especially
how it works, but it seems too difficult for me....
I read paragraphs about it, and I understand quite well what it is (I think)
but I still can't figure how to deal with.
Especially these 2 mysteries (for me) :
1st when I make a dataframe (with the as.data.frame() or the data.frame()
commands) from
2015 Nov 17
3
wbinfo -i -> failed to call wbcGetpwnam: WBC_ERR_DOMAIN_NOT_FOUND
Created a new thread because I screwed up and top-posted.
So I am still stuck. For reference here is the smb.conf on the member
server:
root at florence:~# more /etc/samba/smb.conf
[global]
netbios name = FLORENCE
security = ADS
workgroup = IOL
realm = IOL.SEAMANPAPER.COM <http://iol.seamanpaper.com/>
log file = /var/log/samba/%m.log
log level
2023 Jul 07
1
printCoefmat() and zap.ind
>>>>> Shu Fai Cheung
>>>>> on Thu, 6 Jul 2023 17:14:27 +0800 writes:
> Hi All,
> I would like to ask two questions about printCoefmat().
Good... this function, originally named print.coefmat(),
is 25 years old (in R) now:
--------------------------------------------------------------------
r1902 | maechler | 1998-08-14 19:19:05 +0200 (Fri,
2015 Nov 17
1
using chown on server with Domain username
Just replied to another thread with the same problem...
This is on a member server, not the DC.
No the second chgrp command with the escaped space doesn't work.
Getent returns big numbers for the uids and gids.... too big, I think.
root at florence:/home# getent passwd Administrator
administrator:*:4294967295:4294967295::/home/IOL/administrator:/bin/false
root at florence:/home# getent