similar to: Splitting a DF into rows according to a column

Displaying 20 results from an estimated 100 matches similar to: "Splitting a DF into rows according to a column"

2011 Jul 20
2
Variable assigned to grep output - missing letter n!
This is kind of odd. [scarolan at host:~]$ cat loremipsum.txt Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec quis ipsum sed elit laoreet malesuada. Quisque rhoncus dui vitae eros euismod fermentum sollicitudin sem scelerisque. Nulla facilisi. Maecenas mollis pulvinar euismod. Duis viverra pharetra turpis eget feugiat. Nulla facilisi. Nullam facilisis, felis vitae lacinia
2004 Jan 21
2
subset select within a function
Dear all, I'd like to subset a df within a function, and use select for choosing the variable. Something like (simplified example): mydf <- data.frame(a= 0:9, b= 10:19) ttt <- function(vv) { tmpdf <- subset(mydf, select= vv) mean(tmpdf$vv) } ttt(mydf$b) But this is not the correct way. Any help? Thanks in advance Juli
2006 Sep 18
1
PHP Dingus Fix
I just realised I hadn't updated the version of PHP Markdown and Extra on the dingus as I pretended I did in my two announcements. It is now fixed: PHP Markdown 1.0.2b7 and PHP Markdown Extra 1.1b1 can now be tested on the dingus. <http://www.michelf.com/projects/php-markdown/dingus/> Sorry for any inconvenience. Michel Fortin michel.fortin@michelf.com http://www.michelf.com/
2005 Jul 07
1
Tables: Invitation to make a collective package
Hi All, I would like to make an invitation to make a collective package with all functions related to TABLES. I know that there are many packages with these functions, the original idea is collect all this functions and to make a single package, because is arduous for the user know all this functions broadcast in many packages. So, I think that the original packages can continue with its
2013 Apr 25
0
Reading data from a text file conditionally skipping lines
Hi, It would be better to give an example. If your dataset is like the one attached: con<-file("Trial1.txt") ?Lines1<- readLines(con) ?close(con) #If the data you wanted to extract is numeric and the header and footer are characters, dat1<-read.table(text=Lines1[-grep("[A-Za-z]",Lines1)],sep="\t",header=FALSE) dat1 #?? V1 V2 V3 V4 V5 #1? 38 43 39 44 45 #2? 39
2012 Feb 06
1
ggplot2 geom_polygon fill
Hi everyone, i've been trying to make a special plot with ggplot2, but I can't get it to fill the polygon I'd like to see filled so very very much. I want to display the difference or change in the distribution of the modified Rankin Scale between two groups. mRS is a scale for disability or daily activities competence. It looks like this.
2011 Jul 11
3
Stacked bar plot of frequency vs time
Hi All, New to R, but committed. I looked in a number of places but can't figure out my current problem. I have date of the type: Time Type1 Type2 Type3 1 .50 .25 .25 4 .55 .25 .20 5 .65 .20 .15 etc which describe the frequency of types 1, 2 and 3 (adding up to 100%) over time. I would like to create a stacked bar chart showing these
2010 Dec 07
2
Efficient way to use data frame of indices to initialize matrix
I have a data frame with three columns, x, y, and a. I want to create a matrix from these values such that for matrix m: m[x,y] == a Obviously, I can go row by row through the data frame and insert the value a at the correct x,y location in the matrix. I can make that slightly more efficient (perhaps), by doing something like this: > for (each.x in unique(df$x)) m[each.x, df$y[df$x ==
2006 Apr 14
1
Script.aculo.us Effects with callbacks not working as it should.
Hello all! I''m having a problem which is driving me insane. It''s probably related to the fact that I''m new to javascript.... :) Here''s the thing, I have a couple of effects which are all being put in the queue. Some of these effects have callbacks; e.g. "afterFinish". But the calback is being made directly instead of after the effect is done. The
2012 Feb 07
2
Vectorizing a loop
Hello Folks, I'm trying to vectorize a loop that processes rows of a dataframe. It involves lots of conditionals, such as "If column 10 == 3, and if column 3 is True, and both column 5 and 6 are False, then set column 4 to True". So, for example, any ideas about vectorizing the following? df = data.frame( list(a=c(1,2,3,4),
2014 Sep 29
8
Spacewalk? Local repo? Cache?
I have a mix of CentOS 5, 6, and now 7 servers at work. There are enough of them now that it is starting to make sense for them to get updates from an internal source. I've seen RHN Satellite in years past. It looks like it may be a way to allow Windows admins here (familiar with WSUS) to update Linux boxes. A local repo might be easier to set up, but (as with Spacewalk) it seems like
2013 Jun 18
1
hist function in a for loop
Dear all, I need to create a for-loop in which I can compute multiple histograms My code is the following : #singlefile includes huge csv file #I want to specify the binsize #I would like to compute in the for -loop the histograms numfiles <- length(singlefile) for (i in 1 :51) { binsize <- -20 :20/2 hist(singlefile(singlefile$GVC[singlefile$new_id==i]], break=seq(),
2009 Aug 20
2
Histogram problem
I'm trying to create a histogram from the following code, but my data keeps adding the Num vector and plotting that. My data in the CSV file is just one vector. Does anyone know why? Thanks Conrad SPXdf = data.frame(read.csv(file = "SPX.csv", header = TRUE, sep = ",", dec = ".", fill = TRUE)) Max = max(SPXdf[,2]) Min = min(SPXdf[,2]) Count =
2008 Dec 08
3
Transforming a string to a variable's name? help me newbie...
Dear all, I'm a newbie in R. I have a 45x2x2x8 design. A dataframe stores the metadata of trials. And each trial has its own data file: I used "read.table" to import every trial into R as a dataframe (variable). Now I dynamically ask R to retrieve trials that fit certain selection criteria, so I use "subset", e.g. tmptrialinfo <- subset(trialinfo, (Subject==24 &
2007 Mar 12
5
index.rb:384 [BUG]
Hi folks, I''ve working and playing with acts_as_ferret and follow this fantastic tutorial: http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial When I try to implement the field storage tip, it crash. So, I try to make it via script/console: 1. I have a simple model called Articles: class Article < ActiveRecord::Base acts_as_ferret :fields =>
2007 Jan 28
1
omega: $field{sample} clarification
I'm using omega for a sitesearch and currently having a problem trying to filter $field(sample). At the moment it returns text from the page header and navigation within the sample, ideally I'd like it to return only the page content. I've been trying various omegascript commands to trim the output or seperate the fields and also looking at scriptindex to control how the xhtml is
2002 Sep 06
3
Histogram Ranking
Hello, This is not exactly an R question, but I suspect that there is an R procedure that does what I am calling (for lack of a better name) "histogram ranking". I'm trying to evaluate a set of regression features by segregating by target class and comparing the feature histograms. My idea is that if the histograms are the same for two different classes then there is no
2004 Jun 26
1
unexpected problem
I've had a dedicated box running for ages in my LAN without any kind of problems. Ssh has been installed and useable till tomorrow when a problem pop up. KERNEL: 2.6.5 no server or client settings have been changed. I can ping and nmap the host without any kind of problems. Bellow I'll paste a verbosed ssh try. bkw at tellus ~ $ ssh -vvv neptune OpenSSH_3.8p1, SSH protocols 1.5/2.0,
2017 Nov 14
2
[RFC PATCH] nouveau/compiler: Allow to omit line numbers when printing instructions
This comes in handy when checking "NV50_PROG_DEBUG=1" outputs with diff! Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de> --- src/gallium/drivers/nouveau/codegen/nv50_ir.cpp | 6 +++--- src/gallium/drivers/nouveau/codegen/nv50_ir.h | 2 +- src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h | 1 +
2012 Mar 16
1
Identifying a change in events between bins
Hi there, First off, despite this being my first post here, I have scanned the R help forums a lot in the past few months to help with some questions, so a big thank you to the community as a whole for being so helpful! I'm somewhat of an R newbie, and have run up against a problem that I can't seem to solve. If anyone is able to help I would really appreciate it! I'm looking at a