similar to: Generation of uniform random numbers

Displaying 20 results from an estimated 1000 matches similar to: "Generation of uniform random numbers"

2008 Jan 08
1
using lapply()
useR's, I am trying to find a quick way to change some values in a list that are subject to a condition to be NA. Consider the 3x1 matrix: delta <- matrix(c(2.5,2.5,1), nrow = 1) And consider the list named v that has 3 elements > v v[[1]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 4.25 3.25 2.25 1.25 0.25 0.75 1.75 2.75 3.75 4.25
2006 Aug 11
1
x tick labels - sparse?
Hi, I'm stuck on creating a plot with x tick labels for every Nth tick mark - how is that done? I don't see a simple solution to this in help(plot) or help(par) and what I've tried is not working, eg, the following does not work, although it seems intuitive to me that it should work: x <- seq(-100,1000,25) y <- x * x % find all the x values that are multiples of 100 tmp <-
2008 Oct 03
1
NA's in segmented
I am trying to fit a very simple broken stick model using the package "segmented" but I have hit a roadblock. > str(data) 'data.frame': 18 obs. of 2 variables: $ Bin : num 0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25 4.75 ... $ LnFREQ: num 5.06 4.23 3.50 3.47 2.83 ... I fit the lm easily: > fit.lm<-lm(LnFREQ~Bin, data=id07) But I keep getting an error
2012 Nov 14
2
aggrete data from combination
Dear R users, A have a dataframe (matrix) with two collumns (plot, and diameter (d)). I want all diameters values for different combination of plots. For example I want all d values for all posible combination, 100C2 (all d values for plot 1 with all d values in the plot 2.......with all d values from plot 1 with all d values from plot 100, ...... with all d values from plot 99 with all d values
2009 Aug 13
1
R code to reproduce (while studying) Bates & Watts 1988
Hi R users, I'm here trying to understand correlated residuals in nonlinear estimation. I'm reading/studying the book Bates, D. M. and D. G. Watts, (1988), /Nonlinear regression analysis and its applications/, Wiley, NY. pages 92-94, trying to reproduce the figures and to find out the code in R to perform the necessary calculations. I also consulted Pinheiro and Bates, but without
2010 Aug 30
1
Help With Post-hoc Testing
I am trying to do post-hoc tests associated with a repeated measures analysis with on factor nested within respondents. The factor (SOI) has 17 levels. The overall testing is working fine, but I can''t seem to get the multiple comparisons to work. The first step is to "stack" the data. Then I used "lme" to specify and test the overall model. Finally
2009 Jun 18
1
recovering the name of a given value in a matrix
Hi all, I've got object *cumsumtab, *where the first row (1,2,3,4,5,6,8,13,14,17,40) are names (actually, categories), and the second row has numeric values. > cumsumtab 1 2 3 4 5 6 8 13 14 17 40 2 4 6 7 9 11 13 14 15 16 17 I'm trying to find a way of finding to which category ( in *names(cumsumtab) * ) belongs a given value (let's say Q1 <- 4.25). So far, I've
2012 Nov 14
5
aggregate combination data
Dear R users, I want to aggregate all *d *data from all combination of n *plots* taken by k. Thank very much! My data is like that: plot d 1 14 1 13 1 12 1 14 1 18 1 20 1 21 1 43 1 108 1 43 2 41 2 61 2 83 2 61 2 84 2 45 2 21 2 12 2 11 ... 100 10 100 12 -- --- Catalin-Constantin ROIBU Forestry engineer, PhD Forestry Faculty of Suceava
2010 Oct 29
1
Tukey post hoc comparison (glht?) after 3factorial mixed model (lmer)
Hello, dear R-community. This is a question about TukeyHSD between factor combinations of a Three-Way ANOVA, which is - since it is a multi measure ANOVA - not a simple ANOVA but a Generalised Linear Mixed Model (GLMM), calculated with "lmer". > growth <- groupedData(length~meas|box_id,outer=~spec*comp*water,data=all.spec) > model <-
2012 Mar 28
1
CI with confint
Hello all, I'm trying to use confint from the MASS package to compute confidence intervals for an nls object. When I plot the results, however, they don't make sense - lines cross over the fitted model or just don't match the data. Code is : Thanks for help dat<-data.frame(a,b) with(dat, plot(a,b)) model<-(nls(b~(1/exp(a*x))*n, data=dat, start=list(x=.001,n=20),
2007 Dec 08
0
help for segmented package
Hi, I am trying to find m breakpoints of a linear regression model. I used the segmented package. It works fine for small number of predicators and breakpoints.(3 r.v. 3 points). However, my model has 14 variables it even would not work even for just one breakpoints!. The error message is always estimated breakpoints are out of range. Since my problem is time related problem. So I
2009 Oct 15
4
Subset returning unexpected result
Dear all, I am attempting to subset a data frame based on a range of latitude values. I want to extract the values of 'interception' where latitude ranges between 50 and 60. I am doing this using the following code, yet it doesn't return the results I expected: > test <- subset(int1901, Latitude>=50 & Latitude <60, select=c(Latitude, Interception)) > head(test)
2016 May 25
1
Slow RAID Check/high %iowait during check after updgrade from CentOS 6.5 -> CentOS 7.2
On 2016-05-25 19:13, Kelly Lesperance wrote: > Hdparm didn?t get far: > > [root at r1k1 ~] # hdparm -tT /dev/sda > > /dev/sda: > Timing cached reads: Alarm clock > [root at r1k1 ~] # Hi Kelly, Try running 'iostat -xdmc 1'. Look for a single drive that has substantially greater await than ~10msec. If all the drives except one are taking 6-8msec, but one is very
2011 Jan 17
2
Summing data frame columns on identical data
Dear all, I have 9 data frames, and I'm simply trying to sum the values of column 3 (on a row-by-row basis). However, there are a slightly different number of rows in each data frame, so I'm receiving the following error: "Error in Ops.data.frame(mrunoff_207101[3], mrunoff_207102[3]) : ? + only defined for equally-sized data frames". Here is what I'm attempting to do:
2008 Aug 07
2
Problems using hetcor (polycor)
Sorry if this post should be long but I tried to give you a piece of my data to reproduce my error message using hetcor: Fehler in result$rho : $ operator is invalid for atomic vectors Zus?tzlich: Warning messages: 1: In polychor(x, y, ML = ML, std.err = std.err) : 1 row with zero marginal removed 2: In polychor(x, y, ML = ML, std.err = std.err) : the table has fewer than 2 rows Error in
2013 Apr 04
1
Freenas domU network performance issue
Hi guys, I''m running a freenas domU (FreeBSD 8.3 based, ZFS v28, 2 vcpus mapped to the same HT capable core) to serve storage for all purpose including other domUs running on the same host. I did some study to understand how well it works and the result is kind of confusing. In summary, the network performance between domains on the same host is worse than expected. And NFS service to
2011 Oct 29
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Sat, 2011-10-29 at 15:16 -0500, Hal Finkel wrote: > On Sat, 2011-10-29 at 14:02 -0500, Hal Finkel wrote: > > On Sat, 2011-10-29 at 12:30 -0500, Hal Finkel wrote: > > > Ralf, et al., > > > > > > Attached is the latest version of my autovectorization patch. llvmdev > > > has been CC'd (as had been suggested to me); this e-mail contains > >
2005 Jun 06
1
A performance anomaly
I wrote a simple log likelihood (for the ordinary least squares (OLS) model), in two ways. The first works out the likelihood. The second merely calls the first, but after transforming the variance parameter, so as to allow an unconstrained maximisation. So the second suffers a slight cost for one exp() and then it pays the cost of calling the first. I did performance measurement. One would
2012 Apr 03
3
filling small gaps of N/A
Hi everybody, I'm a new R french user. Sorry if my english is not perfect. Hope you'll understand my problem ;) I have to work on temperature data (35000 lines in one file) containing some missing data (N/A). Sometimes I have only 2 or 3 N/A following each other, but I have also sometimes 100 or 200 N/A following each other. Here's an example of my data, when I have only small gaps
2012 Apr 24
2
Basic matrix manipulation problem
Hello, this forum was very helpful yesterday with a simple question I had on working with tables. What function will I need to use to do the following. Move matrix a: A B C D x 1 2 3 4 y 5 6 7 8 to the mean of B&C and C&D: BC CD x 2.5 3.5 y 6.5 7.5 and then to the mean of B&CB, C&BC, C&CD, and D&CD: AAB BAB