data frame

  1. J

    Reading dataset stored in vector form in R

    I am new to R how can I read a dataset stored as vectors and with comments in it into R? See Attached. Thanks in advance.
  2. F

    Group Like Columns In Data Frame

    I have a data frame takes the following form. Type| val1 | val2 | val3 | Type | val1 | val2 | val3 | Type | val1 | val2 | val3 | --------------------------------------------------------------------------------------- A | 3 | 2 | 4 | A | 3 | 2 | 4 |...
  3. J

    Problems with scan function

    Hi, I am having problems with scan() function, using it to get values from console. The above code doesn't work properly. It doesn't stop after scan() function. Is there anything wrong?, can anybody help me? funent <- function(){ val <- scan(,,1) return(as.character(val)) }...
  4. L

    Strange behaviour with Cbind

    Hi, I'm trying to reshape data and as part of this I have a data object containing a data frame that can have multiple pairs of XY columns and around 400 rows of numbers. I need to run a function for each pair of XY columns. Eventually I'm looking to loop through the frame and extract...
  5. A

    Sorting Order of Columns in Dataframe

    Hi Folks, Have been struggling for a few hours trying get around a problem and thought I might be able to get some help here. I would like to sort the columns of a data.frame according to a specific id vector matching the names of each column. For example...
  6. C

    Determine if value is exceeded n times in a row

    Hello, I have a question that I'm not sure how to tackle. Suppose I have a time-series of length 12,000 and would like to know where in the time-series that a prescribed threshold value is exceeded, say, 10 times in a row. That is, for example, if the time series has y values that range...
  7. T

    data.frame usage advice needed

    I'm currently writing a custom class that is basically a data less data frame. It is basically a virtual pointer to data which knows about the column names and how many rows exists in the external data. I'd like to make my class as seemless as possible for those familiar with using data...