Displaying 20 results from an estimated 700 matches similar to: "p-VALUE calculation"
2010 Jul 23
3
Filtering in R
The dataframe is
id salary
100 500
101 600
102 700
103 800
how can i generate a subsets if salary>600?
--
View this message in context: http://r.789695.n4.nabble.com/Filtering-in-R-tp2299603p2299603.html
Sent from the R help mailing list archive at Nabble.com.
2006 Nov 02
2
Simple question about Lists
Hello,
I know this must be a very simple problem, but I can't work it out
from the documentation that is available. I've got a list of data I
would like to plot (the weights of a single neuron that was trained
using the neural package). The problem I'm encountering is that this
set of weights, are in the form of a list.
> network$weigth[1]
[[1]]
[,1]
[1,]
2006 Sep 17
2
Excluding columns from dataframe and selecting row records
Dear R-friends,
I have to simple questions. First I would like to exclude some columns from a dataframe and after I need select rows that satisfy some conditions.
My data frame looks like
Region Species Bodysize Weigth Age
Africa Sp1 10.2 20 2
Africa Sp2 12.2 12 2
Africa Sp3 15.3 18 3
Africa Sp4 11.5 40 4
Brazil Sp1 10.2 40 3
Brazil Sp2 22.2 32 2
Brazil Sp3 12.3
2010 Jul 06
3
how to define a function in R
1. how to write a R script?
2.How to write a SAS like macro/generic process to process multiple files by
using the same funstion in R?
Thanks in advance
--
View this message in context: http://r.789695.n4.nabble.com/how-to-define-a-function-in-R-tp2280290p2280290.html
Sent from the R help mailing list archive at Nabble.com.
2010 Jul 12
2
cbind in for loops
I have 30 files in the current directories, i would like to perform the
cbind(fil1,file2,file3,file4....file30)
how could i do this in a for loop:
such as:
file2 <- list.files(pattern=".out3$")
for (j in file2) {
cbind(j).......how to implement cbind here
}
Thanks.
--
View this message in context:
2010 Jul 19
3
invalid type error
>myDF =
data.frame(id=c("A10","A20"),d1=c(.3,.3),d2=c(.4,.4),d3=c(-.2,.5),d4=c(-.3,.6),d5=c(.5,-.2),d6=c(.6,-.4),d7=c(-.9,-.5),d8=c(-.8,-.6))
>doit=function(x)c(x[1],sum_LK_positive=sum(x[-1][x[-1]>0]),sum_LK_negative=sum(x[-1][x[-1]<0]))
> myDF
id d1 d2 d3 d4 d5 d6 d7 d8
1 A10 0.3 0.4 -0.2 -0.3 0.5 0.6 -0.9 -0.8
2 A20 0.3 0.4 0.5 0.6 -0.2
2010 Jul 27
4
re-sampling of large sacle data
myDF:
d1 d2 d3 d4 d5
-0.166910351 0.022304377 -0.00825924 0.008330689 -0.000925938
-0.166910351 0.022304377 -0.00825924 0.008330689 -0.000925938
-0.166910351 0.022304377 -0.00825924 0.008330689 -0.168225938
-0.166910351 0.022304377 -0.00825924 0.008330689 -0.168225938
-0.166910351 0.022304377 -0.00825924 0.008330689 -0.168225938
-0.166910351
2010 Jul 22
5
choosing a random sample by precentage
hi all
i have found the follwoing way to choose a random sample by sample size (200):
ten_per_T2000 <- F_T2000_All[sample(nrow(F_T2000_All), 200), ]
but i wondered if there is a way to choose a sample size by
precentage (10% etc..)
thx
ethan
2010 Jul 07
3
how to process this in R
Here are what i am going to accomplish:
I have 400 files named as xxx.txt. the content of the file looks like the
following:
name count
1. aaa 100
2. bbb 2000
3. ccc 300
4. ddd 3000
........
more that 1000 rows in each files.
these are the areas i need help:
1. how can i only read in the files with the string patterns ggg or fff as
part of the file names?
for
2008 Sep 03
1
portfolio.optim and assets with weigth equals to zero...
Hello.
I don't understand a particular output of portfolio.optim (tseries).
I have 4 assets and the portfolio.optim returns an asset with weight equals
to zero.
If I do a portfolio.optim with 3 assets, without the asset with weight
equals to zero,
it returns a completely different result.
That's I would expected the same weights as the run with 4 assets.
Below the code.
Thanks in
2011 Mar 11
5
How to calculate means for multiple variables in samples with different sizes
Hello R-helpers:
I have data like this:
sample replicate height weight age
A 1.00 12.0 0.64 6.00
A 2.00 12.2 0.38 6.00
A 3.00 12.4 0.49 6.00
B 1.00 12.7 0.65 4.00
B 2.00 12.8 0.78 5.00
C 1.00 11.9 0.45 6.00
C 2.00 11.84 0.44 2.00
C 3.00 11.43 0.32 3.00
C 4.00 10.24 0.84 4.00
D
2010 Mar 25
1
Problem with reshaping data from wide to long format
Hi,
I have a data.frame in wide format which I would like to reshape into
a long format:
example (nonsense) data:
> dput(perus2)
structure(list(id = c(30L, 38L, 21L, 12L, 22L, 28L, 31L, 44L,
8L, 47L, 23L, 20L, 41L, 42L, 29L, 50L, 5L, 33L, 4L, 17L, 11L,
1L, 18L, 6L, 9L, 32L, 16L, 14L, 39L, 48L, 37L, 43L, 25L, 27L,
35L, 40L, 45L, 49L, 2L, 34L, 10L, 15L, 24L, 26L, 46L, 7L, 13L,
3L, 19L, 36L),
2005 Dec 22
7
Ruby on Rails and lookup tables
Hi,
I''m a newbie on both Ruby and Ruby on Rails, and I''m struggling with
my first app. I have a table with a column called "employee_id" which
is a foreing key associating it with the "employees" table. I have
populated both tables.
When I run "ruby script/generate scaffold <model name> <controller>"
it generates a web page with all
2010 Jul 12
2
boxplot on all the columns
how to use boxplot on all the columns from he date frame instead of manually
entering the columns like below
bhtest1 <- read.table("bhtest1.txt", header=TRUE)
boxplot (bhtest1[,2], bhtest1[,3], bhtest1[, 4], bhtest1[,5], bhtest1[,6],
bhtest1[,7]....)
please help, Thanks,
--
View this message in context:
2010 Jul 23
1
MISSING VALUE IN R
I have a DF
ID VALUE
100 120
101 100
102 100
103
104
105
....
when i calculate the sum of the values, it returned NA. should I populate
the blank value as 0?
Thanks,
--
View this message in context: http://r.789695.n4.nabble.com/MISSING-VALUE-IN-R-tp2299586p2299586.html
Sent from the R help mailing list archive at Nabble.com.
2010 Jul 23
1
na.rm=TRUE
POS=sum(x[-1][x[-1]>0],na.rm=TRUE)
is this the correct syntax?
--
View this message in context: http://r.789695.n4.nabble.com/na-rm-TRUE-tp2299596p2299596.html
Sent from the R help mailing list archive at Nabble.com.
2006 Aug 04
5
query across tables
I am trying to do things the proper rails way and use the auto generated
id to refernce other tables. Now I''ve hit a wall in trying to write a
query.
timesheets:
id, employee_id, code_id, ... values
codes:
id, job_number, code
How can I show just the timesheets that belong to a specific job?
I would need to check the codes table and look at the jobs, so I was
thinking of something
2011 Jul 14
2
R package: pbatR
Dear All,
Does anybody have experience with R package pbatR
(http://cran.r-project.org/web/packages/pbatR/index.html)? I am trying to
use it to analyze the family-based case-control data, but the package
totally doesn?t work on my computer. I contacted the authors of the package,
but I haven?t heard anything from them.
Following the package manual, I tried the simple example as below:
2006 Mar 24
6
login forms , redirect_to and ajax-scaffold problems
Hi,
I have a standard type authentication technique direct from AWDWR, so there is a
before_filter :authorize_employee, :except => :login in my employees_controller.rb
the authorize_employee is in application.rb
def authorize_employee
unless session[:employee_id]
flash[:notice] = "Please log in"
# save the URL the user requested so we can hop
2006 May 20
3
In a find, can''t you use both :include and :limit ?
I''m trying to do a find that includes a join. It has to be a find
because I''m using the results for a Pagination, so I need to limit my
query to the number of results I want to display per page.
Here''s the type of thing I want to do:
Employee table <-> Skills_Employees table <-> Skills table
Let''s say I want to find all the employees who have