similar to: random numbers selection - simple example

Displaying 20 results from an estimated 4000 matches similar to: "random numbers selection - simple example"

2006 Dec 14
7
loop is going to take 26 hours - needs to be quicker!
Dear R-help, I have a loop, which is set to take about 26 hours to run at the rate it's going - this is ridiculous and I really need your help to find a more efficient way of loading up my array gpcc.array: #My data is stored in a table format with all the data in one long column #running though every longitute, for every latitude, for every year. The #original data is sotred as
2006 Dec 12
2
how do you interpolate a gaussian grid to a standard 2.5 degree grid?
Dear R-help community, I have looked on the R search site and archives but cannot find mention of a way of interpolating a gaussian distribution of data to a standard 2.5 degree grid. I have two global dataset and I need to correlate - unfortunately one is a 2.5 degree grid dim[longitude=144,latitude=72] and one is gaussian dim[longitude=192,latitude=94]. I would rally appreciate hearing
2006 Dec 11
3
upside down image/data
Dear R-community, I am looking for some simple advice - I have a matrix (therefore 2 dimensional) of global temperature. Having read R-help I think that when I ask R to image() or levelplot() my matrix will it actually appear upside down - I think I therefore need to use the line: > levelplot(temperature.matrix[,ncol(output.temp):1], ........) to get it looking like it was on the globe due
2007 Jul 24
3
Overlaying a single contour from a new data array in levelplot
Dear R-Help community, I am trying to overlay a single contour line over a correlation plot using levelplot in the lattice package. These are the two arrays: 1) a correlation plot over Africa - so each grid square is a different colour dependent on correlation - this is in an array: result_cor with dim[465,465] 2) a single contour line from a ***different data source*** - this is from data
2006 Nov 20
3
problem with loop to put data into array with missing data forsome files
Hi Jenny If you want a general solution I understand. However I just downloaded the file fine (as far as I can tell) so you are welcome to have a copy. I can email it to you if you want. I do not think your test for NA is valid. i.e if(test != "NA"){ } I think you should use if(is.na(test)){ } Or something similar. J --- John Seers Institute of Food Research Norwich
2007 Mar 16
1
Problem installing R onto Solaris 2.10 system - need advice!!!!!
Dear R-Help friends, I am unable to get the latest version of R (2.4.1) to compile on my solaris 10 system - has anybody else experienced this problem and are you able to offer me any advice? I appreciate your time, many thanks, Jenny Barnes Here are my CURRENT specifications: platform sparc-sun-solaris2.10 arch sparc os solaris2.10
2007 Apr 19
1
is there a function to give significance to correlation?
Dear R-Help, I am trying to find a function that will give me the significance of the correlation of 2 variables (in the same dimension arrays) correcting for serial autocorrelation. How can I view the function cor.test's code? I would like to know a lot more detail about the function than written in the documentation at http://finzi.psych.upenn.edu/R/library/stats/html/cor.test.html to
2007 Oct 31
3
thicker axis in levelplot
Dear R-help community, I need to find out how to make the black axis line around my plot thicker in levelplot, I cannot find the correct command in ?levelplot or ?par - or if it is there I cannot get it to work - any help would be more that appreciated! Here's an example script - I would want the code for making the axis bordering the plot thicker: x<- seq(pi/4, 5*pi,length=100)
2006 Nov 23
3
reaccessing array at a later date - trying to write it to file
Dear R-help community I am trying to write an R object (data.out) to a file in order to re-access it later and not have to re-load up the array with data every time. Here is the form of data.out > data.out <- list(lats=seq(88.542, -88.542, length=94), lons=seq(0, 360-1.875, length=192), date=vector(length=nyr*12), data=array(NA, c(nyr*12, 94*192)) ) I tried >
2007 Jan 10
2
correlation value and map
Dear R-help community, I have 2 different arrays of precipitation data each of the same dimensions of [longitude, latitude, time] dim=[30,32,43], called array1 and array2. I need to correlate them. This is the code I used to get one overall correlation value for the whole of the area of interest: > result <- cor(array1,array2,use="complete.obs") > result This give me a
2007 Mar 07
1
compiling latest version of R
Dear R-help community, I have had trouble in the past installing the latest version of R: we got the errors shown below (the computer specifications and version of R are below that). Does anybody have tips for compiling the latest version of R so that I can avoid these errors? configure make ... ... ... f90: CODE: 0 WORDS, DATA: 0 WORDS gcc -G -L/usr/local/lib -o stats.so init.o kmeans.o
2007 Feb 04
1
futures, investment, etc
Hi I am just starting to look at R and trading in futures, stock, etc Can anyone point me to useful background material?
2007 Oct 03
2
Sample selection problem
I want to get a sample of some arbitrary size from a population having only two values 0 and 1 with replacement, but with different probability for selection. For example 0 will be selected with probability 0.4 and 1 with 0.6. I could use sample function i.e. sample(c(0,1), 30, T) to get this, however here, selection of either 0 or 1 has equal probability here. I am looking for a function which
2006 Nov 20
2
problem with loop to put data into array with missing data for some files
Dear R-help community, My main goal of this message is to find a way of skipping a file of a month/year in a loop that does not exist (and making it's output into an data.out array would be NA) and moving onto the next year/month in the loop to carry on filling data.out with real precipitation data. The situation so far: I downloaded 50 years worth of GRIB data files from the NCEP data
2007 Feb 28
4
legend question
Hi to all, I'm sorry for posting this question, I am sure I am missing something important but after reading the documentation I cannot find where the problem is. I want to add a legend to a figure. If I use a simple example drawn from the R Reference Manual such as, for instance: x <- seq(-pi, pi, len = 65) plot(x, sin(x), type="l", col = 2) legend(x = -3, y = .9,
2008 Jun 30
2
Which distribution best fits the data?
Dear R-help community, Does anybody know of a stats function in R that tells you which distribution best fits your data? I have tried look through the archives but have only found functions that tell you if it's normal or log etc. specifically - I am looking for a function that tells you (given a timeseries) what the distribution is. Any help/advice will be greatly appreciated, All the
2007 Oct 03
3
P-value
Hi, why don't you try try ks.test(VeriSeti1, VeriSeti2)$p.value All the best Jenny >How can i print only the P-Value of the kolmogorov smirnov test? > > >> ks.test(VeriSeti1, VeriSeti2) > > Two-sample Kolmogorov-Smirnov test > >data: VeriSeti1 and VeriSeti2 >D = 0.5, p-value = 0.4413 >alternative hypothesis: two-sided > > >This expression
2008 Aug 21
1
summary.lme and anova question
Dear all, When analyzing data from a climate change experiment using linear mixed-effects models, I recently came across a situation where: - the summary(model) showed a significant difference between the levels of a two-level factor, - while the anova(model) showed no significance for that factor (see below). My question now is: Is the anova.lme() approach correct for that model? And why does
2010 Jan 16
2
Drought severity index: Excel to R
Dear all, I'm trying to make an R code for the drought severity index (DSI) developed by Philips and McGregor (1998). You can refer to the description of the algorithm on page 19 from http://dissertations.port.ac.uk/229/01/MaloneS.pdf The code is given in Excel as the following and can be found on page 60 from the same link. C7 = IF(C6<0,IF(@SUM(A6:A1)<0,C6+A6,"0"),
2008 Apr 29
3
generic question -> Genomics with R
Hi everybody, I am trying to make my mind about the use of R for Computational and Statistical Approaches to Genomics. I know this is a vaste field: this is the main reason why I am sending this message to this always useful list! Any key/entry point to this field will be extremely welcome! Please, could you help me to go in the right direction? Thanks!!! Ricardo -- Ricardo Rodr?guez