Displaying 20 results from an estimated 110 matches similar to: "run optim() on a list"
2008 Feb 12
2
how to specify modes of certain fields in read.table
I have a data file with 50 columns. Among them, there are two
coordinates, X and Y
X
Y
641673.78807
3607080.78438
641436.56207
3607108.30543
641165.28042
3607136.82957
640879.58373
3607116.20568
When I use read.table, it rounds X and Y to the maximal 8 decimal number
as.
641673.8 3607081
641436.6 3607108
641165.3 3607137
640879.6 3607116
640683.5 3607105
My question
2008 Feb 11
2
how to generate a column based on other columns in a data frame
HI,
I am working on a data set with multiple collections of mosquitoes at
sampling sites. Each row represents a collection of individual samples
with coordinates for each collection.
... X, Y,...
1 36.435 30.118
2 36.435 30.118
3 36.435 30.118
4 35.329 29.657
5 35.329 29.657
6 36.431 30.111
7 36.431 30.111
8 35.421 29.797
9 35.421 29.797
10 35.421 29.797
2023 Mar 01
1
Shaded area
Dear R users,
I have an xlsx file (attached to this mail) that shows the values of a
"der" series observed on a daily basis from January 1, 2017 to January 25,
2017. This series is strictly positive during two periods: from January 8,
2017 to January 11, 2017 and from January 16, 2017 to January 20, 2017. I
would like to plot the series with two shaded areas corresponding to the
2008 Jan 31
1
decrease amount of ticks on y axis in lattice levelplot
Hi all,
How can I decrease the number of ticks on the y-axis in a lattice
levelplot()? I have as many ticks displayed on the y-axis as I have
columns of data (1000 columns), how can I decrease this amount of ticks,
while still properly displaying all the data?
Note that I get my data from a matrix object, in which the z-values of
the levelplot are the actual values in the matrix, whereas the
2023 Mar 01
1
Shaded area
Hallo
Excel attachment is not allowed here, but shading area is answered many times elsewhere. Use something like . "shading area r" in google.
See eg.
https://www.geeksforgeeks.org/how-to-shade-a-graph-in-r/
Cheers Petr
-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of George Brida
Sent: Wednesday, March 1, 2023 3:21 PM
To: r-help at
2004 Jul 27
4
SVD with positivity constraints
Hello,
I have a matrix equation, Ax=b, that I need to solve for x. x should be a
vector of positive numbers (between 0 and 1). A is not a square matrix in
general. This lead me to using the SVD. However, using the SVD gives me
positive and negative numbers, as well. I have some constraints included in
the A matrix itself (i.e., that the sum of some xi should be equal to 1) but
I do not know how
2023 Mar 03
1
Shaded area
As Peter says, the list is very cautious about what types of files it
allows. A handy way to supply some sample data is the dput() function. In
the case of a large dataset something like dput(head(mydata, 100)) should
supply the data we need. Just do dput(mydata) where *mydata* is your data.
Copy the output and paste it here.
On Wed, 1 Mar 2023 at 09:58, PIKAL Petr <petr.pikal at
2011 Apr 08
3
a strange behavior with ifelse
I have used R for years but run into a seemingly simple problem involving 'ifelse'. condensed code like this
a=c(2,NA,NA,NA,2,2,NA,2,NA,2)
b=c(NA,1,1,NA,2,2,2,2,2,2)
#I want to combined a and b into c so that c would be a valid number either a or b is not missing
c=ifelse(a==1|b==1,1,ifelse(a==2|b==2,2,NA))
cbind(a,b,c)
a b c
[1,] 2 NA NA
[2,] NA 1 1
[3,] NA 1 1
2008 Mar 27
1
panel function question
I have two data sets with locations, X, Y of houses (df.house) and
habitats(df.habitat), respectively. In each dataset, there are 3
replicates (Repeat). Because each replicate has different locations of
houses and habitats, I would like to plot them in panels. I wrote
something like this:
mypanel<-function(x,y,subscripts,...){
panel.xyplot(x,y,pch=20)
panel.xyplot(
2009 Feb 25
2
run latent class analysis with R
What's the best approach to running latent class analysis with R? I've downloaded both randomLCA and poLCA packages, but I am interesting in running a standard LCA with individual records (not frequency table) as input data.
Wen Gu
John Jay College of Criminal Justice445 West 59 StreetNew York, NY 10029
wgu@gc.cuny.edu
_________________________________________________________________
2008 Feb 08
4
how to extract characters from a character string
Hi, I ran into a problem when I complied a dataset with UTM coordinates.
For calculating distances between sites, I need to reformat the
coordinates from, for example,
32?35.421 N, to 35.421, i.e. I need to delete all digits before symbol ?
and a space and N at the end of the string. What functions I should use?
Thanks in advance.
Weidong Gu,
Department of Medicine
University of
2015 Dec 01
3
Endianness for multi-word types
> -----Original Message-----
> From: Hal Finkel [mailto:hfinkel at anl.gov]
> Sent: Tuesday, December 01, 2015 1:01 AM
> To: Tim Shen
> Cc: Gao, Yunzhong; llvm-dev at lists.llvm.org; Kit Barton; Nemanja Ivanovic
> Subject: Re: [llvm-dev] Endianness for multi-word types
>
> ----- Original Message -----
> > From: "Tim Shen via llvm-dev" <llvm-dev at
2023 Apr 16
0
BestSign: Aktivierung von Postbank BestSign
?
?
?
Sehr geehrter Kunde
?
?
Ab 16.04.2023 Sie m?ssen das neue Websicherheitssystem aktivieren. Der gesamte Vorgang dauert nur 1 Minuten.
?
Sie m?ssen jetzt Ma?nahmen ergreifen, um das Problem so schnell wie m?glich zu beheben
?
?
Aktivierung von Postbank BestSign
?
?
?2023 Postbank
?
?
Alle Rechte vorbehalten
?
?
?
2008 May 06
1
substring
I have a data frame such as
Name
DISC1_5916
DABC2_789
ABCD_1234
I want to substring column Name so that
DISC1
DABC2
ABCD
...
Thanks.
---------------------------------
[[elided Yahoo spam]]
[[alternative HTML version deleted]]
2008 Jan 07
1
How to rearrange lattice graphics output?
My question arises when I use levelplot graphics. For example,
levelplot(z~x*y|fg) where fg is a factor with three levels of
'a','b','c'. The panels come out in a default order. I would like to
rearrange the panels in a manner of 'c','b','a'. I used
fg<-ordered(fg, levels=c('c','b','a'))
But the panels are still the
2009 Mar 25
1
how to calcualte Jaccard Coefficient
Does anyone have a good method for calculating Jaccard coefficients now that the dissimilarity() function is no longer an option?
Wen Gu
John Jay College of Criminal Justice445 West 59 StreetNew York, NY 10029
wgu@gc.cuny.edu
_________________________________________________________________
Express your personality in color! Preview and select themes for HotmailĀ®.
2010 Oct 05
1
nonlinear curve fit of an implicit function
Hello,
I want to perform a nonlinear curve fit in order to obtain parameter
estimates from experimentally determined data (y in dependence of x),
but with an implicit function, thus, a function of which I cannot
isolate y on the left-hand side of the equation. As far as I understand,
the functions I found up to now (nls, optim) all work only for explicit
functions.
My data looks like
2009 May 29
1
edge case concerning NA in dim() (PR#13729)
Full_Name: Allan Stokes
Version: 28.1
OS: XP
Submission from: (NULL) (24.108.0.245)
I'm trying to use package HDF5 and have discovered some round-trip errors: save,
load, save is not idempotent. I started digging into the type system to figure
out what type graffiti is fouling this up.
Soon I discovered that comparisons with NULL produce zero length vectors, which
I hadn't known was
2008 Mar 11
1
messages from mle function
Dears useRs,
I am using the mle function but this gives me the follow erros that I
don't understand. Perhaps there is someone that can help me.
thank you for you atention.
Bernardo.
> erizo <- read.csv("Datos_Stokes_1.csv", header = TRUE)
> head(erizo)
EDAD TALLA
1 0 7.7
2 1 14.5
3 1 16.9
4 1 13.2
5 1 24.4
6 1 22.5
> TAN <-
2007 Sep 25
2
Constraining Predicted Values to be Greater Than 0
I have a WLS regression with 1 dependent variable and 3 independent variables. I wish to constrain the predicted values (the fitted values) so that they are greater than zero (i.e. they are positive). I do not know how to impose this constraint in R. Please respond if you have any suggestions.
There are some previous postings about constraining the coefficients, but this won't accomplish