similar to: Variable length datafile import problem

Displaying 20 results from an estimated 1000 matches similar to: "Variable length datafile import problem"

2013 Aug 27
1
[plyr] Moving average filter with plyr
Dear all, I'm stuck with a problem using plyr to process a rather large junk of data. What I'm trying to do is applying a moving average to all the subparts of the dataframe (the example data can be found here https://dl.dropboxusercontent.com/u/2414056/testData.Rdata). require(plyr) load("testData.Rdata") applyfilter<-function(x){ return(filter(x,rep(1/5, times=5))) }
2011 Feb 17
0
Fw: RE: Variable length datafile import problem
--- On Thu, 2/17/11, John Kane <jrkrideau at yahoo.ca> wrote: > From: John Kane <jrkrideau at yahoo.ca> > Subject: RE: [R] Variable length datafile import problem > To: "Ingo Reinhold" <ingor at kth.se> > Received: Thursday, February 17, 2011, 5:54 AM > Generally most of the gurus are in > this list.? Hopefully someone will take an interest in >
2012 Aug 08
3
Outer product from matrix by row and a vector
Dear all, I am facing a challenge when applying the outer product with a matrix by rows. What I have is a rather big matrix, which I would like to convert into a different matrix by doing something like outer(matrix_row, vector, function(x,y) x[1]+5*x[4]/y) In order to get there, I tried to get the matrix into a list using the mefa package, as subsetting the original data appears too
2013 Feb 05
3
Truncate text
Hi Folks, Good evening, I used the code which i print below, Yes i got the result , but i need the result like this "TruncateHtml is jus....(continued)" some_html = ''<ul><li><a href="http://whatever">TruncateHtml is just like the vanilla truncate rails helper , TruncateHtml is just like the vanilla truncate rails
2011 Jan 09
3
CatchAll virtual user removes spamheaders
Hi all, I am having a small problem with a catch-all user I have setup in my Postfix/Dovecot setup. I am not 100% sure this is Dovecot related, but, logic tells me it is. I have a virtual user called @reinhold.dk setup to redirect to my main account, peter at reinhold.dk. If I send a spam mail (GTUBE) to peter at reinhold.dk, the mail is marked with Amavis x-headers as it should be. If I
2008 Oct 23
1
After an update stable doesn't boot
Hi I just did a system update and after I've rebooted it doesn't boot up any more. All I'm getting is a blank screen with a curser blinking at the top left corner of the screen. This system was running 7.0-STABLE Any ideas as to how I can get it back up? Regards Reinhold
2010 Nov 01
2
Mailing lists in Dovecot?
Hi all, I was wondering if anyone could recommend a simple mailing list manager that plays well with a Postfix/Dovecot setup, with virtual domains? It really just has to be very simple, basically, an alias would work, if I could rewrite the sender address/name, and I don't really need the possibility for users to subscribe via e-mail based commands. I've looked at the XEXEC plugin as a
2002 Dec 18
6
Can I build an array of regrssion model?
Hi, I am trying to use piecewise linear regression to approximate a nonlinear function. Actually, I don't know how many linear functions I need, therefore, I want build an array of regression models to automate the approximation job. Could you please give me any clue? Attached is ongoing code: rawData = scan("c:/zyang/mass/data/A01/1.PRN", what=list(numeric(),numeric())); len =
2005 Jan 13
2
Naming Convention
I was wondering whether there exists a naming convention for row and column names in R data frames and matrices. E.g: PriceSwap or PRICESWAP or PRICE.SWAP Many thanks. Reinhold [[alternative HTML version deleted]]
2011 May 17
1
simprof test using jaccard distance
Dear All, I would like to use the simprof function (clustsig package) but the available distances do not include Jaccard distance, which is the most appropriate for pres/abs community data. Here is the core of the function: > simprof function (data, num.expected = 1000, num.simulated = 999, method.cluster = "average", method.distance = "euclidean", method.transform =
2012 Dec 10
1
Can somebody suggest how to achieve following data manipulation?
Dear all, Let say I have following data: RawData <- matrix(1:101, nr = 1); colnames(RawData) <- c("ASD", as.character(as.yearmon(seq(as.Date("2012-03-01"), length.out = 100, by = "1 month")))); rownames(RawData) <- "XYZ" CutOffDate <- as.Date("2012-09-01") NewDateSeries <- as.character(as.yearmon(seq(CutOffDate, to =
2011 Sep 08
2
pie chart
Hi All, I have txt file like : $ cat data.txt US 10 UK 12 Ind 4 Germany 14 France 8 > rawdata <- read.table(file='data.txt',sep='\t' , header=FALSE) > rawdata V1 V2 1 US 10 2 UK 12 3 Ind 4 4 Germany 14 5 France 8 I want to draw pie chart for the above data. How to split rawdata into : con <-
2005 Aug 04
2
Avoiding for loop
I understand that in R, for loops are not used as often as other languages, and am trying to learn how to avoid them. I am wondering if there is a more efficient way to write a certain piece of code, which right now I can only envision as a for loop. I have a data file that basically looks like: 1,55 1,23 2,12 ... that defines a matrix. Each row of the data file corresponds to a row of the
2009 Jul 14
2
How to provide list as an argument for the data.frame()
Hi R -users, i've a table as describe below. I'm reading the numeric value presented in this table to populate a list. #table #============ #X    A    B    C #x1    2    3    4 #x2    5    7    10 #x4    2    3    5 #============ rawData <- read.table("raw_data.txt",header=T, sep="\t") myList=list() counter=0 for (i in c(1:length(rawData$X))) {     print (i)    
2008 Dec 09
1
RCurl::postForm() -- how does one determine what the names are of each form element in an online html form?
Dear R-Help, I am looking into using the Open Calais web service (http:// sws.clearforest.com/calaisViewer/) for text mining purposes. I would like to use R to post text into one of the forms on their website. In package RCurl, there is a function called postForm(). This sounds like it would do the job. Unfortunately the URL used in the example is no longer valid (i have emailed the maintainer
2008 Mar 23
1
mapply
In an earlier post, a person wanted to divide each of the rows of rawdata by the row vector sens so he did below but didn't like it and asked if there was a better solution. rawdata <- data.frame(rbind(c(1,2,2), c(4,5,6))) sens <- c(2,4,6) temp <- t(rawdata)/sens temp <- t(temp) print(temp) Gabor sent three other solutions and I understood 2 of them but not the
2006 Jul 12
4
Keep value lables with data frame manipulation
Dear R, I import data from spss into a R data.frame. On this rawdata I do some data processing (selection of observations, normalization, recoding of variables etc..). The result is stored in a new data.frame, however, in this new data.frame the value labels are lost. Example of what I do in code: # read raw data from spss rawdata <- read.spss("./data/T50937.SAV",
2012 Jan 20
2
rbind()
Hello there, Much thanks in advance for any help. I have a few questions: 1) Why do I keep getting the following error: File1 <- read.csv("../RawData/File1.csv",as.is=TRUE,row.names=1) Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file '../RawData/File1.csv': No such file or
2008 Mar 22
2
More elegant multiplication or division of a data frame with a vector
Hello, I am importing some raw voltage multichannel measurements into an R data frame. I need to scale each column with the respective sensitivity for that channel. I figured how to do it, but I am curious if there isn't a more elegant way. Now I start with something like this: rawdata <- data.frame(rbind(c(1,2,3), c(4,5,6))) sens <- c(2,4,6) and I do this: data <-
2003 Jan 08
4
weird breaks in hist (PR#2431)
Full_Name: Reinhold Koch Version: 1.6.1 OS: redhat 8.0 Submission from: (NULL) (131.152.84.111) I came across rather weird behavior of the breaks in hist: hist(1:3) gives the expected result, besides an unnecessary gap between 2nd and 3rd column hist(1:4) always merges up the first two columns, also if I resort to hist.default(1:4,breaks=1:4). hist.default(1:4, include.lowest=F) gives an