Displaying 20 results from an estimated 7000 matches similar to: "Matrix manipulation"
2008 Jan 22
1
ODE's in R
Dear all,
Has anybody tried numerical solving of ODE's and/or transport equations
in R? (Don't ask how we ended up in using R for this job, in the first
place!)
More precisely, does anybody know any technical issue that could make
the work insecure in the sense of propagation of errors? Is there any
track of evidence that R is, in this kind of task, less reliable than
e.g. MatLab?
2009 Sep 04
5
< 0 x 0 matrix >
Hi,
Does anybody know, what is going on here?
> diag(sqrt(1))
[,1]
[1,] 1
> diag(sqrt(0.3333))
<0 x 0 matrix>
> sqrt(1)
[1] 1
> sqrt(0.3333)
[1] 0.5773214
BR, Markku Karhunen
researcher
University of Helsinki
2012 Oct 12
3
Loss of dimensions in subsetting arrays
Hi all,
I've been wondering for a long time why R drops the dimensions of an
array/matrix when you try to take a subset of one column. I mean this:
dim(A)
[1] 2 5 2
B=A[1,,]
dim(B)
5 2 # so now dim(B)[3] doesn't work
C=B[2,]
dim(C)
NULL # so now nrow(C) doesn't work
Typically, you can get rid of this by writing as.matrix, as.array(...)
but that generates extra lines of code.
2006 Nov 19
4
The most common row in a matrix?
Hi,
How do you get the most common row from a matrix? If I have a matrix
like this
array(1:3,dim=c(4,5))
[,1] [,2] [,3] [,4] [,5]
[1,] 1 2 3 1 2
[2,] 2 3 1 2 3
[3,] 3 1 2 3 1
[4,] 1 2 3 1 2
in which rows 1 and 4 are similar, I want to find that vector c
(1,2,3,1,2).
Atte Tenkanen
University of Turku, Finland
2006 Jun 19
3
Border line width?
Is there some way to change the line widths of plot borders?
I couldn't find any parameters for that purpose.
Atte Tenkanen
University of Turku, Finland
2006 Aug 16
5
How to remove similar successive objects from a vector?
Is there some (much) more efficient way to do this?
VECTOR=c(3,2,4,5,5,3,3,5,1,6,6);
NEWVECTOR=VECTOR[1];
for(i in 1:(length(VECTOR)-1))
{
if((identical(VECTOR[i], VECTOR[i+1]))==FALSE){
NEWVECTOR=c(NEWVECTOR,VECTOR[i+1])}
}
> VECTOR
[1] 3 2 4 5 5 3 3 5 1 6 6
> NEWVECTOR
[1] 3 2 4 5 3 5 1 6
_______________________________
Atte Tenkanen
University of Turku, Finland
2005 May 31
2
A suggestion to improve ifelse behaviour with vector yes/no arguments
Dear All,
I luckily found the following feature (or problem) when tried to apply ifelse-function to an ordered data.
> test <- c(TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE)
> ifelse(test, 0, 1:4)
[1] 0 0 0 4 1 2 3
>
It roots into the ifelse-syntax:
ans[!test & !nas] <- rep(no, length.out = length(ans))[!test & !nas]
Would it be possible to disable this feature in the
2006 Jun 16
3
Vector Manipulation
I have a vector that has 1,974 elements and each element is one of the
following (B, F, N, Y). How do I recreate that vector accept in the
place of N put 0 and in the place of B, F or Y put a 1?
Thanks,
Jacob
[[alternative HTML version deleted]]
2005 Mar 24
1
Robust multivariate regression with rlm
Dear Group,
I am having trouble with using rlm on multivariate data sets. When I
call rlm I get
Error in lm.wfit(x, y, w, method = "qr") :
incompatible dimensions
lm on the same data sets seem to work well (see code example). Am I
doing something wrong?
I have already browsed through the forums and google but could not find
any related discussions.
I use Windows XP and R
2004 Oct 20
2
Odd behaviour with scale()
Moi!
A student here has been getting a bit irritated with some side effects
of scale() (OS is Windows XP, the behaviour occurs in R 2.0.0, but not
1.7.1). The problem is that she scales a variable in a data frame, then
does a regression, and tries to get some predictions for some new data.
However, at this point she gets an error (see the example below). This
seems to be because the
2005 Aug 17
2
About R variable references
Hello Group,
I could use an advice on how SEXP handles work. My aim is to implement a
system where I initially set a few global variables that are used for
communication between C and R code. Then I do some work with R code and
periodically call a function of my own that will update the system
state. Such a design is useful for many purposes (for GUIs to name one).
I am not entirely sure that R
2013 Jun 12
2
KBDMAP - extlinux 5.xx
On Thu, 06 Jun, at 01:11:53AM, poma wrote:
>
> Standalone directive 'kbdmap <kbd>.ktl' doesn't work within series 5.
> Tested via 5.00, 5.01 and 5.10.
> It works within series 4 - tested via 4.05 and 4.06.
> Is it a bug, or is it a feature?
Could you provide me with your .ktl file?
--
Matt Fleming, Intel Open Source Technology Center
2013 Jun 13
2
KBDMAP - extlinux 5.xx
On Thu, 13 Jun, at 12:40:48PM, poma wrote:
> Regarding [1], [2], and [3], I somehow doubt that this is a '*.ktl' i.e.
> "Keyboard Table for Lilo" problem.
> Which ones of these[4] produced by the 'keytab-lilo' you need?
> All of them[4] were tested. ;)
Any one will do. I just want to reproduce this bug.
--
Matt Fleming, Intel Open Source Technology Center
2005 Oct 20
2
String manipulation
R-help,
I have a data frame which contains a character string column that is
something like;
II11
II18
II23
III1
III13
III16
III19
III2
III7
IV10
IV11
IV12
IX16
IX4
V12
V18
V2
V20
V23
V4
VII14
VII18
VII21
VII26
VII28
VII33
VII4
VII48
VII5
....
....
....
I want to apply a function (e.g mean) by grouping according to the
roman part of the string, i.e,
by I
by V
by VII
...
...
and so on.
I have
2002 Oct 14
1
mount_smbfs: can't get handle to requester (no /dev/nsmb* device)
Hi all !
I have a little problem here mounting or browsing samba shares.
I have a FreeBSD 4.6.2 running samba, and a share on that called public.
when I try to mount that share it asks for password, and then gives an
error:
ex.
libra# mount_smbfs //maxi@samba/public /mnt
Password:
mount_smbfs: can't get handle to requester (no /dev/nsmb* device)
libra#
I can list the shares with
2007 Sep 29
3
Data manipulation
Hello,
I am beginner in R and I would like to solve the following problem:
Suppose that we have three files to be red in R d1, d2, and d3
> d1
id x1 x2
1 1 4 n
2 2 3 h
3 3 0 f
> d2
id x1 x2
1 1 2 r
2 2 3 u
3 3 1 f
> d3
id x1 x2
1 1 2 a
2 2 1 w
Is there any library or function that one can read this datasets like
for(i in 1:3)
d[i] <-
2007 Dec 20
2
factor manipulation: edgelist to a matrix?
Hello All,
I have had considerable bad luck with attempting the following with for
loops. Here is the problem:
# Suppose we have a data.frame with the following data, which can be
considered a type of edgelist (for those with networks backgrounds):
#
# V1 V2
# 1 A
# 1 A
# 1 B
# 2 A
# 3 C
# 3 A
# 3 C
# 3 B
#
# I want the output of the function to produce a matrix, such that #each
factor of
2015 Dec 29
2
keytab-lilo: update to support kbd 2.0.3 format
> On 27.12.2015 23:57, Jernej Simon?i? via Syslinux wrote:
> > On Sunday, December 27, 2015, 23:34:11, Ady via Syslinux wrote:
> >
> >> How this change would affect users with older versions of kbd /
> >> loadkeys / or in older OSes? I mean, let's assume a user using a newer
> >> version of Syslinux (containing this proposed change in its keytab-lilo
2013 Sep 04
5
5.10 regression (from 5.01) MENU INCLUDE broken.
Hello,
Long story short, example config:
### cut
UI vesamenu.c32
MENU TITLE Multiboot USB
MENU BACKGROUND #00000000
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel 37;44 #50ffffff #a0000000 std
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
MENU BEGIN
MENU TITLE System Rescue CD 2.4.1
INCLUDE sysrcd-2.4.1.conf
MENU END
MENU BEGIN
MENU TITLE
2016 Mar 07
2
keytab-lilo: update to support kbd 2.0.3 format
On 29.12.2015 22:51, poma wrote:
> On 29.12.2015 22:20, Ady via Syslinux wrote:
>>
>>> On 27.12.2015 23:57, Jernej Simon?i? via Syslinux wrote:
>>>> On Sunday, December 27, 2015, 23:34:11, Ady via Syslinux wrote:
>>>>
>>>>> How this change would affect users with older versions of kbd /
>>>>> loadkeys / or in older OSes? I