similar to: indexing??

Displaying 20 results from an estimated 30000 matches similar to: "indexing??"

2011 Jun 02
4
generating random covariance matrices (with a uniform distribution of correlations)
List members, Via searches I've seen similar discussion of this topic but have not seen resolution of the particular issue I am experiencing. If my search on this topic failed, I apologize for the redundancy. I am attempting to generate random covariance matrices but would like the corresponding correlations to be uniformly distributed between -1 and 1. The approach I have been using is:
2003 Sep 03
2
lme in R and Splus
Good Day, Included below is some code to generate data and to fit a mixed effects model to this fake data. The code works as expected when I call the function "lme" in Splus but not in R. The error message from calling lme in R is: "Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups" I installed the nlme package for R around 20 August
2010 Aug 05
1
difficulties with read.table applied to files from URL
Hello, I am using read.table to read files directly from a public ftp site. I have a general list of files that may or may not exist in the ftp directory, but my hope was that R would read the file if it existed and ignored it if it didn't exist and move on to the next one. However, when R arrives at a file that does not exist I get the error message "Error in file(file, "rt") :
2012 Jul 24
3
Nearest Neighbors
I was wondering if there is a way in R to find k nearest neighbors of various orders, say order 2, 3, or 4. In otherwords neighbors of neighbors of neighbors. You get the idea. I know that I can use knearneigh(matrix.data, k) but this only gives me the k nearest neighbors and not of a particular order. Thanks in advance. -- View this message in context:
2002 Mar 19
1
Catenating expressions in plotmath().
I want to do something like produce a plot title of the form ``Sample size n = 42; critical value k_0 = 17.'' where the ``n'' is to be in a maths font and ``k_0'' indicates that the 0 is a subscript. (A la LaTeX.) But the values ``42'' and ``17'' are to be substituted in from the numeric values of R objects. After a bit of struggle I found that >
2012 Apr 25
1
Average for Huge file
Hi, I am a PhD student. Basic knowing R. I have 2 datw files 1st 5min intervals & the 2nd 1min for a month. My taske is to have 15min average for all. This how data look; Date Pm FF LL KK HH NN Ww DD 01/01/2012 00:00:00 349 120 10 8 1178 1292 2005 762 01/01/01/2012
2009 Jul 14
2
hi friends, is there any wait function in R
hi, is there any wait function in R. I am running one R script to plot many graphs it is in the for loop. its showing no error but its not plotting well I think i can solve this problem with a wait function. Please help me in this regards. If u need any clarification about programme. u can find the script below. best regards, Deepak.M.R Biocomputing Group University of Bologana. #!/usr/bin/R
2012 Mar 01
5
select rows by criteria
Hello, I am stuck with selecting the right rows from a data frame. I think the problem is rather how to select them then how to implement the R code. Consider the following data frame: df <- data.frame(ID = c(1,2,3,4,5,6,7,8,9,10), value = c(34,12,23,25,34,42,48,29,30,27)) What I want to achieve is to select 7 rows (values) so that the mean value of those rows are closest to the value of 35
2010 Feb 01
1
problem withrbind function
Hi all, I am trying to to merge two data.frames(kk and ff) like > kk a b d 1 1 4 7 2 2 5 8 3 3 6 9 > ff a b d 1 2 5 8 2 3 6 9 3 4 7 1 and g<-rbind(kk,ff) is working perfectly and giving results but if any of the column name changed then its giving "Error in match.names(clabs, names(xi)) : names do not match previous names" like > kk a b d 1 1 4 7 2 2 5 8 3 3
2006 Nov 03
1
difference in using with() and the "data" argument in glm call
Dear all, I am dealing with the following (apparently simple problem): For some reasons I am interested in passing variables from a dataframe to a specific environment, and in fitting a standard glm: dati<-data.frame(y=rnorm(10),x1=runif(10),x2=runif(10)) KK<-new.env() for(i in 1:ncol(dati)) assign(names(dati[i]),dati[[i]],envir=KK) #Now the following two lines work correctly:
2006 Nov 03
1
[R] difference in using with() and the "data" argument in glm (PR#9338)
I've redirected this reply from r-help to the bugs list. On 11/3/2006 8:25 AM, vito muggeo wrote: > Dear all, > I am dealing with the following (apparently simple problem): > For some reasons I am interested in passing variables from a dataframe > to a specific environment, and in fitting a standard glm: > > dati<-data.frame(y=rnorm(10),x1=runif(10),x2=runif(10)) >
2013 Feb 07
4
Sourcing my file does not print command outputs
I looked at the documentation of source() and summary(), and I could not find the reason why calling something like: > summary(resamps) from the command line, works (it prints the summary) whereas calling summary(resampls) from a file that I source with source("my_file.r") does not print anything. How can I get summary(resamps) to print when I source a file with this command?
2002 Jun 20
1
tree construction crashes (PR#1698)
Full_Name: Petr Savicky Version: 1.5.0 OS: SuSE 7.2 Submission from: (NULL) (147.231.6.1) The function tree() from the tree package crashes for certain input data. All the information needed to reproduce the error (data, script, expected error message) may be found at http://www.cs.cas.cz/~savicky/tree_error/tree_error.tgz Exactly the same error appeared at another computer running some RedHat
2010 Oct 26
4
divide column in a dataframe based on a character
Hello, If I have a dataframe: example(data.frame) zz<-c("aa_bb","bb_cc","cc_dd","dd_ee","ee_ff","ff_gg","gg_hh","ii_jj","jj_kk","kk_ll") ddd <- cbind(dd, group = zz) and I want to divide the column named group by the "_", how would I do this? so instead of the first row being x
2011 Apr 18
4
Deleting the last value of a vector
Hey guys, I've search a few threads about deleting a value from a vector, but no one has addressed this question so far. I want to delete the last value from a string of values I have: r = [ 1, 2, 3, 4, 5 ], and i want to make r2 = to [ 1, 2, 3, 4] So that r2 is just like r, except that it missing the final value. Thanks, -- View this message in context:
2013 Feb 07
1
Saving model and other objects from caret
Say I train a model in caret, e.g.: RFmodel <- train(X,Y,method='rf',trControl=myCtrl,tuneLength=1) How can I save this to disk and load it later in R? How about an object of the class "resamples"? resamps <- resamples( list( RF = RFmodel, SVM = SVMmodel, KNN = KNNmodel, NN = NNmodel )) Thanks,
2009 Jun 29
5
Help
HiĀ group, I found a module for adaptive kernel density estimation for Stata users, but unfortunetly I don't have access to Stata, can I find a similar approach using R? Thank u so much 4 ur time. [[alternative HTML version deleted]]
2011 Apr 22
2
Matching a vector with a matrix row
Hello I am trying to compare a vector with a Matrix's rows.The vector has the same length as the number of columns of the matrix, and I would like to find the row numbers where the matrix's row us the same as the given vector. What I am doing at the moment is using apply as follows: apply(Matrix,1,function(x)all(x%in%LHS)) but this isn't too fast actually. I would like to know if
2015 Jul 19
2
Multiple network cards - routing issue?
On Sat, 18 Jul 2015 21:34:27 -0700 Gordon Messmer wrote: > Does the system work correctly if you don't run those "ip route" commands? It's exactly the same. And what I mean by exactly the same is EXACTLY the same. I rebooted the system which should clear out my route commands and whatnot, and discovered that everything (route -n and ip route show and whatnot) are exactly
2004 Jun 03
5
Confidence intervals for predicted values in nls
Dear all I have tried to estimate the confidence intervals for predicted values of a nonlinear model fitted with nls. The function predict gives the predicted values and the lower and upper limits of the prediction, when the class of the object is lm or glm. When the object is derived from nls, the function predict (or predict.nls) gives only the predicted values. The se.fit and interval aguments