similar to: How to best read in this data / Switching rows and colums

Displaying 18 results from an estimated 18 matches similar to: "How to best read in this data / Switching rows and colums"

2009 Jan 20
1
Problem with FAME
Dear All, I wonder whether anyone has an experience with FAME package written by Jeff Hallman. All my attempts to send him the following problem report did not succeed (the mail system says that my e-mail could not be delivered), so I turn for help to this list. I tried to use your FAME package written for R, but somehow I cannot get it working. I am using Windows XP and the newest R
2007 Jan 18
4
How to optimize this loop ?
Dear R Users, I request your help to optimize a loop. Given a series of observations, I want to know how many consecutive past observations are below the last one. e.g : my_series <- c(3, 4, 10,14,8,3,4,6,9) As the last number (9) is higher than the four preceding numbers (6, 4, 3, 8), this function should return 4. my_series <- c(3, 4, 10,14,8,3,4,11,9) Here, it should return 0, as 9
2000 Feb 01
1
plotting spectrum of time series etc
Hi, everyone, I tried to use "spectrum()" or "spec.pgram()" to get a periodogram of a time series but they didn't work. Even the examples given in the help file didn't work (all with the same error message, below). And the 'ts'ibrary was loaded with "library(ts)" or "library("ts"). I also tried library(tseries) but got the same problem.
2004 Mar 29
9
Aggregating frequency of irregular time series
> S-Plus has the function AggregateSeries() whose name is self > explanatory. For instance one can derive monthly series from daily > ones by specifying end-of-period, averages, sums, etc. I looked for > a similar function in the packages "its" and "tseries", but found > nothing. I also help.searched() for aggregate to no avail. Would > anybody be so kind
2009 Dec 18
1
The RSQLite version of dbGetQuery drops colums
Hi all, I just noticed (the hard way of course) that when a query returns 0 rows, the columns in the resulting data.frame get dropped as well. See the following example code (where conn is an active connection to an SQLite db): > dbGetQuery(conn, "select 1 as hey, 2 as ho where 1") hey ho 1 1 2 > dbGetQuery(conn, "select 1 as hey, 2 as ho where 0") data frame
2009 Jan 05
1
How to extract range of colums in a data frame
Dear all, I have the following data frame: > dat V1 V2 V3 V4 V5 V6 V7 V8 V9 1 1 AAAACACCCACCCCCCCCCCCCCCCCCCCCCCCC 9.0 18 12.00 18.0 15.0 12.0 6.0 2 1 ACGATACGGCGACCACCGAGATCTACACTCTTCC 18.0 8 12.00 18.0 15.0 12.0 18.0 3 1 ACTACTGCTCCCCCCCCACTCCCCCCCCCCCCCC 15.0 8 12.00 12.0 18.0 12.0 12.0 4 1 ACTTATACGGCGACCACCGAGATCTACACTCTTT 15.0
2011 Feb 24
1
Removing -Inf values from all the colums in a dataframe
Hi there, b is my dataframe. I have a dataframe. I am trying to get rid of the -INF values but didnt have much luck b[which(is.finite(b))] I can get rid of it for a single column b[,1][which(is.finite(b[,2]))] but not for all dataframe I used it inside of a sapply but still no dice my guess is it might have some differing row numbers and just ignoring the columns itself. Thanks Ramya
2011 Jun 27
1
show colums x till end
Hey again, I didn't wat questions to get mangled up, so here's my second email. In matlab, there is the simple possibility to access colums x till last of a matrix using mydata(1:3, 5:end). In R, I so far use mydata[1:3, 5:ncol(mydata)] Is there a faster way? (in terms of typing) Thanks ahead, Berry ------------------------------------- Berry Boessenkool University of Potsdam,
2012 Jun 27
1
how to convert list of matrix (raster:extract o/p) to data table with additional colums (polygon Id, class)
Hi List, I have a raster and a polygon with attribute ID and Class. I want to have the fraction of each class present in each pixel of raster. I have use the raster::extract to get the value and weights as below. ex<-extract(raster,polygon,weighted=TRUE) this gives me [[1]] value weight 13943 0.24 13958 0.02 13959 0.84 13960 0.19 13987 0.03 13988 0.31 13990 0.30 [[2]]
2012 Apr 25
1
Create new Vector based on two colums
Hello, I am trying to get a new vector 'x1' based on the not NA-values in column 'a' and 'b'. I found a way but I am sure this is not the best solution. So any ideas on how to "optimize" this would be great! m <- factor(c("a1", "a1", "a2", "b1", "b2", "b3", "d1", "d1"), ordered
2005 Jan 03
3
colums in ''shorewall show connections'' command
I do not understand some colums in the output to ''shorewall show connections'' /root> shorewall show connections Shorewall-2.0.2f Connections at firewall - Mon Jan 3 13:12:52 PST 2005 .. tcp 6 353296 ESTABLISHED src=112.129.244.121 dst=224.81.133.205 sport=3647 dport=443 src=224.81.133.205 dst=112.129.244.121 sport=443 dport=3647 [ASSURED] use=1 I would like to know
2018 Jan 15
0
barplot that displays sums of values of 2 y colums grouped by different variables
https://stackoverflow.com/questions/25070547/ggplot-side-by-side-geom-bar On Mon, Jan 15, 2018 at 9:39 PM, Kenneth Dyson <kenneth at kidscodejeunesse.org > wrote: > Hi Eric, > > Thanks for the detailed response. > This is not exactly what I want to do but is close. > I want 2 bars for each city, 1 with the sum for "yes" , the other, beside > it, with the sum for
2008 Mar 08
1
Deleting rows satisfying a certain condition (sum of some colums>2)
I have a huge matrix and need to delete certain rows. What I need to do is: 1.In each row, calculate the sum of jth column and (J+2)th column 2. If the sum is greater than 2 then that row needs to be deleted. I have a sample matrix and my codes here. It does remove some rows but when it does, it skips the next row and each time it deletes a row, the dimension changes so it gets out of bound. I
2006 Apr 04
4
Find records based on associated table''s colums
Hello, Let''s say I have a model for a "house". Each house has_a "city", which in turn has_a "state" which in turn has_a "country". The objective is to retrieve all houses in a given state, say "Massachusetts". Being new to Ruby on Rails what I like is that things that should be simple usually are simple, and since we have easy access to
2018 Jan 15
0
barplot that displays sums of values of 2 y colums grouped by different variables
It is not generally advisable to get too fancy with stat functions in ggplot... things can easily get more complicated than ggplot is ready to handle when it comes to calculations. It is better to create data that corresponds directly to the graphical representations you are mapping them to. Read [1] for more on this philosophy. [1] H. Wickham, Tidy Data, Journal of Statistical Software,
2006 Aug 24
5
Check values in colums matrix
Dear all, I apologize if my question is quite simple. I have a dataset (20 columns & 1000 rows) which some of columns have the same value and the others have different values. Here are some piece of my dataset: obj <- cbind(c(1,1,1,4,0,0,1,4,-1), c(0,1,1,4,1,0,1,4,-1), c(1,1,1,4,2,0,1,4,-1), c(1,1,1,4,3,0,1,4,-1), c(1,1,1,4,6,0,1,5,-1),
2018 Jan 15
5
barplot that displays sums of values of 2 y colums grouped by different variables
I am trying to create a barplot displaying the sums of 2 columns of data grouped by a variable. the data is set up like this: "city" "n" "y" <br> mon 100 200 <br> tor 209 300 <br> edm 98 87 <br> mon 20 76 <br> tor 50 96 <br> edm 62 27 <br> the resulting plot should have city as the x-axis, 2 bars per city, 1 representing
2012 Oct 23
10
How to pick colums from a ragged array?
I have a large dataset (~1 million rows) of three variables: ID (patient's name), DATE (of appointment) and DIAGNOSIS (given on that date). Patients may have been assigned more than one diagnosis at any one appointment - leading to two rows, same ID and DATE but different DIAGNOSIS. The diagnoses may change between appointments. I want to subset the data in two ways: - define groups