Displaying 20 results from an estimated 20000 matches similar to: "array elements incorrect"
2008 Jul 29
2
accessing list elements
Hello everyone,
I have a list which I am trying to calculate a max value.I have the list as w<-c(v[[1]][1],...v[[100]][1]). The problem I am getting is that the function max is saying the list is an "invalid
type (list) of argument".When I show the element v[[1]][1] it shows as $statistic,V,736.I am only wanting to use the number 736 from v[[1]][1] but am not sure how to access that
2008 May 09
7
histogram
Dear R-expert,
For histogram function, can we get the table of bin and frequency like in excel, together with the histogram?
Therefore, we can check the number of data included.
Thank you so much for your attention and help.
____________________________________________________________________________________
[[elided Yahoo spam]]
2009 Aug 21
1
Appending elements according to criteria to an empty array
Hi all R users,
I am trying to extract elements from an array (x as shown below) where the
difference between the consecutive elements does not equal 1.
The desired output is:
j = 6,17,27,38,58,69,79,90
However, the code below only returns:
j = 1,69,79,90
I am assuming that "cbind" function is not extracting all the elements
meeting the condition. In
2010 Dec 27
2
Finding indexes of minum and maximum elements of an array
Hello there
I wish to get the "coordinates" of the minimum element of an array.
For example, if the array were
> H = array(c(8:5,1:4),dim=c(2,2,2))
> H
, , 1
[,1] [,2]
[1,] 8 6
[2,] 7 5
, , 2
[,1] [,2]
[1,] 1 3
[2,] 2 4
then
> min(H)
[1] 1
and
> max(H)
[1] 8
Say "idx" were the function I'm looking for. Then, what
2008 Jun 02
3
print and read.table commands
Hello to everyone,
I am new to programming in R and am having trouble with the following
two commands
1.I am running a simple 1 line script "read.table(file="C:\\Document and Settings\\All Users\\Desktop\\colon cancer.txt) and the error message I get is "Error in file (file, "r"): cannot
open the connection In addition warning message In file (file, "r"):
2012 Mar 30
2
Finding the maximum elements in an array/matrix
Hello,
I would like to find the maximum element in a matrix or an array but it
does not return what I want.
For example, If I have a 2*2 matrix A whose maximum element is the
A(1,2). I would like the answer (1,2), but it returns 3, which is the
ordinal if one counts by columns. Is there any function that returns (1,2)?
Thanks
> A<-rbind(c(1,4), c(3,2))> A [,1] [,2]
[1,]
2011 May 08
2
Device context (get_dc) Question from printing.rb in wxRuby samples
I am using Windows XP SP 3 but want to stay general.
Below is a method within printing.rb. I have added comments marked by #--.
My question is about get_dc. The device context is obviously created and
the code works as presented.
It also works as documented below. Why does just get_dc satisfy the
linkage?
When does one use the Wx:: or the Wx::PrintOut format? How does one decide
to use
2005 Oct 17
2
how to find indices of particular array elements
Dear R helpers,
I have a largish matrix (1300 x 1300) and I wish to find the row and column
numbers that identify particular elements whose values I know in advance
(for example, the row and column numbers for the maximum value of the
matrix).
I have looked in the help manual and found the functions 'row' and 'col' for
finding the indices of a matrix. But, I can't figure out
2024 Mar 26
2
Printout and saved results
How can I have both printout and saved results at the same time.
The subroutine first return "out" and the printout gets printed, but not
saved.
I then run the "invisible" line. Results got saved and accessible but no
printout.
How can I have both printout and also have the results saved? Thank you!
> dstat4 <- function(data,digits=3){
+?? Mean??? <-
2008 Jul 13
1
(no subject)
Hello everyone,
I am using the following code to try to calculate the mean :
dat<-read.table(file="C:\\Documents and Settings.....txt")
dat<-as.numeric(dat)
x1.m<mean(dat)
I am getting the following error message
Error in eval.with.vis(expr,envir,enclos):
(list) object cannot be coerced to type"double'
I do not understand what is wrong as I thought that I have changed
2008 Jun 21
2
boxplot problem
Hello everyone,
I am trying to plot a boxplot but am coming up with the error :
"could not find function dat" I have used the following code.
dat<-read.table(file="C:\\Documents and Settings\\.......txt",header=T,row.names=1,blank.lines.skip=F,na.strings="NA")
file.show(file="C:\\Documents and Settings\\......txt")
2008 Jun 18
1
subarray
Hello everyone,
I am trying to subset a matrix with the following code:
dat<-read.table(file="C:\\Documents and Settings\\Owner\\My Documents\\Yeast\\Yeast.txt",header=T,row.names=1)
file.show(file="C:\\Documents and Settings\\Owner\\My Documents\\Yeast\\Yeast.txt")
Z.matrix<-as.matrix(dat)
Y<-array(dat,dim(,[46:63])
but I keep getting the error message: error in dim
2024 Mar 26
1
Printout and saved results
Not clear what you mean by "saved".
If you call a function and the result is printed, the result is
remembered for a wee while in
the variable .Last.value, so you can do
> function.with.interesting.result(.......)
> retained.interesting.result <- .Last.value
or even
> .Last.value -> retained.interesting.result
If you know before you start writing the expression that you
2005 Apr 19
2
indexing an array using an index-array, but one entry being ', '
Hi
I have the following array:
test <- array(c(1:16), dim = c(3,4,3))
test
## I call some enries using an index array
test.ind <- array(rbind(c(1,2,1), c(3,3,2)), dim = c(2,3))
test[test.ind]
## suppose I want all values in the 2nd row and 4th col over
## all three 3rd dimensions
test[2,4,]
how to specify a test.ind array with the last index left with ',' i.e
test.ind should be
2013 Oct 14
1
Extracting elements of model output
I am having difficulty extracting specific results from the model
object. The following code shows where I am stuck.
I want to run resamplings of a data set. For each I want to extract a
particular F for the contrasts. If I run a very simple model
(e.g. model1 <- aov(time~group) ) I can get the relevant coefficients,
for example, by using "model1$coefficients". That's fine.
2007 Mar 20
1
centos raid 1 question
Hi,
im having this on my screen and dmesg im not sure if this is an error
message. btw im using centos 4.4 with 2 x 200GB PATA drives.
md: md0: sync done.
RAID1 conf printout:
--- wd:2 rd:2
disk 0, wo:0, o:1, dev:hda2
disk 1, wo:0, o:1, dev:hdc2
md: delaying resync of md5 until md3 has finished resync (they share one or
more physical units)
md: syncing RAID array md5
md: minimum _guaranteed_
2008 Jul 08
1
Plot
Hello everyone,
I am trying to plot an MvA plot with the following code:
dat<-read.table(file="C:\\Documents and Settings\\.....txt",header=T)
file.show(file="C:\\Documents and Settings\\Ow.......txt")
library(sma)
data(MouseArray)
dat.o<-as.list(dat)
dat.o$R.2<-as.matrix(dat[,c(1:5)])
dat.o$G.2<-as.matrix(dat[,c(6:10)])
dat.o$Gb.2<-as.matrix(dat[,c(11:15)])
2008 Jul 26
1
error in test
Hello everyone,
I am trying to use the following code:
dat<-read.table(file="C:\\Documents.....txt")
class2<-read.table(file="C:\\Documents.....txt")
class1<-read.table(file="C:\\Documents .....txt")
dat<-as.data.frame(dat)
dimnames(dat)[[1]]<-paste("g",c(1:nrow(dat)),sep="")
2008 Jun 08
1
eliminating and relabeling the first column
Hello everyone,
I have a data frame in which I am wanting to eliminate the row labels and then relabel the rows with
g1-g2000.I have used the following code:
dat<-read.table(file="C:\\Documents and Settings\\Owner\\My Documents\\colon cancer1.txt",header=T,row.names=1)
file.show(file="C:\\Documents and Settings\\Owner\\My Documents\\colon cancer1.txt")
I thought that this
2024 Mar 26
1
Printout and saved results
I just like the subroutine to spit out results (Mean, Std.dev, etc.) and
also be able to access the results for further processing, i.e.,
v$Mean
v$Std.dev
On 3/26/2024 11:24 AM, Richard O'Keefe wrote:
> Not clear what you mean by "saved".
> If you call a function and the result is printed, the result is
> remembered for a wee while in
> the variable .Last.value, so