similar to: request: how to assign alphabets to integer values

Displaying 20 results from an estimated 6000 matches similar to: "request: how to assign alphabets to integer values"

2008 Oct 14
4
request: How to ignore columns having zero sums
Dear friends I have an array consist of r-rows and c-columns e.g. x=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,0,0,0,0,0,0,0,0); x1=array(x, dim=c(4,6)) output is > x1 [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1 2 3 4 0 0 [2,] 1 2 3 4 0 0 [3,] 1 2 3 4 0 0 [4,] 1 2 3 4 0 0 How can i ignore columns having zero sums? Help in this regard
2008 Oct 15
3
request: How can we ignore a component of list having no element
Dear friends There is a list of arrays comprising different no of rows and columns even sometimes NULL, such as [[2]] given below. How can we ignore [[2]] or others like this in the complete list. Any help in this regard is needed. Thanks [[1]] [,1] [,2] [1,] 3 1 [2,] 3 1 [3,] 3 1 [[2]] NULL [[3]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 3 1
2008 May 28
3
request: which integer in each column is in majority
Respected R helpers/ users I am one of the new R user. I have a problem regarding to know which of the integer in each column of the following matrix is in majority. I want to know that integer e.g. in the first column 1 is in majority. Similarly in the third column 4 is in majority. So what is the suitable way to get the desired integer for each column. I am looking for some kind reply. Thanks
2008 Sep 10
6
request: most repeated component of a list
Dear R community I have stored the results of arrays in a list consist of J-components (say 200 components). Each component containing same no of columns but may be different no of rows. e.g [[1]] [,1] [,2] [,3] [,4] [,5] [1,] 4 0 0 0 0 [2,] 4 3 4 0 0 [3,] 4 3 4 0 0 [4,] 4 3 0 0 0 [[2]] [,1] [,2] [,3] [,4] [,5]
2008 Sep 06
2
request: most repeated sequnce
Dear R community Hope every one be in best of his/her health. I have a situation in which there are s-sectors. Each sector is further divided into r-rows and c-columns. All it makes an array having dimension (r,c,s). e.g. x=c(1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,3,3,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,3,3,4,4,4,0,0,0,0,0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,
2008 Sep 03
2
request: How to get column name
Dear R community I have a problem regarding which of the column in a matrix contains all of zero elements. e.g. x=c(3,3,3,3,0,0,0,0,5,5,5,5,8,8,8,8); x=matrix(x, nrow=4) the output is > x [,1] [,2] [,3] [,4] [1,] 3 0 5 8 [2,] 3 0 5 8 [3,] 3 0 5 8 [4,] 3 0 5 8 In this case the required column is second so the result should be "2".
2008 Jun 03
1
request: An array declarion problem
Dear R users I tried a lot to solve the following problem but could not. I have two arrays having same order i.e 1 by 150. j=10; ss=150; r=array(0 , c( j , ss )); rr=array(0 , c( j , ss )); r1=array(0 , c( j-1 , ss )); r2=array(0 , c( j-1 , ss )); r3=array(0 , c( 2 , ss )) for(i in 1:j-1){ r1[ i , ] <- r[ j+1, ]-r[ j, ]; r2[ i , ] <- rr[ j+1, ]-rr[ j, ]
2008 Jun 27
1
request: To access a particular list
Dear R community I have a problem to access particular list. I have a code given below where there is recursive process. It is not possible to run it because there are few other functions involved inside like sv, LN, RN etc. k=0; n=0; variable=c(); vr<-list() func <- function(data,testdata) { . . if(......){ n<<-n+1; vr[[n]] <<- variable; print(vr)
2009 Apr 01
1
Request: Optimum value of cost complexity parameter "k" in "tree" package
Dear R community I have a question regarding the value of cost complexity parameter "k" used in "tree" package for pruning purpose. Any help in finding the optimum value of "k" is requested. Please give some suggestion in this regard. In the example below i used k=0 but i don't know why? But if i use k=NULL, then it will not plot the resultant tree.
2008 Sep 07
0
Fwd: request: most repeated sequnce
---------- Forwarded message ---------- From: jim holtman <jholtman at gmail.com> Date: Sun, Sep 7, 2008 at 11:42 AM Subject: Re: [R] request: most repeated sequnce To: Muhammad Azam <mazam72 at yahoo.com> This should do it for you: > x=c(1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,3,3,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,3,3,4,4,4,0,0,0,0,0,0,0,1,1,1,2,2,2,3,3,3,4,4,4, +
2009 Apr 09
1
request: maximum depth reached problem
Dear R community Hope all of you are fine. I have a question regarding the an error message. Actually, I am trying to generate classification trees using "tree" package. It works well but for some datasets e.g., wine, yeast, boston housing etc. it gives an error message. Error in tree(V14 ~ ., data = training.data, method = c("recursive.partitioning"), : maximum
2008 Jun 06
5
request: a class having max frequency
Dear R users I have a very basic question. I tried but could not find the required result. using dat <- pima f <- table(dat[,9]) > f 0 1 500 268 i want to find that class say "0" having maximum frequency i.e 500. I used >which.max(f) which provide 0 1 How can i get only the "0". Thanks and best regards Muhammad Azam Ph.D. Student Department of
2010 Jun 09
3
bootpred for multinomial
I applied bootpred for multinomial logistic reg. (with nnet package). I used same as theta.fit and theta.predict of R for my data. but give me error. Can I do this with response vriable;7 levels predictor variables:5 (1 classifier, 4 continuous)?   Thanks alot Azam   [[alternative HTML version deleted]]
2010 Jun 08
2
cross-validation
Hi   I want to do leave-one-out cross-validation for multinomial logistic regression in R. I did multinomial logistic reg. by package nnet in R. How I do validation? by which function? response variable has 7 levels   please help me   Thanks alot Azam [[alternative HTML version deleted]]
2008 Jun 02
2
request: To add an extra row in a matrix
Dear R users I have a problem regarding an addition of an extra "row" to a matrix. e.g. i have a matrix a <- matrix(1:6,2,3) > a [,1] [,2] [,3] [1,] 1 3 5 [2,] 2 4 6 I want to add a matrix having just one row. e.g. b <- matrix(7:9,1,3) > b [,1] [,2] [,3] [1,] 7 8 9 Now i want to get result like this [,1] [,2] [,3] [1,] 1 3 5
2009 Dec 01
1
Multiple grouping on the X axis.
I am trying to plot data with multiple logical and physical groups using R. Below is a sample of the kind of data I am working with and the desired output. We have a jmp script that can do the same thing, but at ~$200 a year the licensing is counterproductive. Thanks for any help. Data input: Loaded from a CSV file. Physical_1 Logical_1 Logical_2 Data_1 Data_2 x Y Z2
2012 Jan 22
1
Calling update on an lm-object inside a function
Dear all, I want to update an lm (or glm) object by changing the response variable and I want to do so inside a function. Doing the update outside of a function is straight forward: x <- 1:5 y <- c(1,2,3,3,6) mm <- lm(y~x) y2 <- c(1,3,3,4,6) mm2<- update(mm, y2 ~ .) But I want to make the update inside a function (where the new response variable is declared inside the
2006 May 30
2
merging
Dear List, Given, y <- matrix(c(0,1,1,1,0,0,0,4,4), ncol = 3, byrow = TRUE) rownames(y) <- c("a","b","c") colnames(y) <- c("1","2","3") y y2 <- y[2:3, ] rownames(y2) <- c("x","z") y2 how can I stop merge(y, y2, all = TRUE, sort = FALSE) squishing the extra rows? Ideally I want the same as: rbind(y,
2005 Jan 21
2
Selecting a subplot of pairs
Hello, I'm trying to plot a set of 3 dependant variables (y) against 4 predictors (x) in a matrix-like plot, sharing x- an y-axis for all the plot on the same column/line : y1/x1 y1/x2 y1/x3 y1/x4 y2/x1 y2/x2 y2/x3 y2/x4 y3/x1 y3/x2 y3/x3 y3/x4 In fact, this plot is a rectangular selection of the result of pairs(), limited to the relations between x's and y's
2005 Apr 04
1
custom loss function + nonlinear models
Hi all; I'm trying to fit a reparameterization of the assymptotic regression model as that shown in Ratkowsky (1990) page 96. Y~y1+(((y2-y1)*(1-((y2-y3)/(y3-y1))^(2*(X-x1)/(x2-x1))))/(1-((y2-y3)/(y3-y1))^2)) where y1,y2,y3 are expected-values for X=x1, X=x2, and X=average(x1,x2), respectively. I tried first with Statistica v7 by LS and Gauss-Newton algorithm without success (no