Displaying 20 results from an estimated 700 matches similar to: "how to read this matrix into R"
2011 Nov 28
2
problem in reading file
Hi,
I have a file that looks like this :
one,0
two,0.591,0
three,0.356,0.350,0
four,-0.098,0.072,0.380,0
five,0.573,0.408,0.382,0.062,0
six,0.156,0.232,0.517,0.424,0.303,0
seven,0.400,0.414,0.611,0.320,0.401,0.479,0
eight,0.282,0.375,0.512,0.346,0.308,0.463,0.605,0
nine,0.519,0.484,0.467,0.167,0.455,0.311,0.574,0.557,0
I want to create a data matrix out of it, so I tried this :
2008 Mar 25
1
Subset of matrix
Dear R users
I have a big matrix like
6021 1188 790 290 1174 1015 1990 6613 6288
100714
6021 1 0.658 0.688 0.474 0.262 0.163 0.137 0.32
0.252 0.206
1188 0.658 1 0.917 0.245 0.331 0.122 0.148 0.194
0.168 0.171
790 0.688 0.917 1 0.243 0.31 0.122 0.15 0.19
0.171 0.174
290 0.474
2012 Jul 02
1
How to get prediction for a variable in WinBUGS?
Dear all,I am a new user of WinBUGS and need your help. After running the following code, I got parameters of beta0 through beta4 (stats, density), but I don't know how to get the prediction of the last value of h, the variable I set to NA and want to model it using the following code.Does anyone can given me a hint? Any advice would be greatly appreciated.Best
2009 Feb 23
1
why results from regression tree (rpart) are totally inconsistent with ordinary regression
Hi,
In my analysis of impacts of insecticide-treated bednets on malaria, I
look at the relationship between malaria incidence and mosquito
behaviors. The condensed data set is copied here. Ordinary regression
(lm) shows that Incidence was negatively related to Mortality. This
makes sense because the latter reflected the strength of killing
mosquitoes by insecticide-treated nets. Since the
2018 May 15
0
Systemfit
... and the mailing list is picky about attachments... whatever you attached did not conform to the stringent requirements mentioned in the Posting Guide. Pasting the code right into the email is usually safest, though you DO have to post using plain text (as the Posting Guide indicates) or your code may get mangled by the automatic html format removal.
On May 15, 2018 7:04:31 AM PDT, Bert Gunter
2009 Jan 31
1
thurston case 5
Hi, I hope some one can help. I need to compute Thurston's case 5 on a large
set of data. I have gotten as far as computing the proportional preference
matrix but the next math is beyond me.
Here us my matrix
0.500 0.472 0.486 0.587 0.366 0.483 0.496 0.434
0.528 0.500 0.708 0.578 0.633 0.554 0.395 0.620
0.514 0.292 0.500 0.370 0.557 0.580 0.615 0.329
0.413 0.422 0.630 0.500 0.783 0.641 0.731
2018 May 15
1
Systemfit
Unless there is good reason not to, always cc the list -- there are lots of
smarter folks than I on it who can help.
I may or may not have time to look at this. Hopefully someone else will.
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip
2018 May 15
2
Systemfit
OK, Let's try this again! Here is the reproducible script; it is long because I had to copy the panel dataset here. My question is related to systemfit; I don't know how to get the result for the entire panel.
#Reproducible script
Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv")
View(Empdata)
install.packages("systemfit")
2013 Feb 01
29
cumulative sum by group and under some criteria
Thank you very much for your reply. Your code work well with this example.
I modified a little to fit my real data, I got an error massage.
Error in split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) :
Group length is 0 but data length > 0
On Thu, Jan 31, 2013 at 12:21 PM, arun kirshna [via R] <
ml-node+s789695n4657196h87@n4.nabble.com> wrote:
> Hi,
> Try this:
>
2004 Sep 21
3
how to take this experiment with R?
How about:
x <- data.frame(matrix(rnorm(1550),c(50,31)))
model <- step(lm(x[,1] ~ as.matrix(x[,2:31])))
--Matt
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of rongguiwong
Sent: Monday, September 20, 2004 20:52 PM
To: r-help at stat.math.ethz.ch
Subject: [R] how to take this experiment with R?
This message uses
2018 May 16
0
Systemfit
Sadly you failed to set your email program to send plain text and the data is corrupted at my end.
I also think you need to reduce the size of the data set... the intent here is to increase your understanding, not debug your particular analysis.
I will say that I am having a very challenging time understanding what you are trying to accomplish though. What are the equations that you think need
2004 Oct 18
3
how to study the code of R
i want to study R programming by studying the existing code from R itself,but
i don't know how to read the code,can any one give me some guide?
my R is installed in /usr/lib/R/
[ronggui at mylinux ronggui]$ /usr/lib/R/
afm bin doc etc include library modules share
> version
_
platform i586-mandrake-linux-gnu
arch i586
os linux-gnu
system i586,
2007 Aug 10
7
Help wit matrices
Hello all,
I am working with a 1000x1000 matrix, and I would like to return a
1000x1000 matrix that tells me which value in the matrix is greater
than a theshold value (1 or 0 indicator).
i have tried
mat2<-as.matrix(as.numeric(mat1>0.25))
but that returns a 1:100000 matrix.
I have also tried for loops, but they are grossly inefficient.
THanks for all your help in advance.
Lanre
2004 Nov 03
2
how to compute condition index?
is there any existing function for computing condition index?
" analysing multivariate data" say that we can use condition index to check
multicollinearity.saying that we can get it via SVD. The elements of the
diagnoal matrix are the standard deviations of the uncorrelated vectors. the
condition index is the ratio of the largest of these numbers to the smallest.
so if i have a data
2010 Feb 17
2
extract the data that match
Hi r-users,
I would like to extract the data that match. Attached is my data:
I'm interested in matchind the value in column 'intg' with value in column 'rand_no'
> cbind(z=z,intg=dd,rand_no = rr)
z intg rand_no
[1,] 0.00 0.000 0.001
[2,] 0.01 0.000 0.002
[3,] 0.02 0.000 0.002
[4,] 0.03 0.000 0.003
[5,] 0.04 0.000 0.003
[6,]
2004 Jan 19
1
qda problem
Hi,
the following strange error appears when I use qda:
> qda1 <- qda(as.data.frame(mfilters[cvtrain,]),as.factor(traingroups))
Error: function is not a closure
That's also strange:
> qda1 <- qda(mfilters[cvtrain,],as.factor(traingroups))
Error in qda.default(mfilters[cvtrain, ], as.factor(traingroups)) :
length of dimnames must match that of dims
Some backgroud:
>
2006 Apr 27
1
Plotting Data Frame
Dear R community members,
I think I am asking a very simple question, but I really looked up in
the faqs and manuals and found nothing helpful.
I am trying to plot a data frame with the following structure (this is
just a small extract):
glo conc odor line series X1 X2 X3 X4 X5
X6 X7 X8 X9 X10 X11 X12 X13
1 0 AIR LN1 UP -0.488
2008 Feb 19
4
[LLVMdev] 2008-01-25-ByValReadNone.c Failure
Hi all,
I'm seeing this failure on my PPC G4 box running TOT with llvm-gcc
4.2. Is anyone else seeing this? I'm sure it's related to the byval
stuff that's recently gone into LLVM. I'm attaching the output of
this command:
$ llvm-gcc -emit-llvm -O3 -S -o - -emit-llvm /Users/wendling/llvm/
llvm.src/test/CFrontend/2008-01-25-ByValReadNone.c
As you can see in it, there
2007 Jul 19
3
Can I test if there are statistical significance between different rows in R*C table?
Dear friends,
My R*C table is as follow:
better
good
bad
Goup1
16
71
37
Group2
0
4
61
Group3
1
6
57
Can I test if there are statistical significant between Group1 and
Group2, Group2 and Group3, Group1 and Group2, taking into the multiple
comparisons?
The table can be set up using the following program:
a<-matrix(data=c(16,71,37,0,4,61,1,6,57),nrow=3,byrow=TRUE)
Thanks
2010 Jun 26
1
predict newdata question
Hi:
I am using a subset of the below dataset to predict PRED_SUIT for
the whole dataset but I am having trouble with 'newdata'. The model
was created with 153 records and want to predict for 208 records.
wolf2 <- structure(list(gridcell = c(367L, 444L, 533L, 587L, 598L, 609L,
620L, 629L, 641L, 651L, 662L, 674L, 684L, 695L, 738L, 748L, 804L,
805L, 872L, 919L, 929L, 938L, 950L, 958L,