similar to: How to optimize this codes ?

Displaying 20 results from an estimated 90 matches similar to: "How to optimize this codes ?"

2012 May 21
2
Problem with function
Hi, I'm new to R, so apologies in advance for the triviality of this question, but I was wondering if anyone could tell me why this function doesn't return the expected output, i.e. a matrix containing two columns from a large data frame called 'finalTable'? Oddly, the statement between the curly brackets works if run with 'thisCol' and 'thatCol' already defined.
2010 Dec 14
1
Modifying values outside a function using "apply".
I am sure this si a simple problem but the solution is evading me. I have a list of matrices all with the same number of columns but different number of rows. The first two columns label the row. The labels are allways the same for the same row numbers, just some matricies have more rows. For example using 3 column matrices... > q.1 <- function(r){return(cbind(seq(0, 10, by=1)[1:r],
2004 Aug 03
3
basic questions: any place for them
Hi I have two basic questions, and here they go, but I was wondering as well where can I ask these basic questions without bothering you people I've used Splus and now I'm using R and there's some functions that I can't simply find one: sort.col that allows data.frames to be sort by a given col (I saw the funtion sort but that's for vectors. and I can't believe I
2009 Sep 03
1
Output from as.windrose() in oce package baffles me
I'm having trouble understanding the output from as.windrose(). For one thing, data on a boundary between sectors seem to be left out of the counts. I assume that explains the missing point in the output below (angle 45). Shouldn't one side of each sector interval be open, to include values such as my 45 in the example? Also, why does the angle 180 in my input apparently not result in
2024 Nov 11
0
Matrix - querying dsCMatrix how to save it
I was asked privately > I have been using <the Matrix package> extensively to > calculate the relatedness-matrix based on the pedigree for > our ornamental plants. I was wondering if you could give > me some advice, for which I would like to thank you in > advance! > The output of the relatedness matrix I get from > the nadiv package is a
2008 Jan 09
1
reading table
Hi, I am encountering a problem in reading a file, the file looks like that: T 3 0 -- -- -- T -- -- -- 18.98 3 1 6.75 4.39 39 -- -- -- 18.58 3 2 6.90 4.90 43 -- -- -- 18.63 3 3 7.07 5.39 48 -- -- -- 18.78 G 4 0 7.41 5.54 47 G
2011 Feb 15
4
string parsing
I am trying to get stock metadata from Yahoo finance (or maybe there is a better source?) here is what I did so far: yahoo.url <- "http://finance.yahoo.com/d/quotes.csv?f=j1jka2&s="; stocks <- c("IBM","NOIZ","MSFT","LNN","C","BODY","F"); # just some samples socket <-
2001 Mar 10
3
Problem With Model.Tables Function
I am using R for the first time in one of my classes. My students have alerted me to a problem for which we have not found an answer. We find that some means returned by the model.tables function are not correct when missing data is present in analysis of variance problems. We have duplicated the problem using R 1.2.0, 1.2.1, and 1.2.2 under Windows 98 and several distributions of Linux (Redhat
2009 Jul 17
19
I need help saving table data from a rake task
I need to find out how I can create and save a large dataset to a table based on multiple returned arrays from a Rake task. Here is my example using just two arrays (there are 14 in this particular rake task): update_tsos_offense = TsosOffense.new to_team_id, to_ppcs = update_tsos_offense.calculate_tsos(TotalOffense, "ydspgm", "desc") ro_team_id, ro_ppcs =
2010 Jan 04
1
log-normal overlay
Hello, Using the following lines of code, I created the following graph:
2010 Jan 04
1
log normal overlay
Hello, Using the following lines of code, I created the following graph:
2007 Feb 21
19
Critical Issue - Site down...
We have a site that is running Mongrel and is down. Below is the Mongrel log file information. The server is a Linux server with 2gb of RAM. EV1 (hosting site) says that since this is a Linux server that the RAM is cached and that there is plenty of free memory available. Can anyone make sense of this error and have some suggestion of options that I may take to correct this issue and get
2004 Feb 13
3
Calculate Closest 5 Cases?
I've only begun investigating R as a substitute for SPSS. I have a need to identify for each CASE the closest (or most similar) 5 other CASES (not including itself as it is automatically the closest). I have a fairly large matrix (50000 cases by 50 vars). In SPSS, I can use Correlate > Distances to generate a matrix of similarity, but only on a small sample. The entire matrix can not
2012 Mar 13
0
111 FIXMEs in main/src
Hi, We sometimes see offers to contribute, asking what needs to be done. If they know C, how about the 111 FIXMEs? But which ones would be most useful to fix? Which are difficult and which are easy? Does R-core have a process to list and prioritise the FIXMEs? ~/R/Rtrunk/src/main$ grep "[^/]FIXME" * | wc -l 111 ~/R/Rtrunk/src/main$ grep -A 1 "[^/]FIXME" * arithmetic.c:/*
2009 Apr 14
3
scatterplot3d
Dear R-help, I am having trouble with your scatterplot3d program. For help with this problem I was directed to your address by Martin Maechler at " r-core-bounces at r-project.org." I'm also sending a CC to " r-core-owner at r-project.org" as I'm not yet certain of the proper address to use for this. I have R version 2.8.1 and have downloaded 'scatterplot3d.'
2014 Sep 01
1
Correlation Matrix with a Covariate
R Help - I'm trying to run a correlation matrix with a covariate of "age" and will at some point will also want to covary other variables concurrently. I'm using the "psych" package and have tried other methods such as writing a loop to extract semi-partial correlations, but it does not seem to be working. How can I accomplish this? library(psych) > set.cor(y =
2011 Aug 19
0
rms:fastbw variable selection differences with AIC .vs. p value methods
I want to employ a parsimonious model to draw nomograms, as the full model is too complex to draw nomograms readily (several interactions of continuous variables). However, one interesting variable stays or leaves based on whether I choose "p value" or "AIC" options to fastbw(). My question boils down to this: Is there a theoretical reason to prefer one over another?
2007 Sep 15
22
[LLVMdev] 2.1 Pre-Release Available (testers needed)
LLVMers, The 2.1 pre-release (version 1) is available for testing: http://llvm.org/prereleases/2.1/version1/ I'm looking for members of the LLVM community to test the 2.1 release. There are 2 ways you can help: 1) Download llvm-2.1, llvm-test-2.1, and the appropriate llvm-gcc4.0 binary. Run "make check" and the full llvm-test suite (make TEST=nightly report). 2) Download
2013 Apr 01
0
ggplot2 label problem
I have a problem to plot label (Year) only for significant values (in this case spoz and sneg). I use this code, but don't work with labels. library(ggplot2) ggplot(data1, aes(x = Year, y = value,fill=type,width=1))+ geom_bar(stat="identity",position="identity")+ scale_y_continuous(breaks = round(seq(-100, 100, by = 10),10))+ theme_bw() Thank you! the data used is:
2007 Sep 18
0
[LLVMdev] 2.1 Pre-Release Available (testers needed)
Hi, LLVM 2.1-pre1 test results: Linux (SUSE) on x86 (P4) Release mode, but with assertions enabled LLVM srcdir == objdir # of expected passes 2250 # of expected failures 5 I ran the llvm-test suite on my desktop while I was also working on that PC, so don't put too much trust in the timing info. Especially during the "spiff" test the machine was swapping