similar to: Subscripting Matrices

Displaying 20 results from an estimated 1300 matches similar to: "Subscripting Matrices"

2008 Oct 21
4
subscripting a one column matrix drops dimension
Hi all, Why subscripting a one column matrix drops one dimension? > x<- matrix(rnorm(100), ncol=1) > str(x) num [1:100, 1] -0.413 -0.845 -1.625 -1.393 0.507 ... > str(x[20:30,]) num [1:11] -0.315 -0.693 -0.771 0.448 0.204 ... > str(x[20:30]) num [1:11] -0.315 -0.693 -0.771 0.448 0.204 ... This breaks: > cov(x) [,1] [1,] 0.9600812 >
2006 Mar 17
3
can't load "geoR"
Dear R list, I've just installed R and then followed the instructions to install the package "geoR" from within R by using the following line of code: install.packages("geoR", contriburl = "http://www.est.ufpr.br/geoR/windows") This installed okay under the folder C:\documents and settings\ ... But when I follow the instructions in the illustrative session
2005 Apr 07
1
Linux, Maildir over NFS, Locking problems
Hi, I am having problems with file locks with my NFS mounted Maildir setup. NFS Client/IMAP Server is RHEL3 clone whitebox and NFS server is a Fedora Core 2 system. Both are running lockd as far as I can tell. dovecot is installed with Dag's latest dovecot RPMs for RHEL3. Time is synced between the two systems. Here is the pertinent log file entry dovecot: Dovecot starting up Apr 7
2004 Nov 04
3
Promise raid cards
Hello. I would like to know if promise RAID cards are compatible with CentOS / RHEL ? I have seen that only SATA is supported on the RHEL hardware compatibility list. The other ATA raid cards seems not to be compatible. They give source code and promise grants compatibility with RedHat 8 and 9 but not RHEL. I would like to know if somebody tried a ATA raid card like Fasttrack TX2000, SX4000,
2019 Sep 19
3
Improving partial lookup results
Incidentally, if you're actually aiming to match different forms of a name (Peter vs Pete, Ann vs Anne vs Annette) then you might find the synonym feature a better option than wildcarding. You'd need to give it a list of names to treat as synonyms, but it should have many fewer false positives, and can also handle cases which aren't just a substring - e.g. Robert vs Rob vs Bob vs
2013 Sep 04
18
[PATCH v8] interrupts: allow guest to set/clear MSI-X mask bit
Guest needs the ability to enable and disable MSI-X interrupts by setting the MSI-X control bit, for a passed-through device. Guest is allowed to write MSI-X mask bit only if Xen *thinks* that mask is clear (interrupts enabled). If the mask is set by Xen (interrupts disabled), writes to mask bit by the guest is ignored. Currently, a write to MSI-X mask bit by the guest is silently ignored. A
2006 Oct 04
2
convert vector to matrix
Hi All, I have vector containing 10 elements(odservations). I need to put this into a matrix, where the matrix should contain only one column. I need this to be done using the cbind command because in the final table I should have a column of attributes( from adifferent vector) and a column of vectors from the matrix above Please suggest me how this can be done Thanks and
2006 Nov 03
2
one row matrix
Hi, when I assign a one row matrix to another variable, then somehow R automatically convert that varaible into a list. For example: > a = matrix (12, 3, 4) > b = a[1,] > b [1] 12 12 12 12 Is there a way to enable R automatically make b as a one row matrix , rather than explicitly assign like matrix (b, ncol=1). I have come across a couple of time, that when I try to check how many
2011 Sep 02
2
How to keep the same class?
Hello Please see the example below > class(testX) [1] "matrix" > class(testX[1,]) [1] "numeric" Why not matrix? What am I missing here? Is there a way to keep the same class? The reason for the question is that I want to implement a k-step ahead prediction for my own routines and R wrecks does not seem to like [1,] as shown below. >
1997 May 25
5
signing syslog files with PGP
I am thinking about writing some sort of deamon which signs syslog files with PGP. This should help dedecting unauthorised changes in the syslog files. What I have in mind works as follows: Whenever a new line is added to a syslog file the existing syslog file checked against the privious made signature. If the file passes this test, the new line(s) is/are added. Then a new signature is
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.
2010 Feb 17
1
function to display histogram fails to do so when histogram is not the last expression in the function
TestHistogram_A is a function that plots a histogram, then returns 3. For me it fails to display the plot, at least in the order given below. TestHistogram_B is a function that plots a histogram, then exits. The only difference between the 2 functions is that B does not return 3. It displays the plot. This problem does not occur when histogram is replaced by boxplot Their use
2010 Apr 06
2
respecting original matrix dimensions
Hi All, I'm hoping someone else can help me out with this. I am doing some matrix algebra using sub-parts of matrices, and sometimes I need only a single row/column of the original matrix. However, whenever I pull out only a single row/column, R returns a row vector, but often this will break my matrix algebra. Is there any *easy* way to get R to remember what the single row/column came out
2011 Jun 01
1
as.character limits length of result for formula
If you want a character representation of a long formula (or a formula with long names), you can use: as.character(my.formula) However restriction on length of an as.character result returns only the beginning of a long formula, and without comment. In most cases, the following expression provides the complete result: paste(my.formula[[2]], " ~ ",
2007 May 01
2
Matrix column name
Dear R users, Having searched the mail archive I think the conclusion was that it is not possible to have a column name when there is only one column in the matrix. But I thought I'd check with the more experienced users. What I tried to do was: in a loop I pick a column, record the column name and remove the column from the matrix. But when there were 2 columns left, after one column was
2010 Feb 10
2
Subscripting
Dataframe1 contains a list of specific dates. Dataframe2 contains a large dataset, one element of which is Date. How do I create a subset of Dataframe2 that excludes the dates from Dataframe1? I know how to do it with a left outer join vs null in SQL, but I can't figure out how to do it more directly via the subcripts that already exist? Dateframe1 Date 1/1/2010 1/18/2010 Dataframe2 Date
1999 May 09
1
subscripting in list() (PR#187)
Sorry My previous report is not detailed. In R, you will get this: > mylist <- list() > mylist[[1]] Error in mylist[[1]] : subscript out of bounds > mylist[[1]] <- c(1) Error: (list) object cannot be coerced to vector type 14 > mylist[[1]] <- c(1,2) > mylist[[1]] <- c(1) > mylist [[1]] [1] 1 I was trying to assigning c(1) to (mylist[[1]] <- c(1)) -- it seems
2019 Apr 05
1
subscripting a terms object
Someone sent me a bug report for survival2.44.1-1 that involves a model with both cluster and offset.? It turns out to be a 3 part issue with [.terms and my own untangle.specials routine.?? I've spent an evening sorting out the details. ? 1. The delete.response() function doesn't remove the response from the dataClasses attribute, which leads to a later failure in [.terms for
1999 Oct 08
1
dimnames and subscripting (PR#293)
I am not sure that this is a bug, but it was unexpected -- of course my expectations are fallible, eg column ordering in model.matrix()! When an array is subscripted the names of the dimnames list are lost (v 64.1). fred <- array(1:12, 2:4, list(A = letters[1:2], B = letters[3:5], C = letters[6:9])) dimnames(fred) dimnames(fred[1, , ]) dimnames(fred[1, , , drop=FALSE]) In the first
2003 Sep 24
1
partial matching in data frame subscripting
I'm not sure if the following is a bug or a feature: > jjmat <- array(1:6, c(2,3), list(c('ABC', 'DEF'), c('xyz', 'tuv', 'qrs'))) > jjdf <- as.data.frame(jjmat) > jjmat['AB', ] Error: subscript out of bounds > jjdf['AB',] xyz tuv qrs ABC 1 3 5 > jjmat[, 'tu'] Error: subscript out of bounds