similar to: Copying row names

Displaying 20 results from an estimated 200 matches similar to: "Copying row names"

2007 Nov 08
2
Col.names parameter in write.csv (PR#10411)
Full_Name: Kingsley Oteng-Amoako Version: 2.5.1 OS: Windows 5.1.2600 (Windows XP) Submission from: (NULL) (203.185.215.144) The col.names=false in the write.csv command does not work as documented. Attempting to write a vector to a csv file without column headers does not work as documented. The col.names=false feature on the write.table command does however work and it can thus be coerced
2012 Jul 12
3
Add row into a Matrix witout headers from Function
Hi, Here i have a matrix like this, OLDMatrix <- X1 X2 X3 ----- ------ ------ 22 24 23 25 27 27 10 13 15 the thing is, im running two function(SUM,COUNT) to get output in another matrix called NEWMatrix NEWMatrix <- c("SUM",colSums(OLDMatrix )) NEWMatrix <- c("COUNT",colSums(!is.na(OLDMatrix
2007 Aug 24
1
uneven list to matrix
Hello, I am sure I am not the only person with this problem. I have a list with n elements, each consisting of a single column matrix with different row lengths. Each row has a name ranging from A to E. Here is an example: alph[[1]] A 1 B 2 C 3 D 4 alph[[2]] A 1 C 3 D 4 alph[[3]] A 1 D 4 E 5 I would like to create a matrix from the elements in the list with n columns such that the row names
2010 Jan 08
2
A better way to Rank Data that considers "ties"
This will start off sounding very easy, but I think it will be very complicated. Let's say that I have a matrix, which shows the number of apples that each person in a group has. OriginalMatrix<-matrix(c(2,3,5,4,6),nrow=5,ncol=1,byrow=T,dimnames=list(c("Bob","Frank","Joe","Jim","David"),c("Apples"))) Apples Bob 2
2005 Apr 21
1
large matrix
Dear R-users I need to convert a matrix with three columns in a new array with multiple columns. For example, oldmatrix 1 4 5 1 54 52 1 9 43 2 32 5 2 54 6 2 76 6 3 54 54 3 543 7 3 54 6 newmatrix 5 5 54 52 6 7 43 6 6 if the first column have a new value then add a column to the new matrix and the new[i,j] <- old[,3][i] I write this code, but my initial matrix is very
2007 Feb 27
5
Multiple conditional without if
Dear all, i am stuck with a syntax problem. i have a matrix which has about 500 rows and 6 columns. now i want to kick some data out. i want create a new matrix which is basically the old one except for all entries which have a 4 in the 5 column AND a 1 in the 6th column. i tried the following but couldnĀ“t get a new matrix, just some wierd errors:
2010 Jan 28
2
NA Replacement by lowest value?
Hi all, I need to replace missing values in a matrix by 10 % of the lowest available value in the matrix. I've got a function I've used earlier to replace negative values by the lowest value, in a data frame, but I'm not sure how to modify it... nonNeg = as.data.frame(apply(orig.df, 2, function(col) # Change negative values to a small value, close to zero { min.val =
2013 Oct 15
1
Problem with lapply
Hi together I'm pretty new to R, so excuse me if it is a basic question. I have a big dataset (extract of it found in the attachment) of returns from firms. I'd like to compute the Pearson correlation of each firm with the "Market" and the corresponding p-Value. So I thought of making a list of 'cor.test's and then extract the needed values with a for loop. What I did so
2004 Sep 29
1
glm.fit and predict.glm: error ' no terms component'
Hi when I fit a glm by glm.fit(x,y,family = binomial()) and then try to use the object for prediction of newdata by: predict.glm(object, newdata) I get the error: Error in terms.default(object) : no terms component I know I can use glm() and a formula, but for my case I prefer glm.fit(x,y)... thanks for a hint christoph $platform [1] "i686-pc-linux-gnu" $arch [1]
2005 Dec 08
3
Reshaping data
Dear all, given I have data in a data.frame which indicate the number of people in a specific year at a specific age: n <- 10 mydf <- data.frame(yr=sample(1:10, size=n, replace=FALSE), age=sample(1:12, size=n, replace=FALSE), no=sample(1:10, size=n, replace=FALSE)) Now I would like to make a matrix with (in this simple example) 10 columns (for the
2011 Jun 16
1
Matching vector order by indicators in a matrix
Hi all~ I have a bit of stupid question. And I promise, I have struggled through this and it sort of pains me to post this question... I have the following vector which is are the estimated parameter values output from "optim". $Rates [1] 0.006280048 0.330934659 I want to match the order in the vector by the number in the following matrix: $Index.matrix ALPHA 1 1 BETA 2
2005 Mar 18
2
logistic model cross validation resolved
This post is NOT a question, but an answer. For readers please disregard all earlier posts by myself about this question. I'm posting for two reasons. First to say thanks, especially to Dimitris, for suggesting the use of errorest in the ipred library. Second, so that the solution to this problem is in the archives in case it gets asked again. If one wants to run a k-fold cross-validation
2011 Nov 21
2
Continue AGI after Dial() following caller hang up?
Hello, We would like to continue a Perl AGI after a Dial() it has done completes following caller hangup. We would like to do this in the same AGI, and not using a new AGI from the 'h' extension. It works fine when the called party hangs up and the 'g' option is used, but not for caller hangup. Is this possible? If not a confirmation that this is the case would be very helpful.
2007 Sep 07
1
write.csv / string extraction and field limits
Hello, I have a peculiar problem which I am hoping I can get help on. I am using the write.csv command to write a matrix structure to a file, which I later read in excel. The command works quite well for most strings and numerical values in the matrix structure. However, I have found that when a field in the matrix contains a string of long length, when the matrix is finally written the file
2020 Oct 28
4
PJSIP tight loop on auth failure
Hi, We're using Asterisk 13.17.0 with PJSIP 2.8 bundled. I've found an issue when Asterisk tries to make a SIP call out using auth, but has the wrong credentials and keeps getting returned a SIP 407, in this example to an OpenSIPs server requiring user auth. Basically this happens: 1. Asterisk sends plain INVITE to OpenSIPs 2. OpenSIPs responds with SIP 407 auth required with a
2002 Feb 08
2
rsync to Win 2000 machine
Hi Is it possible to rsync a RedHat Linux 7.1 machine across a 56K dialup to a Win2000 machine? Thanks Wadeegh
2017 Nov 08
2
file shred
Hi, if we were to use shred to delete a file on a gluster volume, will the correct blocks be overwritten on the bricks? (still using Gluster 3.6.3 as have been too cautious to upgrade a mission critical live system). Cheers, Kingsley.
2011 Mar 06
2
Can body() return a function's body intact, in order, and as characters ready for editing?
Is my understanding correct that the body() function currently can't return a function's body intact, in order, and as characters ready for editing? My testing and reading of body()'s help indicate that it can not. Here's what I'm seeing. Consider pasting 1+ and a function containing x^2 together to get 1+x^2 As you can see below, body() reports three
2011 Jan 16
1
The RGtk2 package did not find libglade installed. Please install it.
Hello, I'm looking forward to mining some new data six ways from Sunday with a great looking R application named "rattle". May I please have the benefit of this list's informed thoughts on how to debug an installation error? On Debian Linux's unstable release, I've done root$ aptitude install r-cran-rattle root$ aptitude install r-cran-rgtk2 user$ R
2010 May 24
2
Delay in IVR
HI, I have in 'inbound route' a IVR, with press 1 or 2 the destination call is always a ring group called '600', my problem is that after press 1 (but this problem is present also with press 2) before that the inbound call is transfer to extension pass 10/11 seconds ! In attach log file about incoming call. I use Trixbox with Asterisk-1.6.0.10. Thanks. ------ Salvatore.