search for: newcol2

Displaying 5 results from an estimated 5 matches for "newcol2".

Did you mean: newcol
2016 Apr 23
2
Data Frame Column Name Attribute
I am attempting to add a calculated column to a data frame. Basically, adding a column called "newcol2" which are the stock closing prices from 1 day to the next. The one little hang up is the name of the column. There seems to be an additional data column name included in the attributes (dimnames?). So when i run HEAD(DATAFRAMENAME) i get the column name = "Open". but you can se...
2011 May 03
6
Simple loop
Hello everybody, I am beginning with loops and functions and would be glad to have help in the following question: If i have a dataframe like this Site Prof H 1 1 24 1 1 16 1 1 67 1 2 23 1 2 56 1 2 45 2 1 67 2 1 46 And I would like to create a new column that subtracts the minimum of H from H, but for S1 and P1 only
2005 Jun 28
1
Using data frames for EDA: Insert, Change name, delete columns? (Newcomer's question)
I am finding complex analyses easier than some elementary operations in R. In particular I want to do some low level exploratory data analyses with data in a data frame but cannot find commands to easily insert, remove (delete), rename, and re-order (arbitrarily, not sort) columns. I see that the micEcon package has an insertCol command, but that is for matrices, not data frames. I have looked
2004 Aug 26
4
Column names of a data frame
I'm coming out with all the classic problems today ;-) Can anyone tell me how to change the column names of an already existing data frame? I've read the docs for ?data.frame and ?as.data.frame but can't figure it out. I want to make a new data.frame from some of the columns of an existing data.frame, but when I do that, the new data.frame columns have the same names as the old
2013 Feb 03
1
Adding complex new columns to data frame depending on existing column
Hello I have a data frame as below V1 V2 V3 V4 V5 V6 chr1 18884 C CAAAA 2 0 chr1 135419 TATACA T 2 0 chr1 332045 T TTG 0 2 chr1 453838 T TAC 2 0 chr1 567652 T TG 1 0 chr1 602541 TTTA T 2 0 on which I want to perform complex rearrangement such that: if V3 is a string >1 (i.e line 2) then I