similar to: subset dataframe

Displaying 20 results from an estimated 110 matches similar to: "subset dataframe"

2009 Jun 12
2
Sweave recode(car) and Lyx, compiling but not executing on Mac
I am just beginning to use Sweave with Lyx on a Mac (R2.8.1). I have 12 chunks of Sweave code that work fine, but this piece: <<>>= library(car)
2010 Nov 17
3
stacking consecutive columns
I have a file, each column of which is a separate year, and each row of each column is mean precipitation for that month. Looks like this (except it goes back to 1964). month X2000 X2001 X2002 X2003 X2004 X2005 X2006 X2007 X2008 X2009 1 1.600 1.010 4.320 2.110 0.925 3.275 3.460 0.675 1.315 2.920 2 2.960 3.905 3.230 2.380 2.720 1.880 2.430 1.380
2011 Feb 18
2
xyplot formula
df=data.frame(country=c("A","A","A","B","B","B"), food=rep(c("Apples","Pears","Bananas"),2), X2000=c(4,5,6,7,6,8), X2001=c(4,5,6,7,6,8), X2002=c(4,5,6,7,6,8), X2003=c(4,5,6,7,6,8)); I have data in the above form trying to get a plot of each fruit over time year conditioned on country and
2009 Jun 02
3
montly mean temp plot
Dear all i got a problem in monthly mean temperature. here i am attaching the data set as well as the plot i got with the following command plot(month,type='n') plot(month,X1999) this command gave the plot where the month names are in alphabetic order, i want the plot in monthly sequence could you please suggest me how can i solve my problem? thanking you regard madan
2016 Jun 24
3
Ayuda ggplot2
Hola a todos! Soy nueva en R y necesito hacer unos gráficos para una investigación, he explorado un poco y estoy intentando usar ggplot2 ya que hace gráficos de muy buena calidad...tengo los datos de varios años para diferentes grupos de empresas y los pretendo graficar tanto en un solo grafico como en varios (facet_wrap) pero tengo problemas con el eje de las X, ya que necesito que aparezcan los
2012 Nov 07
8
Aggregate data frame across columns
Folks, I have a data frame with columns 200401, 200402, ..., 201207, 201208. These represent years/months. What would be the best way to sum these columns by year? What about by quarter? Thanks for your time, KW -- [[alternative HTML version deleted]]
2004 Jan 14
1
NLS mensagem error...
Hi R-masters, I have a problem with nls() and my research data. Look this example: X2000<-c(1.205268,2.850695,5.100860,8.571610,15.324513,25.468599,39.623418,61.798856,91.470006,175.152509) age<-c(37,42,47,52,57,62,67,72,77,82) fit <- nls(X2000~R*exp(A*age),start=list(R=.1,A=.1)) Error mensage: Error in nls(X2000 ~ R * exp(A * age), start = list(R = 0.1, A = 0.1)) :
2008 Jun 11
1
Barplot help
#I am having trouble figuring out this one. I have read the help and I am at a loss. what am I missing x <- structure(list(X = structure(c(6L, 5L, 9L, 2L, 10L, 8L, 7L, 3L, 13L, 12L, 11L, 4L, 1L, 1L, 1L), .Label = c("", "April", "August", "December", "February", "January", "July", "June", "March",
2012 Aug 08
4
Saving Splitted Series to Excel via XLConnect
Dear R Discussion List, I would like to save my data as a xlsx file. But at first I need to split it and then save each series into a Excel column. Please take a look at the following code: dados <- data.frame(matrix(c("2012-01-01","2012-02-01", "2012-03-01","2012-04-01","2012-05-01","2012-06-01",
2007 Dec 17
4
wday not honored in cron trigger
Hey guys, I was playing with the cron trigger, and I noticed that wday is not honored. Looking at the code confirms this. Has anyone else seen this? Thanks Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20071217/44d3a8a6/attachment.html
2012 Mar 04
2
additional "X" characters in headers
An embedded and charset-unspecified text was scrubbed... Name: nie znany URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120304/77fc46a4/attachment.pl>
2006 Jan 16
2
New RPM packages for CentOS4.0
Greetings list, It's been a while since I've been able to focus on asterisk packaging but this weekend I took some time to audit and recompile packages for CentOS 4.2. You can find them here. ftp://ftp.linuxsys.com/ftp/pub/releases/CentOS-4.0 You have your choice of 1.2.1 or 1.0.10 releases. If you need zaptel modules then install this kernel as well:
2010 Aug 20
1
Problem to compute a function with very large numbers
Dear R users, I have been trying to compute the following function and need it to work with n=15000, but it would only compute for smaller ns, such as n=1000 and not above. I was wondering if anyone would have a solution for this problem! Thank you very much for your kind support! Sincerely, Nan ------ Wi <- function(n) { fun <- function(w,i){
2010 Oct 13
2
Rmysql - dbWritetable
Dear Rusers, I am trying to feed my database with data from a file. But since my file (2010101000.txt) there`s no headers I am facing problem because the result data.frame is not separated my columns. How could I set variables names for each columns in *dbWriteTable*? I have tried the command below but I don`t know how to fill the *field.type*option. dbWriteTable(con, "b20101010",
2007 Jul 19
3
help with heatmap - how to remove annoying "X" before numeric values?
Hello All, I have a simple question based on how things are labeled on my heat map; particularly, there is this annoying "X" that appears before the numeric value of all the labels of my columns. Let's say I have the following silly data, stored in "temp.txt" 1905 1910 1950 1992 2011 2020 Gnat 0.08 0.29 0.29 0.37 0.39 0.43 Snake
2008 Aug 17
1
Allocated Memory Warnings in Vista 32 bit with 4 GB (PR#12557)
Hello I am running Windows Vista 32 with 4 GB (installed, though Windows of cours= e only recognizes 3326 MB, as reported by Windows "My Computer") I am running R 2.7.1 I was trying to read in a comma delimited single column CSV file, assign th= at file to a variable ("data") and then extract a sample (assigned to "part= ial"). I was getting memory allocation
2006 Mar 28
3
How to generate a list of lists recursively (for bayesm)
Dear all, I need to generate a list of lists as required by the bayesm-package. This means in my application that I have to generate a list which consists of 2000 elements, which are lists themselves: list(list(y1,X1),...,list(y2000,X2000)). The y are vectors and the X are matrices of different dimensions. I tried to solve this problem iteratively by the following code, but received an error
2008 Aug 18
0
Allocated Memory Warnings in Vista 32 bit with 4 GB (PR#12560)
I see no bug here. R is telling you that you have insufficient memory available: see also ?"Memory-limits". See also rw-FAQ Q2.9. Note that we don't have a reproducible example and in particular have no idea of how many columns this data frame has. The 'R Data Import/Export' manual gives you many hints on how to do this more efficiently, and it is referenced from the
2005 Feb 25
4
Temporal Analysis of variable x; How to select the outlier threshold in R?
For a financial data set with large variance, I'm trying to find the outlier threshold of one variable "x" over a two year period. I qqplot(x2001, x2002) and found a normal distribution. The latter part of the normal distribution did not look linear though. Is there a suitable method in R to find the outlier threshold of this variable from 2001 and 2002 in R?
2006 Oct 27
3
How to best divide table by table
Hi all, how can I divide two tables of the same dimension so that all names are preserved, ie do not become NA? I have "tab1" and "tab2", each having names in the first column. I want "tab3" with the same names and values "tab1/tab2". Thanks, Serguei