Search Results

Search found 7 results on 1 pages for 'stedy'.

Page 1/1 | 1 

  • Selecting by observation in R table

    - by Stedy
    I was working through the Rosetta Code example of the knapsack problem in R and I came up with four solutions. What is the best way to output only one of the solutions based on the observation number give in the table? > values[values$value==max(values$value),] I II III value weight volume 2067 9 0 11 54500 25 25 2119 6 5 11 54500 25 25 2171 3 10 11 54500 25 25 2223 0 15 11 54500 25 25 My initial idea was to save this output to a new variable, then query the new variable such as: > newvariable <- values[values$value==max(values$value),] > newvariable2 <- newvariable[2,] > newvariable2 I II III value weight volume 2119 6 5 11 54500 25 25 This gives me the desired output but is there a cleaner way to do it?

    Read the article

  • Create categorical variable in R based on range

    - by Stedy
    I have a dataframe with a column of integers that I would like to use as a reference to make a new categorical variable. I want to divide the variable into three groups and set the ranges myself (ie 0-5, 6-10, etc). I tried cut but that divides the variable into groups based on a normal distribution and my data is right skewed. I have also tried to use if/then statements but this outputs a true/false value and I would like to keep my original variable. I am sure that there is a simple way to do this but I cannot seem to figure it out. Any advice on a simple way to do this quickly?

    Read the article

  • How can I update .RData?

    - by Stedy
    After reading this question I attempted to clean out my workspace and found that each time I opened R all the original items I had recently removed were restored. I then checked .RData and found that it had not been modified in a few weeks even though I repeatedly saved the workspace image. How often is .RData updated and how can I change when .RData is updated so that it reflects more recent changes?

    Read the article

  • Combining bordering shapefiles in R

    - by Stedy
    I have five shapefiles of bordering counties in California that I am trying to combine into one large shapefile and maintain the original borders of the counties. I then want to plot points such as this so the map only needs to be a simple map of county boundaries. Is there a way to do this in R or will I have to use something like ArcGIS? There is extensive documentation about merging within a shapefile such as here where both shapefiles have the same coordinates. But no documentation on shapefiles that only partially share coordinates.

    Read the article

  • Create categorial variable in R based on range

    - by Stedy
    I have a dataframe with a column of integers that I would like to use as a reference to make a new categorical variable. I want to divide the variable into three groups and set the ranges myself (ie 0-5, 6-10, etc). I tried cut but that divides the variable into groups based on a normal distribution and my data is right skewed. I have also tried to use if/then statements but this outputs a true/false value and I would like to keep my original variable. I am sure that there is a simple way to do this but I cannot seem to figure it out. Any advice on a simple way to do this quickly?

    Read the article

  • minidlna and samsung tv file format doesn't support

    - by Vasya
    I have PC with XUbuntu 12.04 and Samsung 27A950, so I want to use my PC like dlna server. But I can run file of any format on my TV, get error: "File format doesn't support". I try to open *.avi, *.mkv and *.jpg files the same result. In error log I can see: [2013/06/27 12:34:03] upnphttp.c:1907: error: Error opening /home/family/media/file1.mkv [2013/06/27 12:34:06] upnphttp.c:1907: error: Error opening /home/family/media/file2.avi So, I have no idea why it doesn't work. Any suggestions? miniDLNA version: Version 1.24.1-stedy Config file is default, only few directories added. With version of the default Ubuntu repository was the same. Some time ago I tried mediatomb, had the same error.

    Read the article

1