Displaying 20 results from an estimated 1000 matches similar to: "max value"
2012 May 16
2
trouble with ifelse statement
Hello,
I apologize in advance for not providing sample data, I'm a very new to R
and can't easily generate appropriate sample data quickly. I'm hoping
someone can offer advice without it.
This code below works and does what I want it to do, which is for a given
row in my dataframe, where the variable "peak.cort" = max, it makes the
value of another variable
2012 Apr 21
2
using "factor" to eliminate unused levels without dropping other variables
Hello,
I have been banging my head against the wall trying to figure out this
seemingly simple problem with no success. I'm hoping that one or some
of you can help.
Here is the code I am trying to use:
#importing data
data.file <-read.csv("/file/location", header=TRUE, sep = ",")
#selecting a subset of data based on variable "Sample"
data.subset1 <-
2013 Apr 27
3
path reference problems in R 3.0.0
Hi-
I just upgraded R to 3.0.0 from 2.15.1 (which worked fine). When I started
trying to install updated versions of the libraries, I saw the following
error:
> install.packages("lme4")
Installing package into 'c:/Docume~1/melissa/R/win-library/3.0'
(as 'lib' is unspecified)
Warning in install.packages :
2006 Feb 28
3
Agile Web Development Example Application Question
I''m new to Ruby and to fairly new to programming. I''ve been working
through the "Agile Web Development with Rails" book, and I''m stuck on page
73 of the print version. The book''s online errata directed me here with my
questions.
I''m running Ruby 1.8.3 with MySQL 4.1.8 on OSX 10.3.9. I''ve created the
scaffolding for Admin controller
2001 Jan 11
2
nls error handling
I'm written a function that uses nls in a loop to fit a model to resampled data. Occasionally a sample is drawn such that the algorithm (apparently) can't converge and
step factor reduced below minimum
is printed to the screen. I tried a few different settings for the minFactor parameter in nls.control with no different result. When this happens, I would like my function to put NAs
2010 Nov 29
3
Help Please!!!!!!!!!
Hi,
I have been working with Program R for my stats class and I keep coming upon
the same error, I have read so many sites about inputting data from a text
file into R and I'm using the data to do a correspondence analysis. I feel
like I have read everything and it is still not explaining why the error
message keeps coming up, I have used the exact examples I have seen in
articles and the
2012 Jan 28
2
finding rows in a matrix that match a vector
Hi,
Please excuse my ignorance, but I am just learning R (this is my very first
day programming in R) and having a really hard time figuring out how to do
the following:
I have a matrix that is 1000 row by 6 columns (named 'table.combos') and a 1
row by 6 column vector (named 'mine'). I want to find every row in
'table.combos' that equals 'mine' and then count
2007 Dec 13
3
what does cut(data, breaks=n) actually do?
Hello,
I'm trying to bin a quantity into 2-3 bins for calculating entropy and
mutual information. One of the approaches I'm exploring is the cut()
function, which is what the mutualInfo function in binDist uses. When it's
called in the format cut(data, breaks=n), it somehow splits the data into n
distinct bins. Can anyone tell me how cut() decides where to cut?
Thanks,
Melissa
2009 May 13
2
converting numeric into character strings
Hi,
Im trying to put some numbers into a dataframe , I have a list of numbers
(change points in a time series) like such
[1] 2 11 12 20 21 98 99
but I want R to recognise this as just a character string so it will put it
in one row and column, ideally I want them seperated by commas so I would
have for example
Person Change points (seconds)
A
2013 Jul 16
2
Importing data by odbcConnectExcel in 64 bit
I have probably an old question.
I have R.3.0.1 installed in 64 bit windows 7. The odbcConnectExcel in RODBC
library does not work. Tried odbcConnectExcel2007 still does not work.
Any ideas.
Thanks
Melissa<-sqlFetch(odbcConnectExcel2007("F:\\Cotton2012\\validation.xlsx"),sqtable
= "Sheet3",
+ na.strings = "NA", as.is = TRUE)
Error in
2009 Apr 10
3
turning list into vector/dataframe
Hi,
I have used this command :
resamples<-lapply(1:1000,function(i) sample(lambs,replace=F))
resamples2<-lapply(resamples,Cusum)
to get a list of 1000 samples of my data. The function Cumsum is defined as
follows:
Cusum<-function(x){
SUM<-cumsum(x)-(1:length(x))*mean(x)
min<-min(cumsum(x)-(1:length(x))*mean(x))
max<-max(cumsum(x)-(1:length(x))*mean(x))
diff<-max-min
2002 May 29
4
Why is.integer() doesn't work with single values?
Hi all,
I don't understand the behavior of is.integer():
> x <- integer()
> is.integer(x)
[1] TRUE
> x <- 10
> is.integer(x)
[1] FALSE
> x <- 1:10
> is.integer(x)
[1] TRUE
Why is.interger() returns FALSE if x has only one element? And how can
someone check if x is an integer but contains only one value? (R 1.5.0
on Linux i386)
Thanks, Sven
2006 Jun 19
1
how to do this sum?
Hi, Everybody!
I have a big table which named table_x, and all the elements in the table is very large!
Now I want to do the summay on the talbe_x[,3].
Unfornately, I can't get the right result!
And the R give the warning messages as follow:
> sum(table_x[,3])
>[1] NA
>Warning message:
>interger overflow in sum(.);please use sum(as.numeric(.))
(the original upper message is
2012 Feb 10
1
making multiple lines using qqplot
Hi Everyone,
I want to make 3 lines on the same graph (not as subplots, all in the same
window, one on top of each other) and I want them to be quantile-quantile
plots (qqplot). Essentially, I am looking for the equivalent of Matlab's
"hold on" command to use with qqplot. I know I can use 'points' or 'lines',
but these do not give me a qqplot (only appear to work
2010 Sep 08
1
winbuilder warnings and errors
Hello,
I have been developing a package for phylogenetic analysis which I
plan to submit to CRAN soon. It passes R CMD check with no warnings
on my linux and Mac OS X machines. I don't have much experience with
Windows and have been using the win-builder service to see how the
package compiles on Windows. (Thank you for this service, Uwe, it is
a huge time saver for me!)
I have tried
2006 Dec 05
5
if(){} else{}
Dear R-community,
my data set looks like 'mat' below.
Plant<-c(NA,1,1,1,NA,NA,NA,NA,NA,1);
Value1<-rnorm(1:10);
Value2<-rnorm(1:10);
mat<-cbind(Plant,Value1,Value2);
I receive data from two different sites.
One site is identified by an interger number, the other site has no data in
column Plant=NA.
My pb:
I'm trying to assign labels "A" or "B" to
2006 Jul 19
1
fracdiff
Hi, I'm using the function fracdiff and can not figure out how to get the estimated values for sigma2 or confidence intervals for the parameter estimates. Does anyone know how to obtain these values?
Thanks,
Melissa
2003 Sep 23
2
How to extract data from Excel
Hi,
I would like to know how to extract the data from Excel Spreadsheet.
Thank you very much.
Melissa
************************************************************
JLT Risk Solutions Ltd
6 Crutched Friars, London EC3N 2PH. Co Reg No 1536540
Tel: (44) (0)20 7528 4000 Fax: (44) (0)20 7528 4500
http://www.jltgroup.com
Lloyd's Broker. Regulated by the General Insurance
Standards Council
2010 Apr 19
1
transient memory allocation and external pointers
Hello,
The Writing R extensions manual section 6.1.1 describes the transient
memory allocation function R_alloc, and states that memory allocated
by R_alloc is automatically freed after the .C or .Call function is
completed. However, based on my understanding of R's memory handling,
as well as some test functions I have written, I suspect that this is
not quite accurate. If the .Call
2009 Apr 07
6
Sequences
Hi,
I am trying to make a sequence and am using a for loop for this. I want to
start off with an initial value ie S[0]=0 then use the loop to create other
values. This is what I have so far but I just keep getting error messages.
#To calculate the culmulative sums:
s<-rep(0,207) #as this is the length of the
vector I know I will have
s<-as.vector(s)