Displaying 20 results from an estimated 4000 matches similar to: "A quick question about lm()"
2008 Jul 22
5
How to filter a data frame?
I have a question about how to filter the data frame:
Suppose my data frame has variables like gender, age,... How to get a subset
of the data frame, with only female (or male) and/or age > 50...? What is
the typical syntax? I tried several condition expressions, but none of them
worked...
Thanks a lot!
--
View this message in context:
2008 Jun 05
2
how to get the distribution curve from a data set?
I have a question.
I have a data set (about 100,000 observations). How would I get the
distribution curve graph? This is like, if I use hist(x, freq="TRUE",
breaks=1000) to get the histogram, now the question is, I don't need the
histogram itself, I just need the curve that connects the top of each
histogram bin.
Thank you very much!
--
View this message in context:
2005 Feb 18
1
extracting F, df and r squared using "sapply"?
Hi, All
How does one remove relevant information from a regression output besides
just the coefficients?
I've been able to modify the example given under "help(by)" to give me some
additional information, but not everything I need.
If you adjust the call statement from what is listed by adding the summary
statement like so:
tmp <- by(warpbreaks, tension, function(x)
2008 Mar 05
1
testing for significantly different slopes
Hi,
How would one go about determining if the slope terms from an analysis of
covariance model are different from eachother?
Based on the example from MASS:
library(MASS)
# parallel slope model
l.para <- lm(Temp ~ Gas + Insul, data=whiteside)
# multiple slope model
l.mult <- lm(Temp ~ Insul/Gas -1, data=whiteside)
# compare nested models:
anova(l.para, l.mult)
Analysis of Variance
2008 Sep 15
1
How to plot contours for joint density of 2 independently distributed r.v.?
X and Y are independently distributed random variables.
I would like to study the contours of the joint density of these two
variables.
Any function to call?
Thank you very much!
--
View this message in context: http://www.nabble.com/How-to-plot-contours-for-joint-density-of-2-independently-distributed-r.v.--tp19493126p19493126.html
Sent from the R help mailing list archive at Nabble.com.
2008 Nov 19
1
How to get robust M-estimator of multivariate scatter using Huber's psi?
How to get robust M-estimators of multivariate scatter using Huber's psi?
Which package/function should I look into? Ideally, I hope I can
self-define thresholds of Huber's psi function.
Thanks a lot!!!
--
View this message in context: http://www.nabble.com/How-to-get-robust-M-estimator-of-multivariate-scatter-using-Huber%27s-psi--tp20585755p20585755.html
Sent from the R help mailing
2008 Oct 20
3
A question about positive definite matrix
I know, this is a forum about R. But I am so desperate of this problem (BTW,
anyone knows any good Statistics/Math forum to post question like this?):
A and B are both n x n positive definite matrix.
Denote A > B, if A - B is positive definite.
I know this is true: if A > B, then A^{-1} < B^{-1}. But how to prove this?
I tried to diagonalize A and B, but since they can have different
2011 May 13
4
Quick question: Omitting rows and cols with certain percents of missing values
Hi
naive question.
It is possible to get R command for omitting rows or cols with missing values present.
But
if i want to omit rows or cols with i.e . >20% missing values, I
could´t find any package-based command, probably because it is too
simple for anyone to do that manually, though not for me. Can anyone
please help me ?
- vickie
[[alternative HTML version
2012 Nov 23
2
[LLVMdev] [cfe-dev] costing optimisations
On 23.11.2012, at 15:12, john skaller <skaller at users.sourceforge.net> wrote:
>
> On 23/11/2012, at 5:46 PM, Sean Silva wrote:
>
>> Adding LLVMdev, since this is intimately related to the optimization passes.
>>
>>> I think this is roughly because some function level optimisations are
>>> worse than O(N) in the number of instructions.
>>
2013 Jan 02
2
Read many cvs files
Hello R helpers,
I would like to automate this code for many files of the same type. But I
don´t know how to make it. In particular, i don´t know how to read many
files each one as an r object with the name of the file. Then a for loop
would be sufficient, right?
Many thanks and a happy new year.
Dominic
datos <- read.table('global2001.csv',head=T,sep=';',stringsAsFactors=F)
2010 Aug 23
3
extracting p-values from Anova objects (from the car library)
Dear all,
is there anyone who can help me extracting p-values from an Anova object
from the car library? I can't seem to locate the p-values using
str(result) or str(summary(result)) in the example below
> A <- factor( rep(1:2,each=3) )
> B <- factor( rep(1:3,times=2) )
> idata <- data.frame(A,B)
> fit <- lm( cbind(a1_b1,a1_b2,a1_b3,a2_b1,a2_b2,a2_b3) ? sex,
1999 Feb 22
1
Size of objects in the workspace
Is there an easy way (or any way) to determine the size of all the
objects in an R workspace. I know that "dim" will work on matrices,
"length" will work on lists, but what gives the size of a function?
After I have worked for a few days I often get confused about what is
what in the workspace, so I'm looking for something like "ls -l", to
point me toward
2011 Apr 19
1
How to Extract Information from SIMEX Output
Below is a SIMEX object that was generated with the "simex" function from the
"simex" package applied to a logistic regression fit. From this mountain of
information I would like to extract all of the values summarized in this
line:
.. ..$ variance.jackknife: num [1:5, 1:4] 1.684 1.144 0.85 0.624 0.519 ...
Can someone suggest how to go about doing this? I can extract the
2012 Oct 02
1
ffsave problems
Dear R friends.
After having some troubles learning how to create a ffdf object, now I find
myself having problems saving it.
this is the data i´d like to save:
str(DATA)
List of 3
$ virtual: 'data.frame': 6 obs. of 7 variables:
.. $ VirtualVmode : chr "double" "short" "integer" "integer" ...
.. $ AsIs : logi FALSE FALSE FALSE
2018 May 22
4
Pasar palabras de una lista a una variable del dataframe
Buenas tardes,
Tengo una lista de 600 palabras. Quiero saber cuántas de esas palabras
aparecen en cada observación de mi variable "texto". La variable "texto"
es de tipo caracter. ¿Cómo lo haríais?
Muchas gracias.
2010 Sep 16
2
problem reading Matlab file into R
Hi,
I'm trying to read a .mat file into R (2.11.1) with medium success so far. The file I have is a MATLAB 5.0 MAT-file exported from RiverSurveyor LIVE software (http://www.sontek.com/software.php). I have R.matlab and Rcompression installed and readMat() starts reading the file, as can be seen in verbose mode (hence medium success), but then gives the following error:
Error in dim(matrix)
2012 Dec 04
3
do.call
Hello,
I have a problem with the "do.call-function". I would like to merge
the values of more than 30 columns, but not in all of the rows exist
values, so with this commando i get a lot of ";" or NA.
How get i only the merge of cells with a number?
datos$NEW <- do.call(paste, c(datos[,19:53], sep = ";"))
$ NEW : chr
2010 Nov 02
2
count different words in a field
Hi all,
I started to ask this in the other post, but it is off topis...so here it is again.
I have a data.frame (created with the helpof this mail list) that looks like this :
'data.frame': 22801 obs. of 15 variables:
$ V1 : chr "HUMUS" "SLABO" "MALO" "SLABO" ...
$ V2 : chr "IN" "GRANULIRAN"
2010 Sep 06
2
dataframe row names from list
Hi,
I have a list which looks like this...
> str(y)
List of 10
$ : chr [1:4] "ABCD" "5" "0" "1"
$ : chr [1:4] "DEF" "15" "1" "16"
$ : chr [1:4] "AAA" "2" "17" "8"
$ : chr [1:4] "SSS" "15" "25" "1"
$ : chr [1:4] "III"
2018 May 23
2
Pasar palabras de una lista a una variable del dataframe
Muchas gracias Carlos,
Me da error al hacerlo. Mi variable donde quiero que localice las palabras
de la lista tiene más de una palabra, no se si puede ser por eso.
Gracias
El Mar, 22 de Mayo de 2018, 20:15, Carlos Ortega escribió:
> Hola,
>
> Aquí tienes un ejemplo (reproducible)...
>
> #-----------------------
>> # Generar nombres de mujer
>> library(randNames)