[R] finding the suitable distribution

2008-06-27 Thread mohamed nur anisah
Dear R-users, Attach with is my data..what i want to do is finding a suitable distribution for my data..I want to run a few test like the poisson and the exponential distribution. Please help me on how to find the p-value for poisson as well as the exponential distribution without knowing

[R] finding suitable distribution with default parameter

2008-06-27 Thread mohamed nur anisah
Dear R-users, Attach with is my data..what i want to do is finding a suitable distribution for my data..I want to run a few test like the poisson and the exponential distribution. Please help me on how to find the p-value for poisson as well as the exponential distribution without

[R] p-value

2008-06-12 Thread mohamed nur anisah
Dear R User, say I have this sample of data ( attach with). What i'm going to do is to test whether this data is uniformly distributed or not by finding the p-value. I've tried using the punif command but it gave me the value of 1 of all the data. Any suggestion on R command to find the

[R] combine elements of list into a vector

2008-05-24 Thread mohamed nur anisah
Dear R, Can anybody help me on how to combine all the elements in a list into a single vector?? I've tried using unlist command but it gave me wrong output. Below is the example of the vector output that i want and attach with is my list of data. Any suggestion?? Many Thanks

[R] how to perform a uniform distribution

2008-05-24 Thread mohamed nur anisah
Dear R-users, I have a data which is in an interval length of start-end. How am i going to perform a uniform distribution? and how to test if it is the uniform distribution?? Suggestion is needed. Many thanks!! start end 132955984 132980744 135891280 135998880 156158176

[R] extracting elements by using logical values

2008-02-17 Thread mohamed nur anisah
dear lists, My question is quite simple but i'm a new user in R and it's seem tough to me. How am i going to recall back my values??ok..it could be easy if i ilustrate my problem with the simple example. say that, x [1] 1 2 y [1] 2 3 and my logical output

[R] help on loop function

2008-02-15 Thread mohamed nur anisah
Dear lists, Anysuggestion on how to write a loop function which has nx2 matrix as an input, where each of the row represents an interval. the function should return a mx2 matrix containing the no matched interval of x?? i've tried my own function but it's only applies for 2x2 matrix.

[R] writing a simple function

2008-02-13 Thread mohamed nur anisah
Dear lists, any suggestion on how to write a function to return a TRUE if interval [a,b] overlaps the interval [c,d]. I've tried it but an error occur saying that 'could not find function v ; in addition warning message occur'. Below is my codes.Please help me sort this problem as i'm in

[R] reverse vector elements

2008-02-12 Thread mohamed nur anisah
Dear lists, I want to write a function of a vector and reverse the order of its elements. Here is my code: revector-function(n){ y=vector(length=n) for(i in n:1){ y[i]=i } return(y) } i want my output to be like this: y [1] 10 9 8 7 6 5 4 3 2 1 Any

[R] error in the function

2008-02-09 Thread mohamed nur anisah
Dear lists, i want to find the non-overlapping interval values with this code: mysetdiff=function(x,y){ m=length(x) n=length(y) bx = logical(m) by = logical(n) for(i in 1:m){ for(j in 1:n){ if(x[i]=y[j+1]){ bx[i] = T by[j] = T NA=

[R] writing a function

2008-02-08 Thread mohamed nur anisah
Dear lists, I'm in my process of learning of writing a function. I tried to write a simple functions of a matrix and a vector. Here are the codes: mm-function(m,n){ #matrix function w-matrix(nrow=m, ncol=n) for(i in 1:m){ for(j in 1:n){ w[i,j]=i+j } }

[R] remove the missing value,NA

2008-02-08 Thread mohamed nur anisah
I have two sets of interval data.Below are my two dataset. In these dataset, there is a missing values in each of the data. I want to find the non-overlapping interval values. Here is my code: mysetdiff=function(x,y){ m=length(x) n=length(y) bx = logical(m) by = logical(n)

[R] loops

2008-02-05 Thread mohamed nur anisah
hi!! Below I have 4 columns vector of c and d which are unequal in length.These c and d have 2 columns each where these 2 columns represent an interval values. I easily get these overlapping interval values by using these code: s-apply(c,1,rev)

[R] Vector loop

2008-02-05 Thread mohamed nur anisah
hi, I'm in my learning process of doing a programming with for loop. How to make a loop of a vector of length 10 where elements are 1,2,3,4,5,6,7,8,9,10. Any suggestion needed!! Many thanks. Cheers, Anisah - [[alternative HTML

[R] overlapping intervals

2008-02-01 Thread mohamed nur anisah
hi!! Below I have 4 columns vector of c and d which are unequal in length.These c and d have 2 columns each where these 2 columns represent an interval values. How am I going to get an overlapping over these interval values?? Please help me sort this problem!! Thanks in advance..

[R] x-axis

2008-01-28 Thread mohamed nur anisah
Hi, I want to plot a graph and here is my code: ec-rep(0,length(e)) fc-rep(0,length(f)) plot(e,ec,type=p,col=1,pch=19) points(f,fc,col=2,pch=20) legend(1.0e+08,1.0,c(dog, human),text.col=green4,pch=c(19,20),col=c(1,2)) my major problem here is the x-axis is too large in

[R] adjustment on the x-axis scale width

2008-01-24 Thread mohamed nur anisah
Hi, I have sucessfully plotted the graph by using the following command: ec-rep(0,length(e)) fc-rep(0,length(f)) plot(e,ec,type=p,col=1,pch=19) points(f,fc,col=2,pch=20) legend(1.0e+08,1.0,c(dog, human),text.col=green4,pch=c(19,20),col=c(1,2)) Below are the values for e and

[R] stripchart

2008-01-22 Thread mohamed nur anisah
hi, I want to plot a dotplot graph but unfortunately R does not have it any more. It suggest to use either the stripchart or the dotchart and i prefer to play around with the stripchart graph. Sadly, the result is not like i want where I'm actually wants the plots/points were scattered

[R] spacing problems

2008-01-20 Thread mohamed nur anisah
Dear all, I try to do a matrix with this data but the warning massage had occur: In matrix(x5, ncol = 6, byrow = T) : data length [116] is not a sub-multiple or multiple of the number of rows [20] I think the spacing problem cause this where double spacing and tabs are

[R] splitting the column

2008-01-08 Thread mohamed nur anisah
Hi, I have a matrix data with 21 rows and 6 columns. Below and attach with is my matrix data. My problem is to split the column into 3 subcolumns (except for column 3 and 4) . I want my new matrix data to have 14 columns and 21 rows. Kindly help is highly appreciated. [,1]

[R] numerical data frame

2008-01-06 Thread mohamed nur anisah
Dear All, I've successfully import my synteny data to R by using scan command. Below show my results. My major problem with my data is how am i going to combine the column names with the data( splt) where i have tried on cbind but a warning message occur. I have realized that the splt

[R] How to import ENSEMBL text data using R

2007-12-31 Thread mohamed nur anisah
Dear all, I have a data which is in text file and i would like to import the data to R. From the manual, i’ve found the read.table command function is the most appropriate but when i wrote the command an error had occur. It say “Error in read.tableC:/Users/user/Documents/cfa-1.txt, header =