similar to: Create Matrix of 2 Dim from two vectors

Displaying 20 results from an estimated 5000 matches similar to: "Create Matrix of 2 Dim from two vectors"

2010 Aug 24
4
Plot bar lines like excel
Hello guys, I would to plot a bar line between to curves like in excel as shown in the following image. but i do not know how I can do that in R. http://r.789695.n4.nabble.com/file/n2337089/excel_Plot.png any help would appreciate. -- View this message in context: http://r.789695.n4.nabble.com/Plot-bar-lines-like-excel-tp2337089p2337089.html Sent from the R help mailing list archive at
2011 Jun 20
3
Unreasonable syntax error
http://r.789695.n4.nabble.com/file/n3612530/PSC.r PSC.r Hi all, I just wrote a program in R by editing it in Microsoft Word and then pasting into the text editor of R. The above is the file. And below is what the console complains.... Why doesn't it recognise 'r'?? I have to mention that at least when I typed this first several lines into the console, the first error didn't
2009 Sep 21
2
Four concurrent Markov chains
Hi, I am trying to write a simulation of the movements of four animals between six patches. The movement between patches is based on a first-order Markov chain so that the next patch they visit depends on the patch they were in before. I have written code that allows me to simulate the movement of one animal but when I add more there seems to be a problem and all chains come back as N/A. I can
2013 Feb 27
2
matrix multiplication
Hi, Try this: #mat1 is the data res<-do.call(cbind,lapply(seq_len(nrow(mat1)),function(i) {new1<-do.call(rbind,lapply(seq_len(nrow(mat1[-i,])),function(j) {x1<-rbind(mat1[i,],mat1[j,]); x2<-(abs(x1[1,1]-x1[2,1])*abs(x1[1,5]-x1[2,5]))+(abs(x1[1,2]-x1[2,2])*abs(x1[1,6]-x1[2,6]))+(abs(x1[1,3]-x1[2,3])*abs(x1[1,7]-x1[2,7]))+(abs(x1[1,4]-x1[2,4])*abs(x1[1,8]-x1[2,8]))}));new1}))
2012 Jun 20
3
[LLVMdev] Is Loop Dependence Analysis Printing Correct Stats?
Hi; I was playing with the -lda pass of LLVM on the following program- #include <stdio.h> void main() { int a[10]; int i; for(i = 0; i < 4; i ++) { a[i] = a[i-1]+1; } } I run the following commands - clang a.c -emit-llvm -S opt -analyze -stats -lda a.s The output is - Printing analysis 'Loop Dependence Analysis': Loop at depth 1, header block: %for.cond Load/store
2010 Feb 07
4
x-axis plot problem
Hi all, I tried to have plot of many vector in one plot and i have got a nice plot but i have problem with x-axis. I want to have month and year only(Jul.07 means July 2007) in x-axis without appearing other number behaind it. I would appercit any help. The R code: F<-c(7.49,6.91,6.78,6.99,7.44,7.42) M<-c(4.81,4.51,5.21,4.65,4.75,3.86) P<-c(7.49,15.03,15.19,15.32,15.42,15.45)
2010 Apr 23
1
Combinations with restrictions
Hi! Is there any easy/fast way to combine vectors with restrictions? Example: a=c(1,2,3), b=c(4,5,6), c=c(7,8,9) I want all combinations of this 3 vectors with length=2. Like this: 1,4 1,5 1,6 1,7 1,8 1,9 2,4 2,5 2,6 2,7 ... and so on. Thanks in advance. [[alternative HTML version deleted]]
2002 Oct 22
2
Draw ellipses in S-PLUS or R?
Dear S-PLUS/R users: Do you know any default function or a user contributed function that can draw an ellipse with given axes and origin? Thanks for any help. Paul. -- Romance, like alcohol, should be enjoyed, but should not be allowed to become necessary. -- Edgar Friedenberg -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list --
2004 Aug 24
2
call queue help
Guys I am having some serious issues with my call queue and Management is breathing down my neck pretty bad, and I am running out of ideas. I have a single queue for my tech support department. I originally was using the AgentCallbackLogin for them and it tested out great on our testing weekends, but it hasn't worked out since. It would only let one of them take calls at a time, no matter
2012 Jun 20
0
[LLVMdev] Is Loop Dependence Analysis Printing Correct Stats?
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Arnamoy Bhattacharyya > Subject: [LLVMdev] Is Loop Dependence Analysis Printing Correct Stats? > for(i = 0; i < 4; i ++) > { > a[i] = a[i-1]+1; > } > Am I doing anything wrong or the code seems buggy? Your code is buggy. The first time through the loop, you're referencing
1999 Feb 17
1
dim enquiry
This is a minor question, but is there any difference between the two objects fred <- structure(1:10, dim = c(2,5)) and fred <- structure(1:10, .Dim = c(2,5)) Should I be using one rather than the other? Thanks, Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE
2009 Mar 06
1
GoSub & Queue
I have a caller screen queue setup. Basically a caller calls in, goes through a IVR, and before that caller is put into the queue, they get a sub ran on them first asking for them to say there name. That gets saved and they are entered into the queue using Queue(mainqueue,,,,300). In the queues.conf i have a list of members these are local/extension at external-default, there are two
2010 Jul 03
2
logistic regression - glm() - example in Dalgaard's book ISwR
Dear R-list members, I would like to pose a question about the use and results of the glm() function for logistic regression calculations. The question is based on an example provided on p. 229 in P. Dalgaard, Introductory Statistics with R, 2nd. edition, Springer, 2008. By means of this example, I was trying to practice the different ways of entering data in glm(). In his book, Dalgaard
2010 Oct 01
1
add a new column to data frame
Hi, I am wondering if anyone can propose a simple/best way to do the following: Let's say I have a data frame dat <- cbind(expand.grid(mode=c('right','left'),time=0:3,id=c('p1','p2','p3')),y=c(3,5,rep(4,6),6,2,rep(3,6),4,4,rep(2,6))) dat mode time id y 1 right 0 p1 3 2 left 0 p1 5 3 right 1 p1 4 4 left 1 p1 4 5 right 2
2000 Mar 08
1
Trouble with data dim
Dear R users, I am a novice user working through V & R. My first question stems from p20 of the second edition.: I perform the following actions: > mydata <- c(2.9,3.4,3.4,3.7,3.7,2.8,2.8,2.5,2.4,2.4) > names(mydata) <- c('c','j','b','e','i','h','g','d','f','a') > mydata c j b e i h
2010 Aug 26
3
Help with ddply to eliminate a for..loop
I created a small example to show something that I do a lot of. "scale" data by month and return a data.frame with the output. "id" represents repeated observations over "time" and I want to scale the "slope" variable. The "out" variable shows the output I want. My for..loop does the job but is probably very slow versus other methods. ddply
2011 May 24
3
Beginner Question: List value without Levels
Hey folks, I'm new to the R Project so I'm facing a great problem. I've read a file into R: >myVal I V L F C M A G T W S Y P H Q D N E K R 1 4,5 4,2 3,8 2,8 2,5 1,9 1,8 -0,4 -0,7 -0,9 -0,8 -1,3 -1,6 -3,2 -3,5 -3,5 -3,5 -3,5 -3,9 -4,5 > mode(myVal) [1] list Now I want to multiplicate each of this values with this one:
2005 Apr 16
1
help on extract variance components from the fitted model by lm
Hey, all: Do we have a convenient command(s) to extract the variance components from a fitted model by lm (actually it's a nexted model)? e.g.: using the following codes we could get MSA,MSB(A) and MSE. How to get the variance component estimates by command in R rather than calculations by hand? A<-as.vector(rep(c(rep(1,5), rep(2,5), rep(3,5), rep(4,5), rep(5,5)),2))
2008 Jun 27
3
cumulative sum of within levels of a dataframe
This one should be easy but it's giving me a hard time mostly because tapply puts the results in a list. I want to calculate the cumulative sum of a variable in a dataframe, but with the accumulation only within each level of a factor. For a very simple example, take: > df <- data.frame(x=c(rep(1,5),rep(2,5),rep(3,5)),fac=gl(3,5,labels=letters[1:3])) > df x fac 1 1 a 2 1 a
2006 Mar 10
3
RFC Follow Me Find Me script
This is a follow/find me script that I can't quite get to work, asterisk wont save forward/${calleridnum} to AstDB... any comments or thoughts on how to make this work or change it to work differently are appreciated. The voice prompts to go with all playback/background extensions are commented appropriately. I hope this code is of use to some of you and any help with a perfected