similar to: data frame

Displaying 20 results from an estimated 4000 matches similar to: "data frame"

2012 Dec 17
1
subset handling
Dear Rui and UseRs,[a text file has also been attached, in case the format of my email is difficult to get]I am extremely sorry that I am bothering you once again, but I?ll have to get to the bottom of it. The following command sp <- lapply(split(agg, agg$st), function(x) x[order(x$year, x$month), ]) gave me an output with monthly mean of population(as under). i am not able to apply
2017 Jul 05
4
Help with reshape/reshape2 needed
Hi all: I'm struggling with getting my data re-formatted using functions in reshape/reshape2 to get from: 1957 0.862500000 1958 0.750000000 1959 0.300000000 1960 0.287500000 1963 0.675000000 1964 0.937500000 1965 0.025000000 1966 0.387500000 1969 0.087500000 1970 0.275000000 1973 0.500000000 1974 0.362500000 1976 0.925000000 1978 0.712500000 1979 0.337500000 1980 0.700000000 1981 0.425000000
2010 Jan 11
3
interpolation
Dear R-users, I have a complex line by xy-values (ordered by z). And I would like to get interpolated y-values on the positions of x = 0:600. How do I get the correct points? x=c(790,790,790,790,790,786,783,778,778,766,763,761,761,761,715,628,521,350,160,134,134,129,108,101,93,111,161,249,288,243,139,45,7)
2008 Nov 04
1
perform Kruskal-Wallis test without using the built-in command in R
Hi, again i am stuck in my presentation, and i have never learn R before in my life but need this to be done, so please help me out for a favour: http://www.nabble.com/file/p20333155/kew.dat kew.dat run this in R and these comes up: Month Year Rain 1 Jan 1900 74.400000 2 Feb 1900 80.500000 3 Mar 1900 23.600000 4 Apr 1900 23.600000 5 May 1900 25.100000 6
2017 Jul 05
0
Help with reshape/reshape2 needed
This does not use reshape/reshape2, but it is pretty straightforward. Assuming X is your example data: > Y <- split(X[, 2], X[, 1]) > vals <- sapply(Y, length) > pad <- max(vals) - vals > Y2 <- lapply(seq_along(Y), function(x) c(Y[[x]], rep(NA, pad[x]))) > names(Y2) <- names(Y) > X2 <- do.call(cbind, Y2) > X2[, 1:6] 1957 1958 1959
2013 Mar 12
5
extract values
Hello all! I have a problem to extract values greater that for example 1820. I try this code: x[x[,1]>1820,]->x1 Please help me! Thank you! The data structure is: structure(c(2.576, 1.728, 3.434, 2.187, 1.928, 1.886, 1.2425, 1.23, 1.075, 1.1785, 1.186, 1.165, 1.732, 1.517, 1.4095, 1.074, 1.618, 1.677, 1.845, 1.594, 1.6655, 1.1605, 1.425, 1.099, 1.007, 1.1795, 1.3855, 1.4065, 1.138, 1.514,
2017 Jul 05
0
Help with reshape/reshape2 needed
The reason it doesn't work easily with reshape/reshape2 is that the order of the rows is not determined. Your answer could be 1957 1958 ... 1985 1986 0.8625000 0.7500000 ... 0.7307692 0.23750000 0.0733945 0.6435644 ... NA 0.05769231 0.5096154 NA ... NA 0.65137615 or 1957 1958 ... 1985 1986 0.0733945 0.6435644 ... NA
2017 Jul 05
1
Help with reshape/reshape2 needed
Hi Tom, Or perhaps: #assume the data frame is named "tadf" library(prettyR) stretch_df(tadf,1,2) Jim On Thu, Jul 6, 2017 at 6:50 AM, Ista Zahn <istazahn at gmail.com> wrote: > The reason it doesn't work easily with reshape/reshape2 is that the > order of the rows is not determined. Your answer could be > > 1957 1958 ... 1985 1986 >
2007 Sep 27
1
add a row to a data frame
Hi everybody, I've a data.frame "d" like this: 0 2 4 6 8 10 12 14 16 X0 X2 X4 1945 350 NA NA NA NA NA NA NA NA 0.3848451 0.0000000 0.0000000 1946 408 NA NA NA NA NA NA NA NA 1.4202009 0.0000000 0.0000000 1947 511 NA NA NA NA NA NA NA NA 3.2540522 0.0000000 0.0000000 1948 342 215 NA NA NA NA NA NA
2013 Mar 13
2
merge datas
Hello all! I have a problem with R. I try to merge data like this: structure(c(2.1785, 1.868, 2.1855, 2.5175, 2.025, 2.435, 1.809, 1.628, 1.327, 1.3485, 1.4335, 2.052, 2.2465, 2.151, 1.7945, 1.79, 1.6055, 1.616, 1.633, 1.665, 2.002, 2.152, 1.736, 1.7985, 1.9155, 1.7135, 1.548, 1.568, 1.713, 2.079, 1.875, 2.12, 2.072, 1.906, 1.4645, 1.3025, 1.407, 1.5445, 1.437, 1.463, 1.5235, 1.609, 1.738, 1.478,
2013 Apr 07
2
group data in classes
Hello all! I have a problem to group my data (years) in 10 years classes. For example for year year decade 1598 1590-1600 1599 1590-1600 1600 1590-1600 1601 1600-1610 --- my is like this> [1] 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 [16] 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 [31] 1628 1629 1630 1631 1632 1633
2002 May 31
2
error in seq.POSIXt?
I am trying to extract only the winters (defined to be 01-Dec through 28-Feb) of daily data from 1948-2002. There are 90 days in each winter season. I wrote the following code to gather the winter dates into a single vector: DJF <- NULL for(year in 1949:1999) { temp.begin <- strptime(paste("01/12", year-1, sep="/"), "%d/%m/%Y") temp.end <-
2010 Sep 22
2
Unique subsetting question
Hi all, I'm looking at a large data set, and I'm interested in removing rows where only one variable is duplicated. Here's an example: > presidents Qtr1 Qtr2 Qtr3 Qtr4 1945 NA 87 82 75 1946 63 50 43 32 1947 35 60 54 55 1948 36 39 NA NA 1949 69 57 57 51 1950 45 37 46 39 1951 36 24 32 23 1952 25 32 NA 32 1953 59
2013 Mar 29
1
problem with data
Hello all! I have a problem with my data in R. When I want to plot the following data, I have a problem with y scale. The maximum value is cc. 10 degrees and in R is about 100. I use this code: fasy<-read.table("gridd1.txt",sep="\t",dec=",",header=T,row.names=1) # here are the years: x <- as.numeric(rownames(fasy)) # extract a series that you want to plot: y
2012 Nov 01
2
Subsetting year range
Hi, I have a panel data set that I am trying to subset. I am trying to keep values for years >=1960. The full set is from 1940 to 2000. I tried a few things, but none worked. Here are a couple that I am trying to use. TableAPS1 <- subset(TableAP, year => 1959) TableAPS1 <- TableAP[ which(year > 1959),] It would be really nice if someone can point out what I am doing wrong
2013 Mar 14
1
ggplot2 problem
Hello all! I have a problem with ggplot2 library. I want to do an heat map and the y variables are the year months. If I use the following code, he y values are in alphabetical order, but I want it in month order. The code is: library(reshape) library(ggplot2) library(scales) p <- ggplot(data.m, aes(variable, Month)) + geom_tile(aes(fill = value),
2011 Sep 07
1
reshaping data
I have the following data (see RawData using dput below) How do I get it in the following 3 column format (CO2 measurements are the elements of the original data frame). I'm sure the package reshape is where I should look, but I haven't figured out how. Thanks ahead of time Month Year CO2 J 1958 F 1958 M 1958 315.71 A 1958 317.45 M.1 1958 317.5 J.1 1958 J.2 1958 315.86 A.1 1958
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
Hi, [auto build test ERROR on next-20160602] url: https://github.com/0day-ci/linux/commits/Aaron-Conole/virtio-net-Advised-MTU-feature/20160603-000714 config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430 reproduce: # save the attached .config to linux build tree make ARCH=i386 Note: the
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
Hi, [auto build test ERROR on next-20160602] url: https://github.com/0day-ci/linux/commits/Aaron-Conole/virtio-net-Advised-MTU-feature/20160603-000714 config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430 reproduce: # save the attached .config to linux build tree make ARCH=i386 Note: the
2012 Feb 17
5
How to change the order of columns in a data frame?
Dear all, I have a data frame in which the columns need to be ordered. The first column X is at the right position, but the remaining columns X1-Xn should be ordered like this: X1, X2, X3 etc instead of like below. > colnames(pos1) [1] "X" "X1" "X10" "X11" "X12" "X13" "X14" "X15" "X16"