similar to: Newbie Question About Histograms

Displaying 20 results from an estimated 2000 matches similar to: "Newbie Question About Histograms"

2009 Jan 28
2
t.test in a loop
Hi All, I've been having a little trouble with creating a loop that will run a a series of t.tests for inspection, Below is the code i've tried, and some checks i've looked at. I've used the get(paste()) idea as i was told previously that the use of the eval should try and be avoided. I've run a single syntax to check that my systax is correct and works without any problems
2009 Mar 23
3
How to set up a function for "Central Limit Theorem"
Hello guys, I am stuck here: How do I make 1000 samples of n = 10 observations from an Exponential distribution and then compute the mean for all those 1000 samples? Basically I need to prove the Central Limit theorem, which states: http://www.nabble.com/file/p22664113/d175f06cbf200bd52a2c27a2e56dc594.png Where the Sn is sum of random variables, n we have from the question, mu is mean and
2009 Feb 04
2
Using color and plotting characters in a scatterplot matrix [Newbie Help]
Hello guys, I have this data set that I imported into R using a line: This data set consists of 7 columns. The two important columns are the first one called 'thrust' and the last one called 'amtemp'. jet<-read.table("jetthrust.txt", fill=T, head=T) I am making a scatterplot matrix simply using the line "pairs(jet)" The problem is that in the last
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
2008 Mar 08
1
plotting NAs
Hi WizaRds, (I've cross-posted to r-sig-finance because a lot of people there use 'zoo' objects). I'm trying to plot 2 time series lined up with par(mfrow=c(2,1)), so that the time index is the same for the two series. The data have monthly frequency. An example will illustrate: # data for these dates (monthly frequency) do not have NAs: require(zoo) monthly.dates<-
2009 Oct 07
1
Formatting outputs:(chronological object)
Hello everyone, I have a data generated in a way similar to the following library(chron);library(zoo) date<- seq(as.Date("1990-01-01"),, as.Date("2000-12-31"), by = 1) obs<- zoo(rnorm(length(date), mean = 10, sd = 2.5), order.by = date) monthly<- function(date) as.Date(as.yearmon(Date)) result<- data.frame ( Date = obs = aggregate(obs, monthly, sum)) Now, I want
2005 Mar 22
1
List of tables rather than an extra dimension in the table or (l)apply(xtabs)
I'm not sure how to best explain what I am after but here goes. I have a data frame with 2 geographical factors. One is the major region the other is the component regions. I am trying to process all the regions at the same time without using "for". So I need (think, I do) a list of matrices each structured according to the number of subregions within each region. So is there a
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 ... -
2008 Oct 29
1
Subsetting data in a loop
I need some help with sub-setting my data.  I am trying to divide a data frame into multiple data frames based on the year collected, and stored in a list with each new data frame labeled with "year X" where X is the year the data was collected.  When I run my current code I get nine error messages stating "In one_year[name] <- myear :  number of items to replace is not a
2006 Nov 22
3
dataframe manipulation
Hi, Having a dataframe 'l1' (dput output is below): >dim(l1) 1274 2 >l1[1:12,] Var1 Freq 1 1988-01-13 1 2 1988-01-16 1 3 1988-01-20 3 4 1988-01-25 2 5 1988-01-30 1 6 1988-02-01 5 7 1988-02-08 4 8 1988-02-14 1 9 1988-02-16 1 10 1988-02-18 4 11 1988-02-24 2 12 1988-03-04 1 I want to extract the times
2008 Mar 20
3
Problem with diff(strptime(...
Hi all, I have been chipping away at a problem I encountered in calculating rates per year from a moderately large data file (46412 rows). When I ran the following command, I got obviously wrong output: interval<- c(NA,as.numeric(diff( strptime(mkdf$MEAS_DATE,"%d/%m/%Y")))/365.25) The values in MEAS_DATE looked like this: mkdf$MEAS_DATE[1:10] [1] 1/5/1962 1/5/1963
2009 Mar 19
1
problem with Dates
Hi all, I am strugling with date formates and caliculating diferent operations like different between 2 dates and getting minimum in vector of dates that is i m working with dates in formate "6/22/1992 12:00:00 AM" and the vector is [1] 6/4/1992 12:00:00 AM 2/13/1992 12:00:00 AM 6/19/1992 12:00:00 AM [4] 2/11/1992 12:00:00 AM 6/22/1992 12:00:00 AM 10/3/1991
2009 Nov 08
1
Turn dates into age
Ive got a big column of dates (also some fields dont have a date so they have NA instead), that i have converted into date format as so... dates<-as.character(data[,"date_commissioned"]); # converted dates to characters dates[1:10] [1] "19910101" "19860101" "19910101" "19860101" "19910101" "19910101" "19910101"
2008 Apr 25
4
Constructing dummy variables for months for a time series object
I have a TS of monthly observations. head(data4) 1991(1) 1991(2) 1991(3) 1991(4) 1991(5) 1991(6) 12.00864 11.94203 11.98386 12.01900 12.19226 12.15488 Now I want to make 11 dummy variables indicating months. Therefore I did followings : For Jan : rep(c(rep(0,0), 1, rep(0, 11)), 17) For Feb : rep(c(rep(0,1), 1, rep(0, 10)), 17) ........ and so on But my
2008 Mar 30
2
convert weekly time series data to monthly
I have weekly time series data with year, month, day, and price variables. The input data set for the weekly series takes the following form: Year month day price 1990 8 20 119.1 1990 8 27 124.5 1990 9 3 124.2 1990 9 10 125.2 1990 9 17 126.6 1990 9 24 127.2 1990 10 1 132.1 1990 10 8 133.3 1990 10 15 133.9 1990 10 22 134.5 1990 10 29 133.9 .. ... ... ... ... ... .... .... 2008 3 3 313.7 2008
2007 Jun 20
1
Date and selection
Dear R experts, Suppose I have a data.frame recording the date and test results of some subjects like this: Name Date results John 01/01/1991 2 John 02/01/1991 3 John 09/0101991 4 Micheal 02/01/1991 4 Micheal 04/01/1991 5 .... How to select the earliest (or latest) test result from all subjects? Thank you. Regards, CH -- "The scientists of today think deeply instead of clearly. One
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
2017 Oct 06
2
Time series: xts/zoo object at annual (yearly) frequency
Hi, I'd like to make a time series at an annual frequency. > a<-xts(x=c(2,4,5), order.by=c("1991","1992","1993")) Error in xts(x = c(2, 4, 5), order.by = c("1991", "1992", "1993")) : order.by requires an appropriate time-based object > a<-xts(x=c(2,4,5), order.by=1991:1993) Error in xts(x = c(2, 4, 5), order.by =
2017 Jun 07
0
Determining which.max() within groups
cumsum() seems to be what you need. This can probably be done more elegantly, but ... out <- aggregate(Q ~ wyr, data = Daily, which.max) tbl <- table(Daily$wyr) out$Q <- out$Q + cumsum(c(0,tbl[-length(tbl)])) out ## yields wyr Q 1 1990 4 2 1991 6 3 1992 9 4 1993 15 5 1994 18 I leave the matter of Julian dates to you or others. Cheers, Bert Bert Gunter "The trouble
2009 Sep 30
2
Few questions about oVirt install.
Hi. I have successfully installed ovirt. Boot 2 nodex throught PXE boot, and added to pool. Whe i try to create NFS storage, they in state: pending setup. How to add NFS storage? taskomatic.log INFO Wed Sep 30 16:59:09 +0300 2009 (1991) starting task_refresh_pool INFO Wed Sep 30 16:59:09 +0300 2009 (1991) storage_find_suitable_host: host node3.ovirt.priv uuid 30303234-3144-3832-4638-3931FF