similar to: Problem with a Matrix

Displaying 20 results from an estimated 5000 matches similar to: "Problem with a Matrix"

2013 Mar 06
8
Understanding lm-based analysis of fractional factorial experiments
All, I have just returned to R after a decade of absence, and it is good to see that R has become such a great success! I'm trying to bring Design of Experiments into some aspects of software performance evaluation, and to teach myself that, I picked up "Experiments: Planning, Analysis and Optimization" by Wu and Hamada. I try to reproduce an analysis in the book using lm, but
2010 Mar 02
1
simple data transformation question
Hi all, I have a (hopefully) simple newbie-level question.   # I have data like this: dtf <- data.frame(read.table(textConnection("var  value   company  9887.1   company  91117.0   blaah  91.1   etc  11   etc  97111"), header=TRUE))   # I would like to have output like this (the index number may vary): var  value.1 value.2 company 9887.1 91117.0 blah  91.1 NA etc 11 97111   # I
2006 Nov 30
1
data.frame within a function (PR#9294) (cont'd)
This continues the message "data.frame within a function (PR#9294)" that was posted on 2006/10/12. Duncan Murdoch kindly replied. I'm using the current version R 2.4.0, but the same issue exists. Just copy and paste the following code under R, and compare the output of f1() and f2() and the output of f3() and f4(). Does anybody have any idea? Thanks.
2011 Oct 13
8
Remove specific rows in a matrix/data.frame
Hi, imagine the following matrix/data.frame Letter Number a 1 a 1 b 1 b 0 c 0 c 1 d 0 d 0 If the numbers for two identical letters are also identical then I want to remove either the first or the second row of that letter. If for a letter the numbers are 1 and 0 I want to remove the row with the 0. That means if the code works I would and up with the following matrix/data.frame Letter
2006 Oct 04
1
extracting nested variances from lme4 model
I have a model: mod1<-lmer( x ~ (1|rtr)+ trth/(1|cs) , data=dtf) # Here, cs and rtr are crossed random effects. cs 1-5 are of type TRUE, cs 6-10 are of type FALSE, so cs is nested in trth, which is fixed. So for cs I should get a fit for 1-5 and 6-10. This appears to be the case from the random effects: > mean( ranef(mod1)$cs[[1]][1:5] ) [1] -2.498002e-16 > var(
2013 Feb 15
10
reading data
Hi, #working directory data1 #changed name data to data1.? Added some files in each of sub directories a1, a2, etc. ?indx1<- indx[indx!=""] lapply(indx1,function(x) list.files(x)) #[[1]] #[1] "a1.txt"??????? "mmmmm11kk.txt" #[[2]] #[1] "a2.txt"??????? "mmmmm11kk.txt" #[[3]] #[1] "a3.txt"??????? "mmmmm11kk.txt" #[[4]] #[1]
2007 Apr 05
2
creating a data frame from a list
Dear all, A few months ago, I asked for your help on the following problem: I have a list with three (named) numeric vectors: > lst = list(a=c(A=1,B=8) , b=c(A=2,B=3,C=0), c=c(B=2,D=0) ) > lst $a A B 1 8 $b A B C 2 3 0 $c B D 2 0 Now, I'd love to use this list to create the following data frame: > dtf = data.frame(a=c(A=1,B=8,C=NA,D=NA), +
2006 Jul 05
1
creating a data frame from a list
Dear all, I have a list with three (named) numeric vectors: > lst = list(a=c(A=1,B=8) , b=c(A=2,B=3,C=0), c=c(B=2,D=0) ) > lst $a A B 1 8 $b A B C 2 3 0 $c B D 2 0 Now, I'd love to use this list to create the following data frame: > dtf = data.frame(a=c(A=1,B=8,C=NA,D=NA), + b=c(A=2,B=3,C=0,D=NA), + c=c(A=NA,B=2,C=NA,D=0) ) > dtf a b
2011 Mar 06
2
How to load load multiple text files and order by id
Hello R users, I am fairly new to R and was hoping you could point me in the right direction I have a set of text files (36). Each file has only two columns (id and count) , I am trying to figure out a way to load all the files together and then have them ordered by id into a matrix data frame. For example If each txt file has : ID count id_00002 20 id_00003 3 A Merged File: ID
2006 Jul 12
1
help in vectorization
Hi, I have two data frames. One is like > dtf = data.frame(y=c(rep(2002,4), rep(2003,5)), + m=c(9:12, 1:5), + def=c(.74,.75,.76,.78,.80,.82,.85,.85,.87)) and the other dtf2 = data.frame(y=rep( c(2002,2003),20), m=c(trunc(runif(20,1,5)),trunc(runif(20,9,12))), inc=rnorm(40,mean=300,sd=150) ) What I want is to divide
2012 Jul 20
2
Changing ungrouped cases to grouped cases
Hi, I have my data the following way: y A B C 0 1 1 2 0 1 2 1 1 1 1 2 0 1 1 2 1 1 1 2 1 1 2 1 0 1 2 2 . . . And so on. How can I make my data look like the following: y A B C 2 1 1 2 1 1 2 1 0 1 2 2 . . . In other words how can I change my ungrouped cases into grouped cases? Thanks! Chris [[alternative
2012 Mar 31
4
R Help
Hi, I have a polynomial of 2n^2-5n+3 and I have my n values going up in powers of 2 i.e. n=2,4,8,16?.. I wanted to fit this curve to the function A*n*log2(n) +B*n where A and B are to be found. How would i do this? Thank you Jaymin
2019 Jun 13
2
Problema de INSERT en Windows SQL
Pd: Perdón por el duplicado de mensaje, se me olvido poner el asunto al anterior y me han surgido nuevas consultas. Buenos días, llevo unos dias peleando para realizar una consulta con INSERT en Windows SQL. He probado varios paquetes de R y con ninguno lo he conseguido. Ahora mismo estoy probando con DBI y odbc. Probé con dbSendStatementy al ejecutar la consulta:
2018 Oct 03
2
Any idea what causes "Oooh, got a frame with format of g729 on channel 'PJSIP/121-000001d2' when we're sending 'ulaw', switching to match"
The PJSIP endpoint is configured for ulaw only. Not sure how or why we are seeing the g729 on calls for this endpoint. Would this be a case that asterisk detects the rtp stream is g729 even though it's negotiated as ulaw? Why would asterisk change the format to g729 when disallow = all and allow = ulaw are the endpoint settings? [121] type = endpoint context = IS transport = transport1 aors
2009 May 22
3
No response to our critical packet problem
Hi, I have a strange problem. At a site where there are 20+ phones, there is one phone that cannot make outbound (to PSTN) calls. Each call is dropped after 20s with "no response to our critical packet". Calls to voicemail and internal extensions work fine. I understand that everything points to a NAT problem, but I don't understand how it could be because: 1) It does not affect
2006 Apr 12
33
DUNDi with SIP
Anyone out there have a functional DUNDi configuration using SIP for the inter-Asterisk transport? I've gotten it to work with IAX2, but if I change it to SIP it does not pass the call over even though it knows where to send it. Thanks. The contents of this email message and any attachments are confidential and are intended solely for addressee. The information may also be legally
2010 May 01
2
Average Login based on date
Hi All, I have the data like this : >sample <- read.csv(file="sample.csv",sep=",",header=TRUE) > sample stdate Domain sex age Login 1 01/11/09 xxx FeMale 25 2 2 01/11/09 xxx FeMale 35 4 3 01/11/09 xxx Male 18 30 4 01/11/09 xxx Male 31 3 5 02/11/09 xxx Male 32 11 6 02/11/09 xxx Male 31 1 7 02/11/09
2006 May 17
2
no route to host
Hello, First of all sorry for my English. I am experiencing with Samba and I have a problem. I have an old server (OLD) with Red Hat 9 and Samba 2.2.7a that is working well. Now I try to start up a new server (NEW) with Red Hat Enterprise 4 and Samba 3.0.22. If I try to connect from NEW to itself by using smbclient I got the shared resources list correctly. If I try to connect to NEW from OLD,
2010 Jan 20
2
Call Xfer issue between DataCenter and User Site
Hi, I am running a Asterisk 1.6 box in our Data Centre, and have a number of users connecting to that box, as their PBX. Calls in and out work fine, as does voicemail. The PBX at the Data Centre has an External IP, Nat?d to it by the firewall, and the relevant ports are open. The Office users have a dedicated internet connection for the phone lines, and calls are seen to traverse this
2006 Jan 05
1
Apache reverse proxy authentication problem on RHEL based distribs only
Hi, I'm currently setting up an Apache SSL reverse proxy for Exchange 2003 Outlook Web Access. The setup that I have works fine on my Gentoo laptop or on a Trustix server, however, when I try to set it up on an RHEL based distro, with the exact same virtual host settings, I get some weird error with the authentication mechanism. I have tried with both CentOS 4.2, based off the server CD