similar to: Re : Manipulating Data Frames

Displaying 20 results from an estimated 600 matches similar to: "Re : Manipulating Data Frames"

2010 May 19
1
Re : Adding column sum to new row in data frame
Dear All, I have data some thing like this: State Jan Feb Mar Apr May Jun AAA 1 1 0 2 2 0 BBB 1298 1195 1212 1244 1158 845 CCC 0 0 0 1 2 1 DDD 5 11 17 15 10 9 EEE 18 28 27 23 23 16 FFF 68 152 184 135 111 86 I want to sum all the column(Jan, Feb, Mar ...) and have to merge the total at last row. like this: StateJanFebMarAprMayJunAAA110220BBB12981195121212441158845CCC 000121DDD51117
2013 Feb 01
29
cumulative sum by group and under some criteria
Thank you very much for your reply. Your code work well with this example. I modified a little to fit my real data, I got an error massage. Error in split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) : Group length is 0 but data length > 0 On Thu, Jan 31, 2013 at 12:21 PM, arun kirshna [via R] < ml-node+s789695n4657196h87@n4.nabble.com> wrote: > Hi, > Try this: >
2008 Oct 31
6
[LLVMdev] polyhedron 2005 results for llvm svn
I am finding with the patch that all of the Polyhedron 2005 benchmarks pass on i686-apple-darwin9. Could someone clarify the regression rules for releases? Not building a secondary language on a primary target is usually considered a P1 regression for FSF gcc. Not doing so here gives one the impression that llvm.org isn't playing by the same rules. No one is ever going to want to use these
2013 Jun 24
1
K-means results understanding!!!
Dear members. I am having problems to understand the kmeans- results in R. I am applying kmeans-algorithms to my big data file, and it is producing the results of the clusters. Q1) Does anybody knows how to find out in which cluster (I have fixed numberofclusters = 5 ) which data have been used? COMMAND (kmeans.results <- kmeans(mydata,centers =5, iter.max= 1000, nstart =10000)) Q2) When I
2013 Feb 28
11
new question
Hi, directory<- "/home/arunksa111/data.new" #first function filelist<-function(directory,number,list1){ setwd(directory) filelist1<-dir(directory) direct<-dir(directory,pattern = paste("MSMS_",number,"PepInfo.txt",sep=""), full.names = FALSE, recursive = TRUE) list1<-lapply(direct, function(x) read.table(x,header=TRUE, sep =
2003 Nov 23
3
make check reg-tests-3
Should I submit this as a bug report? --- reg-tests-3.Rout.save Thu Jul 3 09:55:40 2003 +++ reg-tests-3.Rout Sun Nov 23 13:10:57 2003 @@ -1,17 +1,18 @@ -R : Copyright 2003, The R Development Core Team -Version 1.8.0 Under development (unstable) (2003-07-03) +R : Copyright 2003, The R Foundation for Statistical Computing +Version 1.8.1 (2003-11-21), ISBN 3-900051-00-3 R is free software and
2007 Jan 06
1
garchFit in R
Dear all, I have problem here : I'm using garchFit from fSeries package, here is part of the script : > data <- read.table("d:/data.txt") > a <- garchFit(~garch(1,1),ts(data)) I also attached the file here. In my experience, I got my R not responding. I also tried with > a <- garchFit(~garch(1,1),ts(data*10)) and it's worked. I
2012 Apr 09
1
Pairwise comparison matrix elements
Hi!, I'm really hoping someone out there will be able to help me. I recently started my MSc dissertation on Population Projection Matrices, which has been going well until now. I am trying to set-up a general script that does a pairwise comparison of all elements in my matrices. So for example, given that I have the following matrix S: > S [,1] [,2] [,3] [1,]
2007 May 15
3
qr.solve and lm
Dear R experts, I have a Matlab code which I am translating to R in order to examine and enhance it. First of all, I need to reproduce in R the results which were already obtained in Matlab (to make sure that everything is correct). There are some matrix manipulations and '\' operation among them in the code. I have the following data frame > ABS.df Pro syn
2006 Aug 26
1
Problem on Histogtam
Dear all, May be question seems trivial for most of the R users, but really at least for me, this comes out to be very problematic. Suppose I have the following data: > r [1] -0.0008179960 -0.0277968529 -0.0105731583 -0.0254050262 0.0321847131 0.0328170674 [7] 0.0431894392 -0.0217614918 -0.0218366946 0.0048939739 -0.0012212499 0.0032533579 [13] -0.0081533269 -0.0098725606
2002 Sep 19
5
how to use if statement in function correctly
Dear all I try to persuade if statement in my function to work as I want (but I am not very successful:( My question is why my function with if statement is evaluated correctly in case of atomic variables and incorrectly in case of vector variables. Here is an example: #function with if statement fff <- function(otac,sklon) { test <- (otac *
2001 Feb 05
4
Removing "row.names"
I need to completely remove row.names from a dataframe. Are there other ways to remove them (and not anything else) besides: mydataframe<-data.frame(mydataframe, row.names=NULL) I realize that this doesn't really remove the row.names; it merely replaces the current row.names vector with the numbers 1..nrow (in quotes). ===================== Dr. Marc R. Feldesman Professor and
2001 Feb 05
4
Removing "row.names"
I need to completely remove row.names from a dataframe. Are there other ways to remove them (and not anything else) besides: mydataframe<-data.frame(mydataframe, row.names=NULL) I realize that this doesn't really remove the row.names; it merely replaces the current row.names vector with the numbers 1..nrow (in quotes). ===================== Dr. Marc R. Feldesman Professor and
2007 Oct 03
3
Factor levels.
I have factors with levels ``Unit", "Achieved", and "Scholarship"; I wish to replace these with "U", "A", and "S". So I do fff <- factor(fff,labels=c("U","A","S")) This works as long as all of the levels are actually present in the factor. But if ``Scholarship'' is absent (as if often is) then
2003 Jul 21
1
help on barplot
Hello, I am trying to compare two histograms using barplot. the idea is to plot the histograms as pairs of columns side by side for each x value. I was able to do it using barplot before but I can't remember now for the life of me now how I did it in the past: > d [,1] [,2] -37.5 0.0000000000 2.789396e-05 -32.5 0.0001394700 5.578801e-05 -27.5 0.0019804742
2007 Sep 05
1
rxfax() problem - fax signal seems to be ignored
Hello, my configuration is the following: a TDM400P board with an fxs and fxo daughter boards on it. I thus connect a fax to my FXS port, after having verified that this port was correctly functioning. For this, I had tried before with a simple phone, and with some basic voicemail exten scripts. Here is my simple dialplan for my fax reception: exten => 300,1,Ringing() exten =>
2002 Nov 08
1
Using the ``...'' argument.
Suppose that I have a function fff which calls a couple of functions foo and bar, and that foo takes optional arguments a and b, and bar takes optional arguments u and v. Is there an elegant way of passing ***both*** sets of optional arguments via a ``...'' argument for fff? I'd like to be able to have a structure like: fff(x,y,z,...) { . a1 <- foo(x,y,...) b1
2006 Apr 29
9
Wine + serial port basically hangs system
I'm trying to use Wine to run a program called heavy weather - its a windows only program that interfaces with a weather station that I have through a serial port. I was able to get the program up and running with wine. Then, I couldn't get it to connect at all to the weather station. After much too long, I finally realized that the problem was that my permissions on /dev/ttyS0 were too
2010 Nov 30
2
xyplot : superimposed 2 groups in different panels
Hello, I would like to plot the following xyplot : for each date of fff (1 date per panel), bbb=f(aaa) for the two groups (ddd=1 and ddd=2) superimposed. I can do it by group (see below) but not together. I looked at http://lmdvr.r-forge.r-project.org/figures/figures.html but I haven't found what I was looking for (to be honest, I haven't understood all the examples). Any help will be
2010 Jul 07
3
how to process this in R
Here are what i am going to accomplish: I have 400 files named as xxx.txt. the content of the file looks like the following: name count 1. aaa 100 2. bbb 2000 3. ccc 300 4. ddd 3000 ........ more that 1000 rows in each files. these are the areas i need help: 1. how can i only read in the files with the string patterns ggg or fff as part of the file names? for