similar to: extracting data

Displaying 20 results from an estimated 20000 matches similar to: "extracting data"

2011 Jun 26
2
how to extract data from a function printout - example provided
Hi there, Does anyone know how to extract data from a function that prints out two or more summaries? In the function below (the whole code is provided) we get 5 different tables of data. I would like to split each of these tables in a separate file (while the function itself shouldn't be changed), so that further analysis on each data set could be carried out. Your help is deeply
2011 Jul 05
2
sample function with different proportions
Hi there, I guess this is an easy one, but still:  I would like to randomly sample 0s and 1s but in a way that I end up having for example 70% of 1s and the rest of 0s and not 50:50 as this function does: sample(c(0,1), 100, replace = TRUE) Any recommendations? Many thanks! Ana [[alternative HTML version deleted]]
2008 Sep 21
1
Calculating interval for conditional/unconditional correlation matrix
Hi there, Could anyone please help me to understand what should be done in order not to get this error message: Error: evaluation nested too deeply: infinite recursion / options(expressions=)? Here is my code: determinant<- function(x){det(matrix(c(1.0,0.2,0.5,0.8,0.2,1.0,0.5,0.6,0.5,0.5,0.5,1.0,x,0.8,0.6,x,1.0),ncol=4,byrow=T))} matrix<-
2009 Jan 09
3
Matrix: Problem with the code
Hi, Can any one please explain why the following code doesn't work? Or can anyone suggest an alternative. Suppose       x<-c(23,67,2,87,9,63,8,2,35,6,91,41,22,3)        mat<-0;        for(j in 1:length(x))        {              for(i in 1:p)                      mat[i,j]<-x[j]^i;        }    Actually I want to have a matrix with p columns such that each column will have the
2012 Jan 01
4
matrix position to list of coordinates
How can I extract a list of the positions in the matrix? > A=matrix(1:8, nrow=2,ncol=4) > A [,1] [,2] [,3] [,4] [1,] 1 3 5 7 [2,] 2 4 6 8 Something like this pos.A 1 1 1 2 1 3 1 4 2 1 2 2 2 3 2 4
2012 Feb 06
3
Logistic Regression
I am looking for R packages that can make a Logistic Regression model with parameter estimation by Maximum Likelihood Estimation. Many thanks for helping out.
2011 Jul 16
1
MatchIt Package
Hi there dear R users! Anyone knows why does matchit function returns error whenever the "hull" option is used (either "hull.both", "hull.control" or "hull.treat"). Things work well with all the rest of discard options. This is the error msg. >m.out.base <- matchit(formula=f, data=d, method=m, discard="hull.control") [1]
2009 Sep 21
1
Three dimensional view of the profiles using 'rgl' package (example of 3 dimensional graphics using rgl package).
Hi there, Anyone has an idea how to put those two sets of code together so that I can get a 3-dimensional picture that includes points instead of 2 separate pictures which doesnt make that much sense at the end. #Let's say that these are the data we would like to plot: A<-c(62,84,53) B<-c(64,82,55) C<-c(56,74,41) D<-c(46,68,38) E<-c(71,98,72) data<-rbind(A,B,C,D,E)
2010 Aug 25
4
Merging two data set in R,
Dear R Gurus, I am currently working on the two dataset ( A and B), they both have the same fields: ID , REGION, OFFICE, CSTART, CEND, NCYCLE, STATUS and CB. I want to merge the two data set by ID. The problem I have is that the in data A, the ID's are unique. However in the data set B, the ID's are not unique, thus some repeat themselves. How do I the merge or retrieve the
2011 Jul 29
3
help with plot.rpart
? data=read.table("http://statcourse.com/research/boston.csv", , sep=",", header = TRUE) ? library(rpart) ? fit=rpart (MV~ CRIM+ZN+INDUS+CHAS+NOX+RM+AGE+DIS+RAD+TAX+ PT+B+LSTAT) Please: Show me the tree. Mark -------- Original Message -------- Subject: Re: [R] help with rpart From: "Stephen Milborrow" <[1]milbo at sonic.net>
2012 Feb 02
4
an unusual use for R
I thought some of you might be amused by this. In my non-work time, I'm an avid weaver and teacher of weaving. I'm working on a project involving creating many detailed weaving patterns, so I wrote R code to automate it. Details here: http://stringpage.com/blog/?p=822 If the overlap between R users and avid tablet weavers turns out to be >> 1, I'll polish it up and turn it
2007 Feb 13
5
Fatigued R
Hi R, Please solve my problem........... I am extracting Bloomberg data from R, in a loop. R is getting fatigued by doing this process and gives some errors. I introduced sleep function. Doing this sometimes I get the results and sometimes not. I even noticed that if I give complete rest for R (don't open R window) for 1 day and then run my code with the sleep function, then the
2018 Mar 17
3
length of 'dimnames' [2] not equal to array extent- For Correlation Plot
Hi Sarah, Thank you for your help. I tried using CR1<-as.matrix(CR1) but gives error Error in corrplot(CR1, method = "circle") : The matrix is not in [-1, 1]!. I am using a corrplot library. Please find the reproducible example: dput(head(CR1,10)) structure(c(26L, 46L, 39L, 38L, 47L, 59L, 56L, 61L, 43L, 60L, 78L, 63L, 2L, 58L, 8L, 1L, 1L, 9L, 11L, 2L, 1037500L, 46747L, 346300L,
2010 Dec 13
3
curve
Hi All, I generated 5000 samples using the following script test<- rnorm(5000,1000,100) test1 <- subset(test, subset=(test > 1100)) d <- density(test) plot(d, main="Density of production") abline(v=mean(test1) I wanted to do the following but faced difficulties 1. to shade or color (blue) the curve using the criterion that any
2013 Apr 03
5
Can package plyr also calculate the mode?
I am trying to replicate the SAS proc univariate in R. I got most of the stats I needed for a by grouping in a data frame using: all1 <- ddply(all,"ACT_NAME", summarise, mean=mean(COUNTS), sd=sd(COUNTS), q25=quantile(COUNTS,.25),median=quantile(COUNTS,.50), q75=quantile(COUNTS,.75), q90=quantile(COUNTS,.90), q95=quantile(COUNTS,.95), q99=quantile(COUNTS,.99) )
2013 Sep 26
1
R not ploting lines in the correct order
Hi, I have a set of x, y points where x represents dates and y actual values. I am trying to plot a line graph of the data with points on top, but R is connecting the wrong points with lines. Does anyone know how I can rectify this. Please see sample below: x= 24/09/2009 09:13 16/10/2009 11:17 24/10/2009 21:43 11/09/2009 18:34 22/08/2009 15:45 10/08/2009 00:30 14/08/2009 14:52 24/09/2009
2012 Mar 12
3
Finding the median
Hi just a quick question in which I must use the "function and return" part of R. If I was asked to define a function called "median" where the function has a single argument x and returns the median value of a vector. How would I go about saying the median = element x in terms of n (say (n + 1)/2 or whatever it would be) if there is an even amount of elements, or x in terms
2018 Mar 17
0
length of 'dimnames' [2] not equal to array extent- For Correlation Plot
That does clarify for me that you're missing a step: I didn't clearly follow your description at first. corrplot expects a correlation matrix, not your original data. You need to use cor() first. That's pretty clear in the documentation. See for instance the examples: data(mtcars) M <- cor(mtcars) corrplot(M) Sarah On Sat, Mar 17, 2018 at 12:00 PM Shivi Bhatia <shivipmp82 at
2013 Mar 28
2
Can R read in .xyz files
Hi, Can R read in .xyz files? If so, what is the package, thanks -- Shane [[alternative HTML version deleted]]
2016 Apr 15
1
Decision Tree and Random Forrest
I need the output to have groups and the probability any given record in that group then has of being in the response class. Just like my email in the beginning i need the output that looks like if A and if B and if C then %77 it will be D. The examples you provided are just simply not similar. They are different and would take interpretation to get what i need. On Apr 14, 2016 1:26 AM,