similar to: dataframe manipulation

Displaying 20 results from an estimated 50000 matches similar to: "dataframe manipulation"

2006 Nov 23
1
how to loop this?
Hi, I have the next procedure: t1<-data.frame(table(substr(names(subset(lasker[[1]], lasker[[1]] >= 4)), 1, 7))) t1[1:5,] Var1 Freq 1 1988-02 3 2 1988-03 1 3 1988-04 1 4 1988-05 2 5 1988-06 3 How to make a new list?, dataframe? having 189 elements in the 'lasker' list: > str(lasker[[1]]) 'table' int [, 1:1274] 1 1 3 2 1 5 4 1 1 4 ... -
2006 Nov 26
1
adding elemens to a list
Hi, I have a list of 20 elements, each of them of variable length and with a structure like this: lasker[[1]][1:10,] Var1 Freq 1 1988-02 3 2 1988-03 1 3 1988-04 1 4 1988-05 2 5 1988-06 3 6 1988-07 1 7 1988-08 1 8 1988-09 1 9 1989-03 1 10 1989-04 1 How do I can insert in this list: 1988-01 0 1988-10 0 1988-11 0 1988-12 0 1989-01 0
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),
2009 Jan 14
1
publication statistics from Web of Science
Dear list, This is a bit of an off-topic question, but I'm hoping to get some advice from more experienced people. I've used the website "Web of Science" to manually collect publication counts responding to several keywords as a function of date, since the 1960s. http://apps.isiknowledge.com/RAMore.do?product=UA&search_mode=&SID=P1g9lFJp9 at
2005 Apr 12
2
not plotting when non-existent
R-help, I'm trying to plot the following: year lgd 1 1986 136.97479 2 1987 69.10377 3 1988 67.66744 4 1989 71.60316 5 1990 62.06897 6 1992 6.25000 7 1993 27.72021 8 1995 23.83648 9 1996 10.29412 10 1997 95.67487 11 1998 82.09367 12 1999 56.60401 13 2000 29.80864 14 2001 23.77535 15 2002 48.30378 16 2003 83.47571 17 2004 74.58711 There are 2 missing years
2007 Dec 19
3
plot cummulative sum from calendar time
I have the following list of observations of calendar time: [1] 03-Nov-1997 09-Oct-1991 27-Aug-1992 01-Jul-1994 19-Jan-1990 12-Nov-1993 [7] 08-Oct-1993 10-Nov-1982 08-Dec-1986 23-Dec-1987 02-Aug-1995 20-Oct-1998 [13] 29-Apr-1991 16-Mar-1994 20-May-1991 28-Dec-1987 14-Jul-1999 27-Nov-1998 [19] 09-Sep-1999 26-Aug-1999 20-Jun-1997 05-May-1995 26-Mar-1998 15-Aug-1994 [25] 24-Jun-1996 02-Oct-1996
2005 Sep 29
1
lmer random effect model matrix question
I have one fixed effect, sor, with two levels. I have eight lots and three wafers from each lot. I have included the data below. I would like to fit a mixed model that estimates a covariance parameter for wafer, which is nested in lot, and two covariance parameters for lot, one for each level of sor. The following command fits the model that I want, except for it estimates the correlation
2005 Jun 15
4
Multiple line plots
Greetings, I would like to plot three lines on the same figure, and I am lost. There is an answer to a similar thread… but I tried matplot and it is beyond me. An example of the data follows: Year EM IM BM 1983 9.1 16.8 -7.7 1984 12.0 18.0 -6.0 1985 13.6 19.1 -5.5 1986 12.4 17.3 -4.9 1987 14.6 20.3 -5.7 1988 20.6 23.3 -2.6 1989 25.0 27.2 -2.2 1990 28.4 30.2 -1.8 1991 33.3 31.2 2.1 1992 40.6
2003 Apr 15
2
troubles with displaying legend on the plot
Dear colleagues, I have troubles while trying to display legend on the plot. I have data.frame fr > fr year M1 M2 1 1979 58.85198 56.77303 2 1980 57.59725 55.93749 3 1981 57.32133 55.55232 4 1982 54.69320 53.10566 5 1983 56.58973 55.03811 6 1984 58.81363 56.97641 7 1985 58.35583 56.82091 8 1986 60.41842 58.45457 9 1987
2013 Aug 01
3
Problemas con NA y sub-selección por índice
Estimados compañeros de lista, estábamos trabajando con unos datos que adjunto y queríamos hacer una selección mediante índices pero nos deparamos con algún problema. Por ejemplo si hacemos solamente: data[data$PESO==76] me da algo como: > str(data[data$PESO==76,]) 'data.frame': 2475 obs. of 10 variables: $ PUREZA_A: Factor w/ 1 level "pi": 1 NA NA NA NA NA NA NA
2003 Dec 18
3
R GUI dies using postcript() in Windows XP Pro
Dear List, My colleague has been having a problem with the following data and plotting commands. The example below is part of a larger set of plots, but I've isolated the problem to this example using this small dataset (below), which kills rgui consistently. My version info > version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status
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,
2009 May 13
0
Plotting data with flot
I know this is not the right place to raise this question and at the same time i do know that this is the right place to get the right people. So, I am raising it over here (because i am struck in the middle of nowhere). My question is like this: how to add the zooming facility to the below data (extracted from turning-series example of flot and something little changed). In this zooming facility
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,
2009 May 09
4
Generating a "conditional time" variable
Hi everyone, Please forgive me if my question is simple and my code terrible, I'm new to R. I am not looking for a ready-made answer, but I would really appreciate it if someone could share conceptual hints for programming, or point me toward an R function/package that could speed up my processing time. Thanks a lot for your help! ## My dataframe includes the variables 'year',
2003 Jun 26
1
Residual plotting
Dear all, So far i could do (in an informal way) to draw a Standardized Resisual plot in the following way- --------------------- >x <- c(104.1, 106.6, 105.5, 107.5, 109.6, 113.3, 115.5, 117.7, 119.9, 122.1, 124.3, 126.5, 128.2) >y <- c(53732, 52912, 57005, 61354, 67682, 71602, 71961, 75309, 82931, 93310, 102161, 103068, 108927) >
2005 Oct 01
1
Placing axes label strings closer to the graph?
Folks, I have placed an example of a self-contained R program later in this mail. It generates a file inflation.pdf. When I stare at the picture, I see the "X label string" and "Y label string" sitting lonely and far away from the axes. How can these distances be adjusted? I read ?par and didn't find this directly. I want to hang on to 2.8 x 2.8 inches as the overall size
2008 Jun 18
4
inverse cumsum
I've a matrix like this: 1985 1.38 1.27 1.84 2.10 0.59 3.47 1986 1.05 1.13 1.21 1.54 0.21 2.14 1987 1.33 1.21 1.77 1.44 0.27 2.85 1988 1.86 1.06 2.33 2.14 0.55 1.40 1989 2.10 0.65 2.74 2.43 1.19 1.45 1990 1.55 0.00 1.59 1.94 0.99 2.14 1991 0.92
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
2007 Feb 19
2
Calculating the Sharpe ratio
Hi useRs, I am trying to calculate the Sharpe ratio with "sharpe" of the library "tseries". The documentation requires the univariate time series to be a portfolio's cumulated returns. In this case, the example given data(EuStockMarkets) dax <- log(EuStockMarkets[,"FTSE"]) is however not the cumulated returns but rather the daily returns of the FTSE